Class FieldInstruction

java.lang.Object
sootup.apk.frontend.instruction.DexLibAbstractInstruction
sootup.apk.frontend.instruction.FieldInstruction
Direct Known Subclasses:
AputInstruction, IgetInstruction, IputInstruction, SgetInstruction, SputInstruction

public abstract class FieldInstruction extends DexLibAbstractInstruction
  • Constructor Details

    • FieldInstruction

      public FieldInstruction(org.jf.dexlib2.iface.instruction.Instruction instruction, int codeAddress)
      Parameters:
      instruction - the underlying dexlib instruction
      codeAddress - the bytecode address of this instruction
  • Method Details

    • getStaticSootFieldRef

      protected JFieldRef getStaticSootFieldRef(org.jf.dexlib2.iface.reference.FieldReference fref)
      Return a static SootFieldRef for a dexlib FieldReference.
      Parameters:
      fref - the dexlib FieldReference.
      Returns:
      the JFieldRef for the given field Reference
    • getSootFieldRef

      protected JFieldRef getSootFieldRef(org.jf.dexlib2.iface.reference.FieldReference fref)
      Return a SootFieldRef for a dexlib FieldReference.
      Parameters:
      fref - the dexlib FieldReference.
      Returns:
      the JFieldRef for the given field Reference
    • getAssignStmt

      protected JAssignStmt getAssignStmt(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.
      Parameters:
      sourceValue - the local (left value) to be used in the assign statement
      instanceField - 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