Package soot.dexpler.instructions
Class FieldInstruction
- java.lang.Object
-
- soot.dexpler.instructions.DexlibAbstractInstruction
-
- soot.dexpler.instructions.FieldInstruction
-
- Direct Known Subclasses:
AputInstruction,IgetInstruction,IputInstruction,SgetInstruction,SputInstruction
public abstract class FieldInstruction extends DexlibAbstractInstruction
-
-
Field Summary
-
Fields inherited from class soot.dexpler.instructions.DexlibAbstractInstruction
codeAddress, instruction, lineNumber, unit
-
-
Constructor Summary
Constructors Constructor Description FieldInstruction(org.jf.dexlib2.iface.instruction.Instruction instruction, int codeAdress)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected AssignStmtgetAssignStmt(DexBody body, Local sourceValue, ConcreteRef instanceField)Check if the field type equals the type of the value that will be stored in the field.protected SootFieldRefgetSootFieldRef(org.jf.dexlib2.iface.reference.FieldReference fref)Return a SootFieldRef for a dexlib FieldReference.protected SootFieldRefgetStaticSootFieldRef(org.jf.dexlib2.iface.reference.FieldReference fref)Return a static SootFieldRef for a dexlib FieldReference.protected TypegetTargetType(DexBody body)Return the target type for put instructions.Set<Type>introducedTypes()Return the types that are be introduced by this instruction.-
Methods inherited from class soot.dexpler.instructions.DexlibAbstractInstruction
addTags, getInstruction, getLineNumber, getUnit, getUsedRegistersNums, getUsedRegistersNums, jimplify, setLineNumber, setUnit
-
-
-
-
Method Detail
-
getStaticSootFieldRef
protected SootFieldRef getStaticSootFieldRef(org.jf.dexlib2.iface.reference.FieldReference fref)
Return a static SootFieldRef for a dexlib FieldReference.- Parameters:
item- the dexlib FieldReference.
-
getSootFieldRef
protected SootFieldRef getSootFieldRef(org.jf.dexlib2.iface.reference.FieldReference fref)
Return a SootFieldRef for a dexlib FieldReference.- Parameters:
item- the dexlib FieldReference.
-
getAssignStmt
protected AssignStmt getAssignStmt(DexBody body, Local sourceValue, ConcreteRef instanceField)
Check if the field type equals the type of the value that will be stored in the field. A cast expression has to be introduced for the unequal case.- Returns:
- assignment statement which hold a cast or not depending on the types of the operation
-
getTargetType
protected Type getTargetType(DexBody body)
Return the target type for put instructions. Putters should override this.- Parameters:
body- the body containing this instruction
-
introducedTypes
public Set<Type> introducedTypes()
Description copied from class:DexlibAbstractInstructionReturn the types that are be introduced by this instruction. Instructions that may introduce types should override this.- Overrides:
introducedTypesin classDexlibAbstractInstruction
-
-