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)
           
 void addRefType(RefType type)
          Returns the RefType with the given className.
 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)
           
 FastHierarchy getActiveFastHierarchy()
          Retrieves the active fast hierarchy
 Hierarchy getActiveHierarchy()
          Retrieves the active hierarchy
 InvokeGraph getActiveInvokeGraph()
          Retrieves the active invokeGraph for this method.
 PointsToAnalysis getActivePointsToAnalysis()
          Retrieves the active pointer analysis
 soot.jimple.toolkits.pointer.SideEffectAnalysis getActiveSideEffectAnalysis()
          Retrieves the active side-effect analysis
 Chain getApplicationClasses()
          Returns a chain of the application classes in this scene.
 Chain getClasses()
          Returns an backed chain of the classes in this manager.
 Numberer getClassNumberer()
           
 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.
 Numberer getLocalNumberer()
           
 LocalPrinter getLocalPrinter()
           
 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.
 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.
 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.
 SootClass getSootClass(java.lang.String className)
          Returns the SootClass with the given className.
 java.lang.String getSootClassPath()
           
 int getState()
           
 StringNumberer getSubSigNumberer()
           
 Numberer getTypeNumberer()
           
 boolean hasActiveFastHierarchy()
           
 boolean hasActiveHierarchy()
           
 boolean hasActiveInvokeGraph()
           
 boolean hasActivePointsToAnalysis()
           
 boolean hasActiveSideEffectAnalysis()
           
 boolean hasPack(java.lang.String phaseName)
           
 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 releaseActiveFastHierarchy()
           
 void releaseActiveHierarchy()
           
 void releaseActiveInvokeGraph()
           
 void releaseActivePointsToAnalysis()
           
 void releaseActiveSideEffectAnalysis()
           
 void removeClass(SootClass c)
           
 void reset()
          Resets this scene to zero.
 void setActiveFastHierarchy(FastHierarchy hierarchy)
          Sets the active hierarchy
 void setActiveHierarchy(Hierarchy hierarchy)
          Sets the active hierarchy
 void setActiveInvokeGraph(InvokeGraph invokeGraph)
          Sets the active invokeGraph for this method.
 void setActivePointsToAnalysis(PointsToAnalysis pa)
          Sets the active pointer analysis
 void setActiveSideEffectAnalysis(soot.jimple.toolkits.pointer.SideEffectAnalysis sea)
          Sets the active side-effect analysis
 void setJimpleStmtPrinter(StmtPrinter jsp)
          Sets the current StmtPrinter class for Jimple.
 void setLazyResolving(boolean value)
           
 void setLocalPrinter(LocalPrinter lp)
           
 void setMainClass(SootClass m)
           
 void setPhantomRefs(boolean value)
           
 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
 

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

hasPack

public boolean hasPack(java.lang.String phaseName)

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.

getLocalPrinter

public LocalPrinter getLocalPrinter()

setJimpleStmtPrinter

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

setLocalPrinter

public void setLocalPrinter(LocalPrinter lp)

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.

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.

getActiveSideEffectAnalysis

public soot.jimple.toolkits.pointer.SideEffectAnalysis getActiveSideEffectAnalysis()
Retrieves the active side-effect analysis

setActiveSideEffectAnalysis

public void setActiveSideEffectAnalysis(soot.jimple.toolkits.pointer.SideEffectAnalysis sea)
Sets the active side-effect analysis

hasActiveSideEffectAnalysis

public boolean hasActiveSideEffectAnalysis()

releaseActiveSideEffectAnalysis

public void releaseActiveSideEffectAnalysis()

getActivePointsToAnalysis

public PointsToAnalysis getActivePointsToAnalysis()
Retrieves the active pointer analysis

setActivePointsToAnalysis

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

hasActivePointsToAnalysis

public boolean hasActivePointsToAnalysis()

releaseActivePointsToAnalysis

public void releaseActivePointsToAnalysis()

getOrMakeFastHierarchy

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

getActiveFastHierarchy

public FastHierarchy getActiveFastHierarchy()
Retrieves the active fast hierarchy

setActiveFastHierarchy

public void setActiveFastHierarchy(FastHierarchy hierarchy)
Sets the active hierarchy

hasActiveFastHierarchy

public boolean hasActiveFastHierarchy()

releaseActiveFastHierarchy

public void releaseActiveFastHierarchy()

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

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

getTypeNumberer

public Numberer getTypeNumberer()

getMethodNumberer

public Numberer getMethodNumberer()

getClassNumberer

public Numberer getClassNumberer()

getSubSigNumberer

public StringNumberer getSubSigNumberer()

getLocalNumberer

public Numberer getLocalNumberer()