|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object soot.Scene
public class Scene
Manages the SootClasses of the application being analyzed.
Field Summary | |
---|---|
protected LinkedList<String> |
excludedPackages
|
Constructor Summary | |
---|---|
Scene(Singletons.Global g)
|
Method Summary | |
---|---|
void |
addBasicClass(String name)
|
void |
addBasicClass(String name,
int level)
|
void |
addClass(SootClass c)
|
void |
addRefType(RefType type)
Returns the RefType with the given className. |
boolean |
allowsPhantomRefs()
|
boolean |
containsClass(String className)
|
boolean |
containsField(String fieldSignature)
|
boolean |
containsMethod(String methodSignature)
|
boolean |
containsType(String className)
|
String |
defaultClassPath()
|
boolean |
doneResolving()
|
Collection<SootClass> |
dynamicClasses()
|
SootClass |
forceResolve(String className,
int level)
|
Hierarchy |
getActiveHierarchy()
Retrieves the active hierarchy |
Chain<SootClass> |
getApplicationClasses()
Returns a chain of the application classes in this scene. |
Set<String> |
getBasicClasses()
|
CallGraph |
getCallGraph()
|
Chain<SootClass> |
getClasses()
Returns an backed chain of the classes in this manager. |
List<SootClass> |
getClasses(int desiredLevel)
Returns the list of SootClasses that have been resolved at least to the level specified. |
ArrayNumberer |
getClassNumberer()
|
Numberer |
getContextNumberer()
|
ContextSensitiveCallGraph |
getContextSensitiveCallGraph()
|
ThrowAnalysis |
getDefaultThrowAnalysis()
Returns the ThrowAnalysis to be used by default when
constructing CFGs which include exceptional control flow. |
List<SootMethod> |
getEntryPoints()
Get the set of entry points that are used to build the call graph. |
FastHierarchy |
getFastHierarchy()
Retrieves the active fast hierarchy |
SootField |
getField(String fieldSignature)
|
ArrayNumberer |
getFieldNumberer()
|
Chain<SootClass> |
getLibraryClasses()
Returns a chain of the library classes in this scene. |
ArrayNumberer |
getLocalNumberer()
|
SootClass |
getMainClass()
|
SootMethod |
getMainMethod()
|
SootMethod |
getMethod(String methodSignature)
|
ArrayNumberer |
getMethodNumberer()
|
RefType |
getObjectType()
Returns the RefType for Object . |
FastHierarchy |
getOrMakeFastHierarchy()
Makes a new fast hierarchy is none is active, and returns the active fast hierarchy. |
Chain<SootClass> |
getPhantomClasses()
Returns a chain of the phantom classes in this scene. |
boolean |
getPhantomRefs()
|
ArrayList<String> |
getPkgList()
|
PointsToAnalysis |
getPointsToAnalysis()
Retrieves the active pointer analysis |
ReachableMethods |
getReachableMethods()
|
RefType |
getRefType(String className)
Returns the RefType with the given className. |
Set<String> |
getReservedNames()
Returns a set of tokens which are reserved. |
SideEffectAnalysis |
getSideEffectAnalysis()
Retrieves the active side-effect analysis |
SootClass |
getSootClass(String className)
Returns the SootClass with the given className. |
String |
getSootClassPath()
|
int |
getState()
|
StringNumberer |
getSubSigNumberer()
|
ArrayNumberer |
getTypeNumberer()
|
Numberer |
getUnitNumberer()
|
boolean |
hasActiveHierarchy()
|
boolean |
hasCallGraph()
|
boolean |
hasCustomEntryPoints()
|
boolean |
hasFastHierarchy()
|
boolean |
hasMainClass()
|
boolean |
hasPointsToAnalysis()
|
boolean |
hasReachableMethods()
|
boolean |
hasSideEffectAnalysis()
|
void |
incrementalBuildFinished()
|
void |
initiateIncrementalBuild()
|
boolean |
isExcluded(SootClass sc)
|
boolean |
isIncrementalBuild()
This method returns true when in incremental build mode. |
Numberer |
kindNumberer()
|
void |
loadBasicClasses()
Load just the set of basic classes soot needs, ignoring those specified on the command-line. |
SootClass |
loadClass(String className,
int desiredLevel)
|
SootClass |
loadClassAndSupport(String className)
Loads the given class and all of the required support classes. |
void |
loadDynamicClasses()
|
void |
loadNecessaryClasses()
Load the set of classes that soot needs, including those specified on the command-line. |
SootMethodRef |
makeConstructorRef(SootClass declaringClass,
List<Type> parameterTypes)
Create an unresolved reference to a constructor. |
SootFieldRef |
makeFieldRef(SootClass declaringClass,
String name,
Type type,
boolean isStatic)
Create an unresolved reference to a field. |
SootMethodRef |
makeMethodRef(SootClass declaringClass,
String name,
List<Type> parameterTypes,
Type returnType,
boolean isStatic)
Create an unresolved reference to a method. |
String |
quotedNameOf(String s)
If this name is in the set of reserved names, then return a quoted version of it. |
void |
releaseActiveHierarchy()
|
void |
releaseCallGraph()
|
void |
releaseFastHierarchy()
|
void |
releasePointsToAnalysis()
|
void |
releaseReachableMethods()
|
void |
releaseSideEffectAnalysis()
|
void |
removeClass(SootClass c)
|
void |
setActiveHierarchy(Hierarchy hierarchy)
Sets the active hierarchy |
void |
setCallGraph(CallGraph cg)
|
void |
setContextNumberer(Numberer n)
|
void |
setContextSensitiveCallGraph(ContextSensitiveCallGraph cscg)
|
void |
setDefaultThrowAnalysis(ThrowAnalysis ta)
Sets the ThrowAnalysis to be used by default when
constructing CFGs which include exceptional control flow. |
void |
setDoneResolving()
|
void |
setEntryPoints(List<SootMethod> entryPoints)
Change the set of entry point methods used to build the call graph. |
void |
setFastHierarchy(FastHierarchy hierarchy)
Sets the active hierarchy |
void |
setMainClass(SootClass m)
|
void |
setMainClassFromOptions()
|
void |
setPhantomRefs(boolean value)
|
void |
setPkgList(ArrayList<String> list)
|
void |
setPointsToAnalysis(PointsToAnalysis pa)
Sets the active pointer analysis |
void |
setReachableMethods(ReachableMethods rm)
|
void |
setSideEffectAnalysis(SideEffectAnalysis sea)
Sets the active side-effect analysis |
void |
setSootClassPath(String p)
|
String |
signatureToClass(String sig)
|
String |
signatureToSubsignature(String sig)
|
SootClass |
tryLoadClass(String className,
int desiredLevel)
Attempts to load the given class and all of the required support classes. |
static Scene |
v()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected LinkedList<String> excludedPackages
Constructor Detail |
---|
public Scene(Singletons.Global g)
Method Detail |
---|
public static Scene v()
public void setMainClass(SootClass m)
public Set<String> getReservedNames()
public String quotedNameOf(String s)
public boolean hasMainClass()
public SootClass getMainClass()
public SootMethod getMainMethod()
public void setSootClassPath(String p)
public String getSootClassPath()
public String defaultClassPath()
public int getState()
public void addClass(SootClass c)
public void removeClass(SootClass c)
public boolean containsClass(String className)
public boolean containsType(String className)
public String signatureToClass(String sig)
public String signatureToSubsignature(String sig)
public boolean containsField(String fieldSignature)
public boolean containsMethod(String methodSignature)
public SootField getField(String fieldSignature)
public SootMethod getMethod(String methodSignature)
public SootClass tryLoadClass(String className, int desiredLevel)
public SootClass loadClassAndSupport(String className)
public SootClass loadClass(String className, int desiredLevel)
public RefType getRefType(String className)
IllegalStateException
- if the RefType for this class cannot be found.
Use containsType(String)
to check if type is registeredpublic RefType getObjectType()
RefType
for Object
.
public void addRefType(RefType type)
public SootClass getSootClass(String className)
public Chain<SootClass> getClasses()
public Chain<SootClass> getApplicationClasses()
public Chain<SootClass> getLibraryClasses()
public Chain<SootClass> getPhantomClasses()
public SideEffectAnalysis getSideEffectAnalysis()
public void setSideEffectAnalysis(SideEffectAnalysis sea)
public boolean hasSideEffectAnalysis()
public void releaseSideEffectAnalysis()
public PointsToAnalysis getPointsToAnalysis()
public void setPointsToAnalysis(PointsToAnalysis pa)
public boolean hasPointsToAnalysis()
public void releasePointsToAnalysis()
public FastHierarchy getOrMakeFastHierarchy()
public FastHierarchy getFastHierarchy()
public void setFastHierarchy(FastHierarchy hierarchy)
public boolean hasFastHierarchy()
public void releaseFastHierarchy()
public Hierarchy getActiveHierarchy()
public void setActiveHierarchy(Hierarchy hierarchy)
public boolean hasActiveHierarchy()
public void releaseActiveHierarchy()
public boolean hasCustomEntryPoints()
public List<SootMethod> getEntryPoints()
public void setEntryPoints(List<SootMethod> entryPoints)
public ContextSensitiveCallGraph getContextSensitiveCallGraph()
public void setContextSensitiveCallGraph(ContextSensitiveCallGraph cscg)
public CallGraph getCallGraph()
public void setCallGraph(CallGraph cg)
public boolean hasCallGraph()
public void releaseCallGraph()
public ReachableMethods getReachableMethods()
public void setReachableMethods(ReachableMethods rm)
public boolean hasReachableMethods()
public void releaseReachableMethods()
public boolean getPhantomRefs()
public void setPhantomRefs(boolean value)
public boolean allowsPhantomRefs()
public Numberer kindNumberer()
public ArrayNumberer getTypeNumberer()
public ArrayNumberer getMethodNumberer()
public Numberer getContextNumberer()
public Numberer getUnitNumberer()
public ArrayNumberer getFieldNumberer()
public ArrayNumberer getClassNumberer()
public StringNumberer getSubSigNumberer()
public ArrayNumberer getLocalNumberer()
public void setContextNumberer(Numberer n)
public ThrowAnalysis getDefaultThrowAnalysis()
ThrowAnalysis
to be used by default when
constructing CFGs which include exceptional control flow.
ThrowAnalysis
public void setDefaultThrowAnalysis(ThrowAnalysis ta)
ThrowAnalysis
to be used by default when
constructing CFGs which include exceptional control flow.
the
- default ThrowAnalysis
.public void addBasicClass(String name)
public void addBasicClass(String name, int level)
public void loadBasicClasses()
public Set<String> getBasicClasses()
public Collection<SootClass> dynamicClasses()
public void loadNecessaryClasses()
public void loadDynamicClasses()
public boolean isExcluded(SootClass sc)
public void setPkgList(ArrayList<String> list)
public ArrayList<String> getPkgList()
public SootMethodRef makeMethodRef(SootClass declaringClass, String name, List<Type> parameterTypes, Type returnType, boolean isStatic)
public SootMethodRef makeConstructorRef(SootClass declaringClass, List<Type> parameterTypes)
public SootFieldRef makeFieldRef(SootClass declaringClass, String name, Type type, boolean isStatic)
public List<SootClass> getClasses(int desiredLevel)
public boolean doneResolving()
public void setDoneResolving()
public void setMainClassFromOptions()
public boolean isIncrementalBuild()
public void initiateIncrementalBuild()
public void incrementalBuildFinished()
public SootClass forceResolve(String className, int level)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |