org.eclipse.modisco.infra.discovery.core

## Interface IDiscoverer<T>

All Known Implementing Classes:
  AbstractComposedKDMSourceDiscoverer2, AbstractDeploymentDescriptorDiscoverer, AbstractDiscoverer, AbstractDiscoverJavaModelFromProject, AbstractDiscoverKDMSourceAndJavaModel, AbstractJspDiscoverer, AbstractModelDiscoverer, AbstractProjectDeploymentDescriptorDiscoverer, AbstractRegionDiscoverer2, DiscoverEclipsePluginFromJavaProject2, DiscoverEclipsePluginFromProject, DiscoverJavaModelFromClassFile, DiscoverJavaModelFromJavaProject, DiscoverJavaModelFromLibrary, DiscoverJavaModelFromProject, DiscoverJspModelFromJavaElement, DiscoverJspModelFromResource, DiscoverKDMModelFromJavaModel, DiscoverKDMModelFromJavaProject, DiscoverKDMModelFromProject, DiscoverKDMSourceAndJavaModelFromJavaProject, DiscoverKDMSourceAndJavaModelFromProject, DiscoverMethodCallsModelFromJavaModel, DiscoverMethodCallsModelFromJavaProject, DiscoverSourceModelFromJavaElement, DiscoverSourceModelFromResource, DiscoverUmlModelFromJavaProject, DiscoverUmlModelFromKdmModel, DiscoverUmlModelFromProject, DiscoverUmlModelWithBidirectionalAssociationsFromJavaProject, DiscoverUmlModelWithBidirectionalAssociationsFromProject, DiscoverUmlModelWithRealTypesFromJavaProject, EjbJarDiscoverer2, ManifestModelDiscoverer2, PropertiesModelDiscoverer2, WebXmlDiscoverer2, XMLModelDiscoverer

    public interface IDiscoverer<T>

A discoverer is a process which discovers information from one input source. Such a process can be parameterized through additional input data.

A basic implementation is provided in `AbstractDiscoverer`.

In the context of model-driven reverse-engineering, a common category of discoverers is characterized by injecting information into a result model. Class `AbstractModelDiscoverer` provides a basic implementation for such discoverers.

### Method Summary

All Methods Instance Methods Abstract Methods
`void` `discoverElement(T source, IProgressMonitor monitor)` Generic method to launch a discovery from a source element.
`boolean` `isApplicableTo(T source)` To determine if the source object can be handled by the discoverer.

### Method Detail

#### isApplicableTo

    boolean isApplicableTo(T source)

To determine if the source object can be handled by the discoverer. Each discoverer has to implement this method with its own criteria to filter the selected object.

Some usual implementations are proposed on `AbstractDiscoverer`.

Parameters:
  `source` - the selected object.
Returns:
  `true` if the selected object is managed by this discoverer, `false` otherwise.

#### discoverElement

    void discoverElement(T source,
                         IProgressMonitor monitor)
                  throws DiscoveryException

Generic method to launch a discovery from a source element.

Additional discovery parameters values (input or output) should be managed using fields and methods annotated with a `Parameter` annotation. See the class `AbstractDiscoverer` as an example.

Parameters:
  `source` - the selected object.
  `monitor` - a progress monitor used to report progress and respond to cancellation. May be a `NullProgressMonitor` if no monitor is to be used.
Throws:
  `DiscoveryException` - abnormal discovery process termination