public abstract class AnalyzableElementDependantsDetector<TAnalyzableElement extends IAnalyzableElement> extends java.lang.Object implements IMutableAnalyzableElementProcessor<TAnalyzableElement>
Modifier | Constructor and Description |
---|---|
protected |
AnalyzableElementDependantsDetector(IProgressMonitor progressMonitor,
TAnalyzableElement element)
Initialize the new instance with default values.
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
doMonitoring(java.lang.String itemName)
Handles updating the progress monitor if one is available.
|
TAnalyzableElement |
getAnalyzedElement() |
java.util.Collection<TAnalyzableElement> |
getExcludedElements() |
protected IProgressMonitor |
getMonitor() |
protected boolean |
hasMonitor() |
protected boolean |
isExcluded(TAnalyzableElement element) |
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> elements)
Set a collection of elements that must be skipped in the matches() method.
|
protected void |
setMonitor(IProgressMonitor newValue) |
protected AnalyzableElementDependantsDetector(IProgressMonitor progressMonitor, TAnalyzableElement element)
public TAnalyzableElement getAnalyzedElement()
public void setAnalyzedElement(TAnalyzableElement newValue)
IMutableAnalyzableElementProcessor
setAnalyzedElement
in interface IMutableAnalyzableElementProcessor<TAnalyzableElement extends IAnalyzableElement>
public java.util.Collection<TAnalyzableElement> getExcludedElements()
public void setExcludedElements(java.util.Collection<TAnalyzableElement> elements)
IMutableAnalyzableElementProcessor
setExcludedElements
in interface IMutableAnalyzableElementProcessor<TAnalyzableElement extends IAnalyzableElement>
elements
- The collection of excluded elements (must not be null).public boolean process(TAnalyzableElement element)
process
in interface InterruptableProcessor<TAnalyzableElement extends IAnalyzableElement>
element
- The object to be processed (never null).public boolean matches(TAnalyzableElement element)
matches
in interface org.pfsw.bif.filter.IObjectFilter<TAnalyzableElement extends IAnalyzableElement>
matches
in interface IAnalyzableElementProcessor<TAnalyzableElement extends IAnalyzableElement>
element
- Any element object or even nullprotected boolean isExcluded(TAnalyzableElement element)
protected boolean hasMonitor()
protected boolean doMonitoring(java.lang.String itemName)
protected IProgressMonitor getMonitor()
protected void setMonitor(IProgressMonitor newValue)