Skip navigation links

JDependency

JDependency is an API and application which allows to analyse Java packages dependencies.

See: Description

core classes 
Package Description
org.jdepend
jDependency is an API and application which allows to analyse Java packages.
org.jdepend.action
Contain classes which are used for several actions on class directotries or jar files.
org.jdepend.model
Contain the dependency model classes.
org.jdepend.parser
Parsers used in the application.
org.jdepend.utils
Several utilities classes to use with JDependency.
org.jdepend.visitors
Contain classes which are used to visit several class directories or jar files.
Swing classes 
Package Description
org.jdepend.swing
GUI classes for the application.
org.jdepend.swing.actions
Contain GUI action classes for dependency checking in the swing application.
org.jdepend.swing.dialogs
Contain GUI dialog classes for dependency checking in the swing application.
org.jdepend.swing.model
Contain the model for the swing application.

JDependency is an API and application which allows to analyse Java packages dependencies.

Usage as an Application

Double-click on the jar of the jDependency-ui.jar Application.

Usage as a library

Dependencies on jar files

Look for the JarDependencies class.
   File libJarFile = <The reference Jar File> (for example a library on which we don't want to be dependant on)
   JarDependencies lib = new JarDependencies();
   depend.setFile(libJarFile);

   File jarFile = <The Jar File on which we want to see the dependencies>
   JarDependencies depend = new JarDependencies();
   depend.setFile(jarFile);

   // looking for dependencies
   // isDepending is true if jarFile depends on libJarFile
   boolean isDepending = depend.isDependingOn(lib);

   // printing dependencies
   DependencyPrinter.printDependencies(depend, lib);
   

Dependencies on packages

   File libJarFile = <The reference Jar File> (for example a library on which we don't want to be dependant on)
   JarDependencies lib = new JarDependencies();
   depend.setFile(libJarFile);

   File jarFile = <The Jar File on which we want to see the dependencies>
   JarDependencies depend = new JarDependencies();
   depend.setFile(jarFile);

   // isDepending is true if jarFile depends on the package org.my. in libJarFile, or any
   // of its sub-packages
   boolean isDepending = depend.isDependingOn(lib, "org.my.package", false);

   // isDepending2 is true if jarFile depends on the package org.my. in libJarFile strictly (not any
   // of its sub-packages)
   boolean isDepending2 = depend.isDependingOn(lib, "org.my.package", true);
   
Skip navigation links

Copyright © 2016-2023 Herve Girod. All Rights Reserved. Documentation and source under the LGPL licence