com.ibm.wala.eclipse.util
Class EclipseProjectPath

java.lang.Object
  extended by com.ibm.wala.eclipse.util.EclipseProjectPath

public class EclipseProjectPath
extends java.lang.Object

Representation of an analysis scope from an Eclipse project. We set up classloaders as follows:


Nested Class Summary
static class EclipseProjectPath.Loader
           
 
Field Summary
static Atom SOURCE
          TODO: do we really need this? Why shouldn't source files come from a "normal" class loader like any other resource?
static ClassLoaderReference SOURCE_REF
           
 
Method Summary
 java.util.Collection<Module> getModules(EclipseProjectPath.Loader loader, boolean binary)
           
static EclipseProjectPath make(org.eclipse.core.runtime.IPath workspaceRootPath, org.eclipse.jdt.core.IJavaProject project)
           
protected  org.eclipse.core.runtime.IPath makeAbsolute(org.eclipse.core.runtime.IPath p)
           
protected  void resolveClasspathEntries(org.eclipse.jdt.core.IClasspathEntry[] entries, EclipseProjectPath.Loader loader, java.lang.String fileExtension)
           
 void resolveProjectClasspathEntries()
          If file extension is not provided, use system default
 void resolveProjectClasspathEntries(java.lang.String fileExtension)
          If file extension is provided, use that to resolve source files in the classpath
 AnalysisScope toAnalysisScope(java.lang.ClassLoader classLoader, java.io.File exclusionsFile)
          Convert this path to a WALA analysis scope
 AnalysisScope toAnalysisScope(java.io.File exclusionsFile)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

SOURCE

public static final Atom SOURCE
TODO: do we really need this? Why shouldn't source files come from a "normal" class loader like any other resource?


SOURCE_REF

public static final ClassLoaderReference SOURCE_REF
Method Detail

make

public static EclipseProjectPath make(org.eclipse.core.runtime.IPath workspaceRootPath,
                                      org.eclipse.jdt.core.IJavaProject project)
                               throws org.eclipse.jdt.core.JavaModelException,
                                      java.io.IOException
Throws:
org.eclipse.jdt.core.JavaModelException
java.io.IOException

resolveClasspathEntries

protected void resolveClasspathEntries(org.eclipse.jdt.core.IClasspathEntry[] entries,
                                       EclipseProjectPath.Loader loader,
                                       java.lang.String fileExtension)
                                throws org.eclipse.jdt.core.JavaModelException,
                                       java.io.IOException
Throws:
org.eclipse.jdt.core.JavaModelException
java.io.IOException

makeAbsolute

protected org.eclipse.core.runtime.IPath makeAbsolute(org.eclipse.core.runtime.IPath p)

resolveProjectClasspathEntries

public void resolveProjectClasspathEntries()
                                    throws org.eclipse.jdt.core.JavaModelException,
                                           java.io.IOException
If file extension is not provided, use system default

Throws:
org.eclipse.jdt.core.JavaModelException
java.io.IOException

resolveProjectClasspathEntries

public void resolveProjectClasspathEntries(java.lang.String fileExtension)
                                    throws org.eclipse.jdt.core.JavaModelException,
                                           java.io.IOException
If file extension is provided, use that to resolve source files in the classpath

Parameters:
fileExtension -
Throws:
org.eclipse.jdt.core.JavaModelException
java.io.IOException

toAnalysisScope

public AnalysisScope toAnalysisScope(java.lang.ClassLoader classLoader,
                                     java.io.File exclusionsFile)
Convert this path to a WALA analysis scope


toAnalysisScope

public AnalysisScope toAnalysisScope(java.io.File exclusionsFile)

getModules

public java.util.Collection<Module> getModules(EclipseProjectPath.Loader loader,
                                               boolean binary)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object