Package classycle.dependency
Class DependencyChecker
- java.lang.Object
-
- classycle.dependency.DependencyChecker
-
public class DependencyChecker extends java.lang.Object
Checks a class graph for unwanted dependencies. The dependencies are described by a dependency definition file (.ddf).- Author:
- Franz-Josef Elmer
-
-
Constructor Summary
Constructors Constructor Description DependencyChecker(Analyser analyser, java.lang.String dependencyDefinition, java.util.Map<java.lang.Object,java.lang.Object> properties, ResultRenderer renderer)
Creates a new instance.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Result
check()
Checks the graph.boolean
check(java.io.PrintWriter writer)
Checks the graph and write unwanted dependencies onto the specified writer.static void
main(java.lang.String[] args)
Runs the DependencyChecker application.
-
-
-
Constructor Detail
-
DependencyChecker
public DependencyChecker(Analyser analyser, java.lang.String dependencyDefinition, java.util.Map<java.lang.Object,java.lang.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 Detail
-
check
public boolean check(java.io.PrintWriter writer)
Checks the graph and write unwanted dependencies onto the specified writer.- Returns:
- true if no unwanted dependency has been found.
-
check
public Result check()
Checks the graph.
-
main
public static void main(java.lang.String[] args)
Runs the DependencyChecker application. Exit 0 if no unwanted dependency found otherwise 1 is returned.
-
-