Package soot.jimple.spark.internal
Class SparkLibraryHelper
- java.lang.Object
-
- soot.TypeSwitch
-
- soot.jimple.spark.internal.SparkLibraryHelper
-
- All Implemented Interfaces:
Switch
public class SparkLibraryHelper extends TypeSwitch
ThisTypeSwitchcan be used to add library behavior to the PAG. It adds allocation nodes withAnySubTypeof the declared type to the target node.- Author:
- Florian Kuebler
-
-
Constructor Summary
Constructors Constructor Description SparkLibraryHelper(PAG pag, Node node, SootMethod method)The constructor for thisTypeSwitch.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcaseArrayType(ArrayType type)A new local array will be created and connected tonodeof typeArrayType.voidcaseRefType(RefType t)A new local will be created and connected tonodeof typeRefType.-
Methods inherited from class soot.TypeSwitch
caseAnySubType, caseBooleanType, caseByteType, caseCharType, caseDecimalType, caseDefault, caseDoubleType, caseErroneousType, caseFloatType, caseIntType, caseLongType, caseNullType, caseShortType, caseStmtAddressType, caseUByteType, caseUIntType, caseULongType, caseUnknownType, caseUShortType, caseVoidType, defaultCase, getResult, setResult
-
-
-
-
Constructor Detail
-
SparkLibraryHelper
public SparkLibraryHelper(PAG pag, Node node, SootMethod method)
The constructor for thisTypeSwitch.- Parameters:
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.
-
-
Method Detail
-
caseRefType
public void caseRefType(RefType t)
A new local will be created and connected tonodeof typeRefType. For this new local an allocation edge toAnySubTypeof its declared type will be added.- Overrides:
caseRefTypein classTypeSwitch
-
caseArrayType
public void caseArrayType(ArrayType type)
A new local array will be created and connected tonodeof typeArrayType. For this new local an allocation edge to a new array of its declared type will be added. If theArrayType.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 aRefType. If this is the case an allocation toAnySubTypeofArrayType.baseTypewill be made.- Overrides:
caseArrayTypein classTypeSwitch
-
-