Package classycle.dependency

# Class DependencyChecker

java.lang.Object
classycle.dependency.DependencyChecker

public class DependencyChecker extends 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, String dependencyDefinition, Map<Object,Object> properties, ResultRenderer renderer)`
Creates a new instance.

## Method Summary

Modifier and Type
Method
Description
`Result`
`check()`
Checks the graph.
`boolean`
`check(PrintWriter writer)`
Checks the graph and write unwanted dependencies onto the specified writer.
`static void`
`main(String[] args)`
Runs the DependencyChecker application.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## 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 in `check(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

public boolean check(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(String[] args)
Runs the DependencyChecker application. Exit 0 if no unwanted dependency found otherwise 1 is returned.