soot
Class Scene

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

public class Scene
extends java.lang.Object

Manages the SootClasses of the application being analyzed.


Method Summary
 void addClass(SootClass c)
           
 boolean allowsLazyResolving()
           
 boolean allowsPhantomRefs()
           
 java.util.Map computePhaseOptions(java.lang.String phaseName, java.lang.String optionsString)
           
 boolean containsClass(java.lang.String className)
           
 boolean containsField(java.lang.String fieldSignature)
           
 boolean containsMethod(java.lang.String methodSignature)
           
 Hierarchy getActiveHierarchy()
          Retrieves the active hierarchy for this method.
 InvokeGraph getActiveInvokeGraph()
          Retrieves the active invokeGraph for this method.
 Chain getApplicationClasses()
          Returns a chain of the application classes in this scene.
 Chain getClasses()
          Returns an backed chain of the classes in this manager.
 Chain getContextClasses()
          Returns a chain of the context classes in this scene.
 SootField getField(java.lang.String fieldSignature)
           
 StmtPrinter getJimpleStmtPrinter()
          Returns the current StmtPrinter class for Jimple.
 Chain getLibraryClasses()
          Returns a chain of the library classes in this scene.
 SootClass getMainClass()
           
 SootMethod getMethod(java.lang.String methodSignature)
           
 Pack getPack(java.lang.String phaseName)
           
 Chain getPhantomClasses()
          Returns a chain of the phantom classes in this scene.
 boolean getPhantomRefs()
           
 java.util.Map getPhaseOptions(java.lang.String phaseName)
          Returns the options map associated with phaseName.
 java.util.Set getReservedNames()
          Returns a set of tokens which are reserved.
 SootClass getSootClass(java.lang.String className)
          Returns the SootClass with the given className.
 java.lang.String getSootClassPath()
           
 int getState()
           
 boolean hasActiveHierarchy()
           
 boolean hasActiveInvokeGraph()
           
 SootClass loadClassAndSupport(java.lang.String className)
          Loads the given class and all of the required support classes.
 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 releaseActiveInvokeGraph()
           
 void removeClass(SootClass c)
           
 void reset()
          Resets this scene to zero.
 void setActiveHierarchy(Hierarchy hierarchy)
          Sets the active hierarchy for this method.
 void setActiveInvokeGraph(InvokeGraph invokeGraph)
          Sets the active invokeGraph for this method.
 void setJimpleStmtPrinter(StmtPrinter jsp)
          Sets the current StmtPrinter class for Jimple.
 void setLazyResolving(boolean value)
           
 void setMainClass(SootClass m)
           
 void setPhantomRefs(boolean value)
           
 void setSootClassPath(java.lang.String p)
           
static Scene v()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

reset

public void reset()
Resets this scene to zero.

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()

getPack

public Pack getPack(java.lang.String phaseName)

getState

public int getState()

getPhaseOptions

public java.util.Map getPhaseOptions(java.lang.String phaseName)
Returns the options map associated with phaseName. If a leading . is present in phaseName, strip it!

computePhaseOptions

public java.util.Map computePhaseOptions(java.lang.String phaseName,
                                         java.lang.String optionsString)

getJimpleStmtPrinter

public StmtPrinter getJimpleStmtPrinter()
Returns the current StmtPrinter class for Jimple.

setJimpleStmtPrinter

public void setJimpleStmtPrinter(StmtPrinter jsp)
Sets the current StmtPrinter class for Jimple.

addClass

public void addClass(SootClass c)

removeClass

public void removeClass(SootClass c)

containsClass

public boolean containsClass(java.lang.String className)

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.

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.

getContextClasses

public Chain getContextClasses()
Returns a chain of the context classes in this scene. These classes may not be analysed, typically for speed reasons.

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.

getActiveHierarchy

public Hierarchy getActiveHierarchy()
Retrieves the active hierarchy for this method.

setActiveHierarchy

public void setActiveHierarchy(Hierarchy hierarchy)
Sets the active hierarchy for this method.

hasActiveHierarchy

public boolean hasActiveHierarchy()

releaseActiveHierarchy

public void releaseActiveHierarchy()

getActiveInvokeGraph

public InvokeGraph getActiveInvokeGraph()
Retrieves the active invokeGraph for this method.

setActiveInvokeGraph

public void setActiveInvokeGraph(InvokeGraph invokeGraph)
Sets the active invokeGraph for this method.

hasActiveInvokeGraph

public boolean hasActiveInvokeGraph()

releaseActiveInvokeGraph

public void releaseActiveInvokeGraph()

getPhantomRefs

public boolean getPhantomRefs()

setPhantomRefs

public void setPhantomRefs(boolean value)

setLazyResolving

public void setLazyResolving(boolean value)

allowsPhantomRefs

public boolean allowsPhantomRefs()

allowsLazyResolving

public boolean allowsLazyResolving()