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

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

public class DependencyAnalyzer
extends MonitoredDependencyAnalyzer

An instance of this class is used to collect all classes on which a given class depends on directly or indirectly.

Version:
1.2
Author:
Manfred Duchrow

Constructor Summary
DependencyAnalyzer(IAnalyzableElement elementToAnalyze)
          Initialize the new instance with an element to analyze.
DependencyAnalyzer(IAnalyzableElement elementToAnalyze, IProgressMonitor monitor)
          Initialize the new instance with a progress monitor
 
Method Summary
 void analyze()
          Starts the analyzing.
 ContainerDependencyInfo calculateClassDependencies(ClassContainer aContainer)
          Calculates all classes the classes inside the given container depend on.
 ClassDependencyInfo calculateClassDependencies(ClassInformation classInfo)
          Calculates all classes the given class depends on.
 PackageDependencyInfo calculateClassDependencies(ClassPackage aPackage)
          Calculates all classes the classes inside the given package depend on.
 int getNumberOfElementsToAnalyze()
          Returns the number of elements this analyzer is processing
 DependencyInfo getResult()
           
 
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

DependencyAnalyzer

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


DependencyAnalyzer

public DependencyAnalyzer(IAnalyzableElement elementToAnalyze,
                          IProgressMonitor monitor)
Initialize the new instance with a progress monitor

Method Detail

getResult

public DependencyInfo getResult()

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

calculateClassDependencies

public ClassDependencyInfo calculateClassDependencies(ClassInformation classInfo)
Calculates all classes the given class depends on. Returns a result object that contains all information about the dependenies.

Parameters:
classInfo - The information warpper around the class to be analyze

calculateClassDependencies

public PackageDependencyInfo calculateClassDependencies(ClassPackage aPackage)
Calculates all classes the classes inside the given package depend on. Returns a result object that contains all referred classes.

Parameters:
aPackage - The information wrapper around the package to analyze

calculateClassDependencies

public ContainerDependencyInfo calculateClassDependencies(ClassContainer aContainer)
Calculates all classes the classes inside the given container depend on. Returns a result object that contains all referred classes.

Parameters:
aContainer - The container that contains all classes to analyze