jDepend
jDepend is a java framework traverses Java class file directories and generates design quality metrics for each Java package which can be used to measure quality of a design in terms of its extensibility, reusability, and maintainability to manage package dependencies effectively.
When running it goes over the compiled code and display a report containing for each package:
- Number of classes and interfaces;
- The number of other packages depending on current package (afferent couplings - indicates package responsibility, a big number means changing this might trigger necessary changes in dependent packages);
- The number of other packages on which the current class depends on (efferent coupling - indicates package dependence);
- The ratio of abstract classes and interfaces from all the classes in current package;
- The ratio of efferent coupling to total coupling in which current package is involved (afferent + efferent couplings);
- Package Dependency Cycles - identify and reports cyclic package dependencies.
JDepend can be run in a Command Line, GUI or integrated with Ant, Fitnesse of Junit and produces results in Text ot Xml format.
Useful Links
- Chase The Devil: How JDepend Changed My Java Packaging
- ONJava.com — Managing Your Dependencies with JDepend
Related Projects:
- jdepend4eclipse - An plugin to run jDepend from eclipse
- A Maven Plugin
- ArchitectureRules - a simple testing tool built on jDepend which can be used to assert that specific packages do not depend on others and is able to find and report on cyclic dependencies among project’s packages and classes
License: BSD License
Links: Homepage, Download, Sourcecode

Leave a comment