|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.ibm.wala.ipa.callgraph.AnalysisScope
public class AnalysisScope
Base class that represents a set of files to analyze. The analysis scope is partitioned by class loader. There are three pre-defined class loader scopes:
rt.jar, the core classes)
| Field Summary | |
|---|---|
static Atom |
APPLICATION
|
static Atom |
EXTENSION
|
protected java.util.LinkedHashMap<Atom,ClassLoaderReference> |
loadersByName
map: Atom -> ClassLoaderReference |
static Atom |
PRIMORDIAL
|
static Atom |
SYNTHETIC
|
| Constructor Summary | |
|---|---|
AnalysisScope()
|
|
| Method Summary | |
|---|---|
void |
addClassFileToScope(ClassLoaderReference loader,
java.io.File file)
Add a class file to the scope for a loader |
void |
addSourceFileToScope(ClassLoaderReference loader,
java.io.File file,
java.lang.String fileName)
Add a class file to the scope for a loader |
void |
addToScope(ClassLoaderReference loader,
java.util.jar.JarFile file)
Add a jar file to the scope for a loader |
void |
addToScope(ClassLoaderReference loader,
Module m)
Add a module to the scope for a loader |
protected ClassLoaderReference |
classLoaderName2Ref(java.lang.String clName)
Method classLoaderName2Ref. |
MethodReference |
findMethod(Atom loader,
java.lang.String klass,
Atom name,
ImmutableByteArray desc)
Utility function. |
ClassLoaderReference |
getApplicationLoader()
Return the information regarding the application loader. |
ArrayClassLoader |
getArrayClassLoader()
|
SetOfClasses |
getExclusions()
|
protected java.lang.Object |
getExclusionString()
|
ClassLoaderReference |
getExtensionLoader()
Return the information regarding the extension loader. |
java.lang.String |
getJavaLibraryVersion()
|
ClassLoaderReference |
getLoader(Atom name)
|
java.lang.String |
getLoaderImpl(ClassLoaderReference ref)
|
java.util.Collection<ClassLoaderReference> |
getLoaders()
|
java.util.Set<Module> |
getModules(ClassLoaderReference loader)
|
int |
getNumberOfLoaders()
|
ClassLoaderReference |
getPrimordialLoader()
Return the information regarding the primordial loader. |
ClassLoaderReference |
getSyntheticLoader()
Return the information regarding the application loader. |
boolean |
isJava14Libraries()
|
boolean |
isJava15Libraries()
|
void |
setExclusions(SetOfClasses classes)
|
protected void |
setLoaderImpl(ClassLoaderReference ref,
java.lang.String implClass)
|
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final Atom PRIMORDIAL
public static final Atom EXTENSION
public static final Atom APPLICATION
public static final Atom SYNTHETIC
protected java.util.LinkedHashMap<Atom,ClassLoaderReference> loadersByName
| Constructor Detail |
|---|
public AnalysisScope()
| Method Detail |
|---|
public ClassLoaderReference getPrimordialLoader()
public ClassLoaderReference getExtensionLoader()
public ClassLoaderReference getApplicationLoader()
public ClassLoaderReference getSyntheticLoader()
public void addSourceFileToScope(ClassLoaderReference loader,
java.io.File file,
java.lang.String fileName)
throws java.lang.IllegalArgumentException
loader - file -
java.lang.IllegalArgumentException
public void addClassFileToScope(ClassLoaderReference loader,
java.io.File file)
throws java.lang.IllegalArgumentException
loader - file -
java.lang.IllegalArgumentException
public void addToScope(ClassLoaderReference loader,
java.util.jar.JarFile file)
loader - file -
public void addToScope(ClassLoaderReference loader,
Module m)
loader - m -
public ClassLoaderReference getLoader(Atom name)
throws java.lang.IllegalArgumentException
name.
java.lang.IllegalArgumentException - if name is nullprotected ClassLoaderReference classLoaderName2Ref(java.lang.String clName)
clName -
public java.lang.String getLoaderImpl(ClassLoaderReference ref)
protected void setLoaderImpl(ClassLoaderReference ref,
java.lang.String implClass)
public java.util.Collection<ClassLoaderReference> getLoaders()
public int getNumberOfLoaders()
public SetOfClasses getExclusions()
public void setExclusions(SetOfClasses classes)
public java.lang.String toString()
toString in class java.lang.Objectprotected java.lang.Object getExclusionString()
public MethodReference findMethod(Atom loader,
java.lang.String klass,
Atom name,
ImmutableByteArray desc)
public java.util.Set<Module> getModules(ClassLoaderReference loader)
public ArrayClassLoader getArrayClassLoader()
public java.lang.String getJavaLibraryVersion()
throws java.lang.IllegalStateException
java.lang.IllegalStateException
public boolean isJava15Libraries()
throws java.lang.IllegalStateException
java.lang.IllegalStateException
public boolean isJava14Libraries()
throws java.lang.IllegalStateException
java.lang.IllegalStateException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||