soot
Class Scene

java.lang.Object
  |
  +--soot.Scene

public class Scene
extends java.lang.Object

Manages the SootClasses of the application being analyzed.


Constructor Summary
Scene(Singletons.Global g)
           
 
Method Summary
 void addClass(SootClass c)
           
 void addRefType(RefType type)
          Returns the RefType with the given className.
 boolean allowsPhantomRefs()
           
 boolean containsClass(java.lang.String className)
           
 boolean containsField(java.lang.String fieldSignature)
           
 boolean containsMethod(java.lang.String methodSignature)
           
 Hierarchy getActiveHierarchy()
          Retrieves the active hierarchy
 Chain getApplicationClasses()
          Returns a chain of the application classes in this scene.
 CallGraph getCallGraph()
           
 Chain getClasses()
          Returns an backed chain of the classes in this manager.
 Numberer getClassNumberer()
           
 java.util.List getEntryPoints()
          Get the set of entry points that are used to build the call graph.
 FastHierarchy getFastHierarchy()
          Retrieves the active fast hierarchy
 SootField getField(java.lang.String fieldSignature)
           
 Chain getLibraryClasses()
          Returns a chain of the library classes in this scene.
 Numberer getLocalNumberer()
           
 SootClass getMainClass()
           
 SootMethod getMethod(java.lang.String methodSignature)
           
 Numberer getMethodNumberer()
           
 FastHierarchy getOrMakeFastHierarchy()
          Makes a new fast hierarchy is none is active, and returns the active fast hierarchy.
 Chain getPhantomClasses()
          Returns a chain of the phantom classes in this scene.
 boolean getPhantomRefs()
           
 PointsToAnalysis getPointsToAnalysis()
          Retrieves the active pointer analysis
 ReachableMethods getReachableMethods()
           
 RefType getRefType(java.lang.String className)
          Returns the RefType with the given className.
 java.util.Set getReservedNames()
          Returns a set of tokens which are reserved.
 SideEffectAnalysis getSideEffectAnalysis()
          Retrieves the active side-effect analysis
 SootClass getSootClass(java.lang.String className)
          Returns the SootClass with the given className.
 java.lang.String getSootClassPath()
           
 int getState()
           
 StringNumberer getSubSigNumberer()
           
 Numberer getTypeNumberer()
           
 boolean hasActiveHierarchy()
           
 boolean hasCallGraph()
           
 boolean hasFastHierarchy()
           
 boolean hasPointsToAnalysis()
           
 boolean hasReachableMethods()
           
 boolean hasSideEffectAnalysis()
           
 SootClass loadClassAndSupport(java.lang.String className)
          Loads the given class and all of the required support classes.
 void loadNecessaryClasses()
           
 java.lang.String quotedNameOf(java.lang.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 setEntryPoints(java.util.List 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 setPhantomRefs(boolean value)
           
 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(java.lang.String p)
           
 java.lang.String signatureToClass(java.lang.String sig)
           
 java.lang.String signatureToSubsignature(java.lang.String sig)
           
static Scene v()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Scene

public Scene(Singletons.Global g)
Method Detail

v

public static Scene v()

setMainClass

public void setMainClass(SootClass m)

getReservedNames

public java.util.Set getReservedNames()
Returns a set of tokens which are reserved. Any field, class, method, or local variable with such a name will be quoted.

quotedNameOf

public java.lang.String quotedNameOf(java.lang.String s)
If this name is in the set of reserved names, then return a quoted version of it. Else pass it through.

getMainClass

public SootClass getMainClass()

setSootClassPath

public void setSootClassPath(java.lang.String p)

getSootClassPath

public java.lang.String getSootClassPath()

getState

public int getState()

addClass

public void addClass(SootClass c)

removeClass

public void removeClass(SootClass c)

containsClass

public boolean containsClass(java.lang.String className)

signatureToClass

public java.lang.String signatureToClass(java.lang.String sig)

signatureToSubsignature

public java.lang.String signatureToSubsignature(java.lang.String sig)

containsField

public boolean containsField(java.lang.String fieldSignature)

containsMethod

public boolean containsMethod(java.lang.String methodSignature)

getField

public SootField getField(java.lang.String fieldSignature)

getMethod

public SootMethod getMethod(java.lang.String methodSignature)

loadClassAndSupport

public SootClass loadClassAndSupport(java.lang.String className)
Loads the given class and all of the required support classes. Returns the first class.

getRefType

public RefType getRefType(java.lang.String className)
Returns the RefType with the given className.

addRefType

public void addRefType(RefType type)
Returns the RefType with the given className.

getSootClass

public SootClass getSootClass(java.lang.String className)
Returns the SootClass with the given className.

getClasses

public Chain getClasses()
Returns an backed chain of the classes in this manager.

getApplicationClasses

public Chain getApplicationClasses()
Returns a chain of the application classes in this scene. These classes are the ones which can be freely analysed & modified.

getLibraryClasses

public Chain getLibraryClasses()
Returns a chain of the library classes in this scene. These classes can be analysed but not modified.

getPhantomClasses

public Chain getPhantomClasses()
Returns a chain of the phantom classes in this scene. These classes are referred to by other classes, but cannot be loaded.

getSideEffectAnalysis

public SideEffectAnalysis getSideEffectAnalysis()
Retrieves the active side-effect analysis

setSideEffectAnalysis

public void setSideEffectAnalysis(SideEffectAnalysis sea)
Sets the active side-effect analysis

hasSideEffectAnalysis

public boolean hasSideEffectAnalysis()

releaseSideEffectAnalysis

public void releaseSideEffectAnalysis()

getPointsToAnalysis

public PointsToAnalysis getPointsToAnalysis()
Retrieves the active pointer analysis

setPointsToAnalysis

public void setPointsToAnalysis(PointsToAnalysis pa)
Sets the active pointer analysis

hasPointsToAnalysis

public boolean hasPointsToAnalysis()

releasePointsToAnalysis

public void releasePointsToAnalysis()

getOrMakeFastHierarchy

public FastHierarchy getOrMakeFastHierarchy()
Makes a new fast hierarchy is none is active, and returns the active fast hierarchy.

getFastHierarchy

public FastHierarchy getFastHierarchy()
Retrieves the active fast hierarchy

setFastHierarchy

public void setFastHierarchy(FastHierarchy hierarchy)
Sets the active hierarchy

hasFastHierarchy

public boolean hasFastHierarchy()

releaseFastHierarchy

public void releaseFastHierarchy()

getActiveHierarchy

public Hierarchy getActiveHierarchy()
Retrieves the active hierarchy

setActiveHierarchy

public void setActiveHierarchy(Hierarchy hierarchy)
Sets the active hierarchy

hasActiveHierarchy

public boolean hasActiveHierarchy()

releaseActiveHierarchy

public void releaseActiveHierarchy()

getEntryPoints

public java.util.List getEntryPoints()
Get the set of entry points that are used to build the call graph.

setEntryPoints

public void setEntryPoints(java.util.List entryPoints)
Change the set of entry point methods used to build the call graph.

getCallGraph

public CallGraph getCallGraph()

setCallGraph

public void setCallGraph(CallGraph cg)

hasCallGraph

public boolean hasCallGraph()

releaseCallGraph

public void releaseCallGraph()

getReachableMethods

public ReachableMethods getReachableMethods()

setReachableMethods

public void setReachableMethods(ReachableMethods rm)

hasReachableMethods

public boolean hasReachableMethods()

releaseReachableMethods

public void releaseReachableMethods()

getPhantomRefs

public boolean getPhantomRefs()

setPhantomRefs

public void setPhantomRefs(boolean value)

allowsPhantomRefs

public boolean allowsPhantomRefs()

getTypeNumberer

public Numberer getTypeNumberer()

getMethodNumberer

public Numberer getMethodNumberer()

getClassNumberer

public Numberer getClassNumberer()

getSubSigNumberer

public StringNumberer getSubSigNumberer()

getLocalNumberer

public Numberer getLocalNumberer()

loadNecessaryClasses

public void loadNecessaryClasses()