Package classycle.dependency
Class DependencyChecker
java.lang.Object
classycle.dependency.DependencyChecker
Checks a class graph for unwanted dependencies. The dependencies are
described by a dependency definition file (.ddf).
- Author:
- Franz-Josef Elmer
-
Constructor Summary
ConstructorsConstructorDescriptionDependencyChecker
(Analyser analyser, String dependencyDefinition, Map<Object, Object> properties, ResultRenderer renderer) Creates a new instance. -
Method Summary
-
Constructor Details
-
DependencyChecker
public DependencyChecker(Analyser analyser, String dependencyDefinition, Map<Object, Object> properties, ResultRenderer renderer) Creates a new instance. Note, that the constructor does not create the graph. It only parses dependencyDefinition as a preprocessing step. The calculation of the graph is done incheck(PrintWriter)
.- Parameters:
analyser
- Analyzer instance.dependencyDefinition
- Description (as read from a .ddf file) of the dependencies to be checked.renderer
- Output renderer for unwanted dependencies found.
-
-
Method Details
-
check
Checks the graph and write unwanted dependencies onto the specified writer.- Returns:
- true if no unwanted dependency has been found.
-
check
Checks the graph. -
main
Runs the DependencyChecker application. Exit 0 if no unwanted dependency found otherwise 1 is returned.
-