org.pf.tools.cda.core.dependency.analyzer
Class AnalyzableElementDependantsDetector<TAnalyzableElement extends IAnalyzableElement>

java.lang.Object
  extended by org.pf.tools.cda.core.dependency.analyzer.AnalyzableElementDependantsDetector<TAnalyzableElement>
All Implemented Interfaces:
org.pf.bif.filter.IObjectFilter, IAnalyzableElementProcessor<TAnalyzableElement>, IMutableAnalyzableElementProcessor<TAnalyzableElement>
Direct Known Subclasses:
AClassDependencyDetector, ContainerDependantsDetector, PackageDependantsDetector

public abstract class AnalyzableElementDependantsDetector<TAnalyzableElement extends IAnalyzableElement>
extends java.lang.Object
implements IMutableAnalyzableElementProcessor<TAnalyzableElement>

A generic super class that implements dependency detection on IAnalyzableElements.

Version:
1.0
Author:
M.Duchrow

Method Summary
 TAnalyzableElement getAnalyzedElement()
           
 java.util.Collection<TAnalyzableElement> getExcludedElements()
           
 boolean matches(TAnalyzableElement element)
          Returns true if the given element matches the criteria of this detector.
 boolean process(TAnalyzableElement element)
          Process the given element.
 void setAnalyzedElement(TAnalyzableElement newValue)
          Set the element to be analyzed to a new value (must not null).
 void setExcludedElements(java.util.Collection<TAnalyzableElement> newValue)
          Set a collection of elements that must be skipped in the matches() method.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.pf.bif.filter.IObjectFilter
matches
 

Method Detail

getAnalyzedElement

public TAnalyzableElement getAnalyzedElement()

setAnalyzedElement

public void setAnalyzedElement(TAnalyzableElement newValue)
Description copied from interface: IMutableAnalyzableElementProcessor
Set the element to be analyzed to a new value (must not null).

Specified by:
setAnalyzedElement in interface IMutableAnalyzableElementProcessor<TAnalyzableElement extends IAnalyzableElement>

getExcludedElements

public java.util.Collection<TAnalyzableElement> getExcludedElements()

setExcludedElements

public void setExcludedElements(java.util.Collection<TAnalyzableElement> newValue)
Description copied from interface: IMutableAnalyzableElementProcessor
Set a collection of elements that must be skipped in the matches() method. That is, they will be excluded from the final result collection.

Specified by:
setExcludedElements in interface IMutableAnalyzableElementProcessor<TAnalyzableElement extends IAnalyzableElement>
Parameters:
newValue - The collection of excluded elements (must not be null).

process

public boolean process(TAnalyzableElement element)
Process the given element. Returns true if processing must continue.

Specified by:
process in interface IAnalyzableElementProcessor<TAnalyzableElement extends IAnalyzableElement>
Parameters:
element - The element object to be processed
Returns:
true if processing should continue, false if processing should stop

matches

public boolean matches(TAnalyzableElement element)
Returns true if the given element matches the criteria of this detector.

Specified by:
matches in interface IAnalyzableElementProcessor<TAnalyzableElement extends IAnalyzableElement>
Parameters:
element - Any element object or even null