Classycle: Analysing Tools for Java Class and Package Dependencies
Classycle's Analyser analyses the static class and package dependencies
in Java applications or libraries. It is especially helpful for finding cyclic
dependencies between classes or packages. Classycle is similar to
JDepend which does also a dependency analysis but only on the package level.
Classycle's Dependency Checker searchs for
unwanted class dependencies described in a dependency definition file.
Dependency checking helps to monitor whether certain architectural constrains
(e.g. in a layered architecture) are fulfilled or not.
For an Eclipse plugin see Alain Graf's
ClassyclePlugin
Purpose and Features
Static cyclic dependencies of classes or packages can be a sign of bad
object-oriented design. A static dependency is a dependency
between classes or packages. It can already be detected by the compiler.
This has to be distinguished from dynamic dependency
which is a dependency between objects.
Figuring out static cyclic dependency is the main purpose of Classycle.
Classycle does not need the Java source files because it analyses the
compiled class files. Since version 1.3 it also evaluates Java Generics
signatures.
From the analysis of the class files directed graphs of
class and package dependencies are calculated. These graphs are
further analysed in order
to detect cyclic dependencies. For more details, see the
User Guide
Chapter 2. How Classycle works.
Classycle's Analyser produces a report (in XML) which contains
- the complete directed class/package graph
- all strong components of the class/package graph
with more than one vertex
(i.e. cycles of class/package dependencies)
In addition it groups the classes/packages into layers.
For each class/package the layer
index is reported. For more details, see the
User Guide
Chapter 3. What Classycle measures.
There is also an XSL transformation for rendering the XML report
into an HTML page.
Based on the class graph Classycle's Dependency Checker
allows to search for unwanted dependencies between two sets of classes.
An unwanted dependency between the start set and the end set can be either
- a direct one (a class of the start set uses a class of the end set) or
- an indirect one where a path goes via intermediate classes from
a class of the start set to a class of the end set.
If such dependencies are found
all or only the shortest paths are reported.
Instead of unwanted dependencies also allowed dependencies can be defined.
In addition the Dependency
Checker can check the absence of large class cycles or package cycles.
Classycle tools can be run on the command line as well as an
Ant task. Command line options
and Ant task attributes are explained
in the first chapter of the User Guide.
Release History
Classycle 1.4.2
This is a minor release from 11/1/2014.
- Bug fixes:
- Java 8 lambda expressions are supported.
Classycle 1.4.1
This is a minor release from 9/10/2012.
- New Features:
- In Classycle Ant tasks zipfilesets can be used. This feature is partially based on
a patch by Tom Denley.
- Bug fixes:
- Bug #3562457 fixed: Checking with 'dependentOnlyOn' printed expanded
set definitions in the output. Now it prints only the set definitions
as in the other check commands.
Classycle 1.4
This is a major release from 4/10/2011.
- New Features:
-
Classycle 1.3.3
This is a minor release from 5/24/2008.
- New Features:
- The source of an analyzed classes and packages are added to the report.
- All zip/jar/war/ear files in folders are also analyzed.
Both features are based on a patch provided by Dietmar Wolz.
Classycle 1.3.2
This is a minor release from 3/17/2008.
- Bug fixes:
- Bug #1892622 fixed: The bug appeared in the package dependency
graph if a package contains external and internal classes.
- Now a package classifies as an internal package if it
contains at least one internal class.
- An arc in the class graph from an internal class to
an external class do not imply a corresponding arc between
their packages if the package of the external class is
an internal package.
Classycle 1.3.1
This is a minor release from 5/12/2007.
- New Features:
- File attributes in ant tasks can also specify absolute paths.
Thanks to Tim Vernum for the patch.
Classycle 1.3
This is a major release from 9/30/2006.
- New Features:
- Evaluates Java Generics signatures.
- Better syntax checking concerning miss-spelled keywords
in dependency definition files.
Classycle 1.2
This is a major release from 4/10/2006.
- New Features:
- Merging inner classes: All inner classes vertices can be
merged with their outer class vertex.
- New commands for the Dependency Checker:
- Property definition and use
- Checking sets
- Checking absence of large class or package cycles
Classycle 1.1.1
This is a minor release from 6/5/2005.
- New Features:
- XML report:
- Date attribute in root element filled with current date.
- Class/package element: Attribute cycle which denotes
the cycle to which the class/package belongs.
- reportXMLtoHTML.xsl:
- Sorts the cycles lists in accordance to their size.
- Links to cycles for classes/packages belonging to a cycle.
Classycle 1.1
This is a major release from 11/28/2004.
- New Features:
- Ordinary string constants in Java code can be used as
class references if they are valid fully-qualified class names
and match certain patterns
(see first chapter of
the User Guide).
- Dependency Checker.
- Documentation:
- Adapted to the new feature
Classycle 1.0
This is a major release from 7/2/2004.
- New Features:
- Ant Task
ReportTask.
Thanks to Boris Gruschko for its
initial version!
- Many methods of class Analyser become public
in order to be used by other Java classes
(e.g. ReportTask).
- New command line option:
-includingClasses and -excludingClasses
(see first chapter of
the User Guide).
- Bugfixes:
- XML escaping of the title of the XML report
- Documentation:
- Adapted to the new feature
- New with API documentation
Classycle 0.9999
This is a major release from 6/11/2004.
- New Features:
- Package dependencies and cycles
- Improved reportXMLtoHTML.xsl generates
class/package links in popup windows.
- Documentation:
- Adapted to the new feature
Classycle 0.999
This is a major release from 5/24/2003.
- New Features:
- Calculates and reports maximum fragmentation size for all
classes of a cycle.
- Documentation:
- Adapted to the new feature
- New chapter: Hints to improve design
Classycle 0.99
This is a major release from 5/11/2003.
- New Features:
- Reports layer index for all classes
- Improved reportXMLtoHTML.xsl
- Bugfixes:
- Analysis of the constant pool
- Documentation:
- New chapters of the User Guide explain how Classycle
works and what it measures
Classycle 0.9
This is the initial release from 4/18/2003.
|