soot.jimple.spark.builder
Class StandardParms

java.lang.Object
  |
  +--soot.jimple.AbstractJimpleValueSwitch
        |
        +--soot.jimple.spark.builder.StandardParms

public class StandardParms
extends AbstractJimpleValueSwitch
implements Parms

Class implementing builder parameters (this decides what kinds of nodes should be built for each kind of Soot value).


Field Summary
protected  SootMethod currentMethod
           
protected  MethodPAG mpag
           
protected  PAG pag
           
 
Constructor Summary
StandardParms(PAG pag, MethodPAG mpag)
           
 
Method Summary
 void addCallTarget(Edge e)
          Adds a possible target of a call site.
 void addCallTarget(Stmt s, SootMethod target, java.lang.Object varNodeParameter)
          Adds method target as a possible target of the invoke expression in s.
 void addEdge(Node from, Node to)
          Add an edge from node from to node to.
 Node caseArgv()
          Node for the argv array parameter to main.
 Node caseArray(java.lang.Object base, ArrayType arrayType)
          Node for elements of array base of type arrayType.
 void caseArrayRef(ArrayRef ar)
           
 void caseCastExpr(CastExpr ce)
           
 void caseCaughtExceptionRef(CaughtExceptionRef cer)
           
 Node caseDefaultClassLoader()
          Node for the default ClassLoader, created by the VM.
 void caseInstanceFieldRef(InstanceFieldRef ifr)
           
 void caseLocal(Local l)
           
 Node caseMainClassNameString()
          Node for the String holding the name of the main class, created by the VM and passed to the class loader.
 Node caseMainThread()
          Node for the main thread of the program, created by the VM.
 Node caseMainThreadGroup()
          Node for the main ThreadGroup of the program, created by the VM.
 void caseNewArrayExpr(NewArrayExpr nae)
           
 void caseNewExpr(NewExpr ne)
           
 void caseNewMultiArrayExpr(NewMultiArrayExpr nmae)
           
 void caseNullConstant(NullConstant nr)
           
 void caseParameterRef(ParameterRef pr)
           
 Node caseParm(SootMethod m, int index)
          Node for index'th parameter of method m.
 Node caseRet(SootMethod m)
          Return node for method m.
 void caseStaticFieldRef(StaticFieldRef sfr)
           
 void caseStringConstant(StringConstant sc)
           
 Node caseThis(SootMethod m)
          This node for method m.
 void caseThisRef(ThisRef tr)
           
protected  Node caseThrow()
           
 void defaultCase(java.lang.Object v)
           
 Node getNode()
           
 void handleStmt(Stmt s)
          Adds the edges required for this statement to the graph.
 
Methods inherited from class soot.jimple.AbstractJimpleValueSwitch
caseAddExpr, caseAndExpr, caseCmpExpr, caseCmpgExpr, caseCmplExpr, caseDivExpr, caseDoubleConstant, caseEqExpr, caseFloatConstant, caseGeExpr, caseGtExpr, caseInstanceOfExpr, caseIntConstant, caseInterfaceInvokeExpr, caseLeExpr, caseLengthExpr, caseLongConstant, caseLtExpr, caseMulExpr, caseNeExpr, caseNegExpr, caseOrExpr, caseRemExpr, caseShlExpr, caseShrExpr, caseSpecialInvokeExpr, caseStaticInvokeExpr, caseSubExpr, caseUshrExpr, caseVirtualInvokeExpr, caseXorExpr, getResult, setResult
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

pag

protected PAG pag

mpag

protected MethodPAG mpag

currentMethod

protected SootMethod currentMethod
Constructor Detail

StandardParms

public StandardParms(PAG pag,
                     MethodPAG mpag)
Method Detail

addCallTarget

public final void addCallTarget(Edge e)
Description copied from interface: Parms
Adds a possible target of a call site.
Specified by:
addCallTarget in interface Parms

addCallTarget

public final void addCallTarget(Stmt s,
                                SootMethod target,
                                java.lang.Object varNodeParameter)
Adds method target as a possible target of the invoke expression in s. If target is null, only creates the nodes for the call site, without actually connecting them to any target method. TouchedNodes is an out parameter that is filled in with all the nodes to which edges were added by adding the target. It may be null if the caller does not need this information.
Specified by:
addCallTarget in interface Parms

handleStmt

public final void handleStmt(Stmt s)
Adds the edges required for this statement to the graph.
Specified by:
handleStmt in interface Parms

getNode

public final Node getNode()

addEdge

public final void addEdge(Node from,
                          Node to)
Description copied from interface: Parms
Add an edge from node from to node to.
Specified by:
addEdge in interface Parms

caseDefaultClassLoader

public final Node caseDefaultClassLoader()
Description copied from interface: Parms
Node for the default ClassLoader, created by the VM.
Specified by:
caseDefaultClassLoader in interface Parms

caseMainClassNameString

public final Node caseMainClassNameString()
Description copied from interface: Parms
Node for the String holding the name of the main class, created by the VM and passed to the class loader.
Specified by:
caseMainClassNameString in interface Parms

caseMainThreadGroup

public final Node caseMainThreadGroup()
Description copied from interface: Parms
Node for the main ThreadGroup of the program, created by the VM.
Specified by:
caseMainThreadGroup in interface Parms

caseMainThread

public final Node caseMainThread()
Description copied from interface: Parms
Node for the main thread of the program, created by the VM.
Specified by:
caseMainThread in interface Parms

caseArgv

public final Node caseArgv()
Description copied from interface: Parms
Node for the argv array parameter to main.
Specified by:
caseArgv in interface Parms

caseThis

public final Node caseThis(SootMethod m)
Description copied from interface: Parms
This node for method m.
Specified by:
caseThis in interface Parms

caseParm

public final Node caseParm(SootMethod m,
                           int index)
Description copied from interface: Parms
Node for index'th parameter of method m.
Specified by:
caseParm in interface Parms

caseRet

public final Node caseRet(SootMethod m)
Description copied from interface: Parms
Return node for method m.
Specified by:
caseRet in interface Parms

caseArray

public final Node caseArray(java.lang.Object base,
                            ArrayType arrayType)
Description copied from interface: Parms
Node for elements of array base of type arrayType.
Specified by:
caseArray in interface Parms

caseArrayRef

public final void caseArrayRef(ArrayRef ar)
Overrides:
caseArrayRef in class AbstractJimpleValueSwitch

caseCastExpr

public final void caseCastExpr(CastExpr ce)
Overrides:
caseCastExpr in class AbstractJimpleValueSwitch

caseCaughtExceptionRef

public final void caseCaughtExceptionRef(CaughtExceptionRef cer)
Overrides:
caseCaughtExceptionRef in class AbstractJimpleValueSwitch

caseInstanceFieldRef

public final void caseInstanceFieldRef(InstanceFieldRef ifr)
Overrides:
caseInstanceFieldRef in class AbstractJimpleValueSwitch

caseLocal

public final void caseLocal(Local l)
Overrides:
caseLocal in class AbstractJimpleValueSwitch

caseNewArrayExpr

public final void caseNewArrayExpr(NewArrayExpr nae)
Overrides:
caseNewArrayExpr in class AbstractJimpleValueSwitch

caseNewExpr

public final void caseNewExpr(NewExpr ne)
Overrides:
caseNewExpr in class AbstractJimpleValueSwitch

caseNewMultiArrayExpr

public final void caseNewMultiArrayExpr(NewMultiArrayExpr nmae)
Overrides:
caseNewMultiArrayExpr in class AbstractJimpleValueSwitch

caseParameterRef

public final void caseParameterRef(ParameterRef pr)
Overrides:
caseParameterRef in class AbstractJimpleValueSwitch

caseStaticFieldRef

public final void caseStaticFieldRef(StaticFieldRef sfr)
Overrides:
caseStaticFieldRef in class AbstractJimpleValueSwitch

caseStringConstant

public final void caseStringConstant(StringConstant sc)
Overrides:
caseStringConstant in class AbstractJimpleValueSwitch

caseThisRef

public final void caseThisRef(ThisRef tr)
Overrides:
caseThisRef in class AbstractJimpleValueSwitch

caseNullConstant

public final void caseNullConstant(NullConstant nr)
Overrides:
caseNullConstant in class AbstractJimpleValueSwitch

defaultCase

public final void defaultCase(java.lang.Object v)
Overrides:
defaultCase in class AbstractJimpleValueSwitch

caseThrow

protected Node caseThrow()