Package sootup.apk.frontend.instruction
Class FieldInstruction
java.lang.Object
sootup.apk.frontend.instruction.DexLibAbstractInstruction
sootup.apk.frontend.instruction.FieldInstruction
- Direct Known Subclasses:
AputInstruction
,IgetInstruction
,IputInstruction
,SgetInstruction
,SputInstruction
-
Field Summary
Fields inherited from class sootup.apk.frontend.instruction.DexLibAbstractInstruction
codeAddress, instruction, lineNumber, stmt
-
Constructor Summary
ConstructorDescriptionFieldInstruction
(org.jf.dexlib2.iface.instruction.Instruction instruction, int codeAddress) -
Method Summary
Modifier and TypeMethodDescriptionprotected JAssignStmt
getAssignStmt
(Local sourceValue, ConcreteRef instanceField) Check if the field type equals the type of the value that will be stored in the field.protected JFieldRef
getSootFieldRef
(org.jf.dexlib2.iface.reference.FieldReference fref) Return a SootFieldRef for a dexlib FieldReference.protected JFieldRef
getStaticSootFieldRef
(org.jf.dexlib2.iface.reference.FieldReference fref) Return a static SootFieldRef for a dexlib FieldReference.Methods inherited from class sootup.apk.frontend.instruction.DexLibAbstractInstruction
getInstruction, getLineNumber, getStmt, getUsedRegistersNums, getUsedRegistersNums, jimplify, setLineNumber, setStmt
-
Constructor Details
-
FieldInstruction
public FieldInstruction(org.jf.dexlib2.iface.instruction.Instruction instruction, int codeAddress) - Parameters:
instruction
- the underlying dexlib instructioncodeAddress
- the bytecode address of this instruction
-
-
Method Details
-
getStaticSootFieldRef
Return a static SootFieldRef for a dexlib FieldReference.- Parameters:
fref
- the dexlib FieldReference.- Returns:
- the JFieldRef for the given field Reference
-
getSootFieldRef
Return a SootFieldRef for a dexlib FieldReference.- Parameters:
fref
- the dexlib FieldReference.- Returns:
- the JFieldRef for the given field Reference
-
getAssignStmt
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.- Parameters:
sourceValue
- the local (left value) to be used in the assign statementinstanceField
- the reference (right value) to be used in the assign statement- Returns:
- assignment statement which hold a cast or not depending on the types of the operation
-