org.pf.tools.cda.core.dependency.analyzer
Class CircularDependenciesDetector

java.lang.Object
  extended by org.pf.tools.cda.core.dependency.analyzer.MonitoredDependencyAnalyzer
      extended by org.pf.tools.cda.core.dependency.analyzer.CircularDependenciesDetector

public class CircularDependenciesDetector
extends MonitoredDependencyAnalyzer

This class is responsible to analyze a given array of classes (types) and detect all circular dependencies.

Version:
1.1
Author:
M.Duchrow

Constructor Summary
CircularDependenciesDetector(IAnalyzableElement elementToAnalyze)
          Initialize the new instance with an element to analyze.
CircularDependenciesDetector(IAnalyzableElement elementToAnalyze, IProgressMonitor monitor)
          Initialize the new instance with an element to analyze and a monitor.
 
Method Summary
 void analyze()
          Starts the analyzing.
 CircularDependenciesResult detectCircularDependencies(ClassInformation[] classInfos)
          Detect all the circular dependency paths for each of the given classes.
 int getNumberOfElementsToAnalyze()
          Returns the number of elements this analyzer is processing
 CircularDependenciesResult getResult()
           
 void setIgnoreCyclesInSameContainer(boolean newValue)
           
 void setIgnoreCyclesInSamePackage(boolean newValue)
           
 void setIgnoreCyclesInSamePackageBranch(boolean newValue)
           
 void setIgnoreThirdPartyLibraries(boolean newValue)
           
 
Methods inherited from class org.pf.tools.cda.core.dependency.analyzer.MonitoredDependencyAnalyzer
getAnalyzedElement, getProgressMonitor, getWorkset, isCancelled, setProgressMonitor
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CircularDependenciesDetector

public CircularDependenciesDetector(IAnalyzableElement elementToAnalyze)
Initialize the new instance with an element to analyze.


CircularDependenciesDetector

public CircularDependenciesDetector(IAnalyzableElement elementToAnalyze,
                                    IProgressMonitor monitor)
Initialize the new instance with an element to analyze and a monitor.

Method Detail

getResult

public CircularDependenciesResult getResult()

setIgnoreCyclesInSamePackage

public void setIgnoreCyclesInSamePackage(boolean newValue)

setIgnoreCyclesInSamePackageBranch

public void setIgnoreCyclesInSamePackageBranch(boolean newValue)

setIgnoreCyclesInSameContainer

public void setIgnoreCyclesInSameContainer(boolean newValue)

setIgnoreThirdPartyLibraries

public void setIgnoreThirdPartyLibraries(boolean newValue)

analyze

public void analyze()
Starts the analyzing.

Specified by:
analyze in class MonitoredDependencyAnalyzer

getNumberOfElementsToAnalyze

public int getNumberOfElementsToAnalyze()
Returns the number of elements this analyzer is processing

Specified by:
getNumberOfElementsToAnalyze in class MonitoredDependencyAnalyzer

detectCircularDependencies

public CircularDependenciesResult detectCircularDependencies(ClassInformation[] classInfos)
Detect all the circular dependency paths for each of the given classes.

Returns:
A result object containing all found cirular dependency paths