public class WaitingIElementsProcessingResultHandler extends java.lang.Object implements IElementsProcessingResultHandler
Constructor and Description |
---|
WaitingIElementsProcessingResultHandler()
Initialize the new instance with default timeout of 10 seconds.
|
WaitingIElementsProcessingResultHandler(long timeoutInMs)
Initialize the new instance with a timeout.
|
Modifier and Type | Method and Description |
---|---|
protected CollectionUtil |
coll() |
ClassInformation[] |
findDependantsOfClass(ClassInformation classInformation,
java.lang.String taskId,
IProgressMonitor monitor,
boolean findAll)
Starts a separate thread that collects dependants of the given class.
|
GenericClassContainer[] |
findDependantsOfContainer(GenericClassContainer container,
java.lang.String taskId,
IProgressMonitor monitor,
boolean findAll)
Starts a separate thread that collects dependants of the given container.
|
ClassPackage[] |
findDependantsOfPackage(ClassPackage aPackage,
java.lang.String taskId,
IProgressMonitor monitor,
boolean findAll)
Starts a separate thread that collects dependants of the given package.
|
ClassInformation[] |
findImplementorsOfInterface(ClassInformation interfaceClass,
java.lang.String taskId,
IProgressMonitor monitor,
boolean directOnly)
Starts a separate thread that collects implementors of the given interface.
|
protected ProcessingResult |
getResult() |
void |
handleElementsProcessingCancellation(java.lang.String type,
IAnalyzableElement startElement)
This method will be called by ClassesProcessingTask if the search
was cancelled during its processing.
|
void |
handleElementsProcessingResult(java.lang.String type,
IAnalyzableElement startElement,
ProcessingResult<? extends IAnalyzableElement> result)
This method will be called by ClassesProcessingTask after successfully
completed the processing.
|
protected boolean |
hasTimedOut(long duration) |
protected boolean |
isStillProcessing() |
protected ClassInformation[] |
waitAndReturnClasses() |
protected void |
waitWhileProcessing() |
public WaitingIElementsProcessingResultHandler()
public WaitingIElementsProcessingResultHandler(long timeoutInMs)
public void handleElementsProcessingCancellation(java.lang.String type, IAnalyzableElement startElement)
IElementsProcessingResultHandler
handleElementsProcessingCancellation
in interface IElementsProcessingResultHandler
type
- Specifies the type of processingstartElement
- The element on which the processing was startedpublic void handleElementsProcessingResult(java.lang.String type, IAnalyzableElement startElement, ProcessingResult<? extends IAnalyzableElement> result)
IElementsProcessingResultHandler
handleElementsProcessingResult
in interface IElementsProcessingResultHandler
type
- Specifies the type of processingstartElement
- The element on which the processing was started (must not be null).result
- The collection containing all found elements (must not be null).public GenericClassContainer[] findDependantsOfContainer(GenericClassContainer container, java.lang.String taskId, IProgressMonitor monitor, boolean findAll)
container
- The container for which to collect the dependant containers.taskId
- A unique identifier that allows the result handler to associate the result to the initiator.monitor
- An optional monitor that will be called during processing to allow display current progress (may be null).findAll
- Specifies whether all dependants (recursively) or only direct dependants should be collected.public ClassPackage[] findDependantsOfPackage(ClassPackage aPackage, java.lang.String taskId, IProgressMonitor monitor, boolean findAll)
aPackage
- The package for which to collect the dependant packages.taskId
- A unique identifier that allows the result handler to associate the result to the initiator.monitor
- An optional monitor that will be called during processing to allow display current progress (may be null).findAll
- Specifies whether all dependants (recursively) or only direct dependants should be collected.public ClassInformation[] findDependantsOfClass(ClassInformation classInformation, java.lang.String taskId, IProgressMonitor monitor, boolean findAll)
classInformation
- The class for which to collect the dependant classes.taskId
- A unique identifier that allows the result handler to associate the result to the initiator.monitor
- An optional monitor that will be called during processing to allow display current progress (may be null).findAll
- Specifies whether all dependants (recursively) or only direct dependants should be collected.public ClassInformation[] findImplementorsOfInterface(ClassInformation interfaceClass, java.lang.String taskId, IProgressMonitor monitor, boolean directOnly)
interfaceClass
- The interface for which to lookup the implementors.taskId
- A unique identifier that allows the result handler to associate the result to the initiator.monitor
- An optional monitor that will be called during processing to allow display current progress (may be null).directOnly
- Specifies whether only direct implementors all implementors (including all subclasses of direct implementors) should be collected.protected ClassInformation[] waitAndReturnClasses()
protected void waitWhileProcessing()
protected boolean isStillProcessing()
protected boolean hasTimedOut(long duration)
protected ProcessingResult getResult()
protected CollectionUtil coll()