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
Nested ClassesModifier and TypeClassDescriptionstatic enumstatic interfacestatic enumEclipse projects are modeled with 3 loaders, as described above. -
Field Summary
FieldsModifier 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
ConstructorsModifierConstructorDescriptionprotected -
Method Summary
Modifier and TypeMethodDescriptioncreate(org.eclipse.core.resources.IProject project) getModules(EclipseProjectPath.ILoader loader) protected booleanstatic org.eclipse.core.runtime.IPathmakeAbsolute(org.eclipse.core.runtime.IPath p) protected abstract PmakeProject(org.eclipse.core.resources.IProject p) protected abstract Eprotected voidresolveClasspathEntries(P project, List<E> l, EclipseProjectPath.ILoader loader, boolean includeSource, boolean entriesFromTopLevelProject) protected abstract voidresolveClasspathEntry(P project, E entry, EclipseProjectPath.ILoader loader, boolean includeSource, boolean cpeFromMainProject) protected voidresolveLibraryPathEntry(EclipseProjectPath.ILoader loader, org.eclipse.core.runtime.IPath p) protected abstract voidresolveProjectClasspathEntries(P project, boolean includeSource) protected voidresolveProjectPathEntry(boolean includeSource, org.eclipse.core.runtime.IPath p) protected voidresolveSourcePathEntry(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.CoreExceptionIOException
-
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
-