public class SparkLibraryHelper extends TypeSwitch
TypeSwitch can be used to add library behavior to the PAG. It
adds allocation nodes with AnySubType of the declared type to the
target node.| Constructor and Description |
|---|
SparkLibraryHelper(PAG pag,
Node node,
SootMethod method)
The constructor for this
TypeSwitch. |
| Modifier and Type | Method and Description |
|---|---|
void |
caseArrayType(ArrayType type)
|
void |
caseRefType(RefType t)
|
caseAnySubType, caseBooleanType, caseByteType, caseCharType, caseDefault, caseDoubleType, caseErroneousType, caseFloatType, caseIntType, caseLongType, caseNullType, caseShortType, caseStmtAddressType, caseUnknownType, caseVoidType, defaultCase, getResult, setResultpublic SparkLibraryHelper(PAG pag, Node node, SootMethod method)
TypeSwitch.pag - the pointer assignment graph in that the new edges and nodes
should be added into.node - the node of the value for which allocations should be made.method - the method in which the allocations should take place. This
parameter can be null.public void caseRefType(RefType t)
node of type RefType. For this new
local an allocation edge to AnySubType of its declared type will
be added.caseRefType in class TypeSwitchpublic void caseArrayType(ArrayType type)
node of type ArrayType. For this new
local an allocation edge to a new array of its declared type will be
added. If the ArrayType.getElementType() is still an array an
allocation to a new array of this element type will be made and stored
until the element type is a RefType. If this is the case an
allocation to AnySubType of ArrayType.baseType will be
made.caseArrayType in class TypeSwitch