org.eclipse.modisco.java.discoverer

## Class AbstractDiscoverJavaModelFromProject<T>

- java.lang.Object
- - org.eclipse.modisco.infra.discovery.core.AbstractDiscoverer<T>
  - - org.eclipse.modisco.infra.discovery.core.AbstractModelDiscoverer<T>
    - - org.eclipse.modisco.kdm.source.extension.discovery.AbstractRegionDiscoverer2<T>
      - - org.eclipse.modisco.java.discoverer.AbstractDiscoverJavaModelFromProject<T>

All Implemented Interfaces:
  IDiscoverer<T>, ISourceRegionNotifier<T>

Direct Known Subclasses:
  DiscoverJavaModelFromJavaProject, DiscoverJavaModelFromProject

    public abstract class AbstractDiscoverJavaModelFromProject<T>
    extends AbstractRegionDiscoverer2<T>

Abstract class to discover a Java model from a project and optionally its libraries.

### Constructor Summary

Constructors
Constructor and Description
`AbstractDiscoverJavaModelFromProject()`

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`static java.util.List<java.lang.Object>` `computeDiscoverableElements(IJavaProject javaProject)`
`static ElementsToAnalyze` `computeElementsToDiscover(ElementsToAnalyze userElementsToAnalyze)`
`static java.util.Set<IPackageFragmentRoot>` `computeRequiredLibraries(IJavaProject project)`
`static java.util.Set<IJavaProject>` `computeRequiredProjects(IJavaProject project)`
`JavaFactory` `getEFactory()`
`void` `setDeepAnalysis(boolean deepAnalysis)`
`void` `setElementsToAnalyze(ElementsToAnalyze elementsToAnalyze)`
`void` `setExcludedElementsRegEx(java.lang.String excludedElementsRegEx)`
`void` `setIncludedElementsRegEx(java.lang.String includedElementsRegEx)`
`void` `setIncrementalMode(boolean incrementalMode)`
`void` `setLogJavaAnalysisWarnings(boolean logJavaAnalysisWarnings)`
`java.lang.String` `toString()`

### Methods inherited from class org.eclipse.modisco.kdm.source.extension.discovery.AbstractRegionDiscoverer2

`addSourceVisitListener, getSourceVisitListeners, notifySourceRegionVisited, notifySourceRegionVisited, removeSourceVisitListener`

### Methods inherited from class org.eclipse.modisco.infra.discovery.core.AbstractModelDiscoverer

`discoverElement, getDefaultTargetURI, getTargetModel, getTargetURI, setSerializeTarget, setTargetModel, setTargetURI`

### Methods inherited from class org.eclipse.modisco.infra.discovery.core.AbstractDiscoverer

`isAFolder, isAJavaProject, isAnIFileWithExtension, isAProject, setRefreshSourceBeforeDiscovery`

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Methods inherited from interface org.eclipse.modisco.infra.discovery.core.IDiscoverer

`isApplicableTo`

### Constructor Detail

#### AbstractDiscoverJavaModelFromProject

    public AbstractDiscoverJavaModelFromProject()

### Method Detail

#### setElementsToAnalyze

    @Parameter(name="ELEMENTS_TO_ANALYZE",
               description="The Java projects or packages that will be analyzed. ")
    public void setElementsToAnalyze(ElementsToAnalyze elementsToAnalyze)

#### setLogJavaAnalysisWarnings

    @Parameter(name="LOG_JAVA_ANALYSIS_WARNINGS",
               description="Whether to log warnings from java analysis.")
    public void setLogJavaAnalysisWarnings(boolean logJavaAnalysisWarnings)

#### setDeepAnalysis

    @Parameter(name="DEEP_ANALYSIS",
               description="If true, analyze method bodies. If false, only analyze fields and method signatures.")
    public void setDeepAnalysis(boolean deepAnalysis)

#### setIncrementalMode

    @Parameter(name="INCREMENTAL_MODE",
               description="Optimize memory use by analyzing incrementally (more time expensive).")
    public void setIncrementalMode(boolean incrementalMode)

#### setIncludedElementsRegEx

    @Parameter(name="INCLUDED_ELEMENTS_REGEX",
               description="A regular expression on qualified names for elements (types & packages) to be included during analysis")
    public void setIncludedElementsRegEx(java.lang.String includedElementsRegEx)

#### setExcludedElementsRegEx

    @Parameter(name="EXCLUDED_ELEMENTS_REGEX",
               description="A regular expression on qualified names for elements (types & packages) to be excluded during analysis")
    public void setExcludedElementsRegEx(java.lang.String excludedElementsRegEx)

#### getEFactory

    public JavaFactory getEFactory()

#### computeElementsToDiscover

    public static ElementsToAnalyze computeElementsToDiscover(ElementsToAnalyze userElementsToAnalyze)

#### computeDiscoverableElements

    public static java.util.List<java.lang.Object> computeDiscoverableElements(IJavaProject javaProject)

#### toString

    public java.lang.String toString()

Overrides:
  `toString` in class `java.lang.Object`

#### computeRequiredProjects

    public static java.util.Set<IJavaProject> computeRequiredProjects(IJavaProject project)
                                                               throws JavaModelException

Throws:
  `JavaModelException`

#### computeRequiredLibraries

    public static java.util.Set<IPackageFragmentRoot> computeRequiredLibraries(IJavaProject project)
                                                                        throws JavaModelException

Throws:
  `JavaModelException`