Class EclipseProjectPath<E,P>
java.lang.Object
com.ibm.wala.ide.util.EclipseProjectPath<E,P>
- Direct Known Subclasses:
JavaEclipseProjectPath
,JavaScriptEclipseProjectPath
Representation of an analysis scope from an Eclipse project.
We set up classloaders as follows:
- The project being analyzed is in the Application Loader
- Frameworks, application libraries, and linked projects on which the main project depends are in the Extension loader
- System libraries are in the primordial loader.
- All source modules go in a special Source loader. This includes source from linked projects if SOURCE_FOR_PROJ_AND_LINKED_PROJS is specified.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
static interface
static enum
Eclipse projects are modeled with 3 loaders, as described above. -
Field Summary
Modifier and TypeFieldDescriptionprotected final Collection
<E> Classpath entries that have already been resolved and added to the scope.protected final Map
<EclipseProjectPath.ILoader, List<Module>> -
Constructor Summary
ModifierConstructorDescriptionprotected
-
Method Summary
Modifier and TypeMethodDescriptioncreate
(org.eclipse.core.resources.IProject project) getModules
(EclipseProjectPath.ILoader loader) protected boolean
static org.eclipse.core.runtime.IPath
makeAbsolute
(org.eclipse.core.runtime.IPath p) protected abstract P
makeProject
(org.eclipse.core.resources.IProject p) protected abstract E
protected void
resolveClasspathEntries
(P project, List<E> l, EclipseProjectPath.ILoader loader, boolean includeSource, boolean entriesFromTopLevelProject) protected abstract void
resolveClasspathEntry
(P project, E entry, EclipseProjectPath.ILoader loader, boolean includeSource, boolean cpeFromMainProject) protected void
resolveLibraryPathEntry
(EclipseProjectPath.ILoader loader, org.eclipse.core.runtime.IPath p) protected abstract void
resolveProjectClasspathEntries
(P project, boolean includeSource) protected void
resolveProjectPathEntry
(boolean includeSource, org.eclipse.core.runtime.IPath p) protected void
resolveSourcePathEntry
(EclipseProjectPath.ILoader loader, boolean includeSource, boolean cpeFromMainProject, org.eclipse.core.runtime.IPath p, org.eclipse.core.runtime.IPath o, org.eclipse.core.runtime.IPath[] excludePaths, String fileExtension) toAnalysisScope
(AnalysisScope scope) toAnalysisScope
(File exclusionsFile) toAnalysisScope
(ClassLoader classLoader, File exclusionsFile) Convert this path to a WALA analysis scopetoString()
-
Field Details
-
modules
-
alreadyResolved
Classpath entries that have already been resolved and added to the scope.
-
-
Constructor Details
-
EclipseProjectPath
-
-
Method Details
-
makeProject
-
resolve
-
resolveClasspathEntry
protected abstract void resolveClasspathEntry(P project, E entry, EclipseProjectPath.ILoader loader, boolean includeSource, boolean cpeFromMainProject) -
resolveProjectClasspathEntries
-
create
public EclipseProjectPath<E,P> create(org.eclipse.core.resources.IProject project) throws org.eclipse.core.runtime.CoreException, IOException - Throws:
org.eclipse.core.runtime.CoreException
IOException
-
resolveLibraryPathEntry
protected void resolveLibraryPathEntry(EclipseProjectPath.ILoader loader, org.eclipse.core.runtime.IPath p) -
resolveSourcePathEntry
protected void resolveSourcePathEntry(EclipseProjectPath.ILoader loader, boolean includeSource, boolean cpeFromMainProject, org.eclipse.core.runtime.IPath p, org.eclipse.core.runtime.IPath o, org.eclipse.core.runtime.IPath[] excludePaths, String fileExtension) -
resolveProjectPathEntry
protected void resolveProjectPathEntry(boolean includeSource, org.eclipse.core.runtime.IPath p) -
isPrimordialJarFile
- Parameters:
j
- The jar file in question.- Returns:
- true if the given jar file should be handled by the Primordial loader. If false, other provisions should be made to add the jar file to the appropriate component of the AnalysisScope. Subclasses can override this method.
-
resolveClasspathEntries
protected void resolveClasspathEntries(P project, List<E> l, EclipseProjectPath.ILoader loader, boolean includeSource, boolean entriesFromTopLevelProject) -
makeAbsolute
public static org.eclipse.core.runtime.IPath makeAbsolute(org.eclipse.core.runtime.IPath p) -
toAnalysisScope
public AnalysisScope toAnalysisScope(ClassLoader classLoader, File exclusionsFile) throws IOException Convert this path to a WALA analysis scope- Throws:
IOException
-
toAnalysisScope
-
toAnalysisScope
- Throws:
IOException
-
toAnalysisScope
- Throws:
IOException
-
getModules
-
toString
-