Class Dop

java.lang.Object
com.android.dx.dex.code.Dop

public final class Dop extends Object
Representation of an opcode.
  • Constructor Details

    • Dop

      public Dop(int opcode, int family, int nextOpcode, InsnFormat format, boolean hasResult)
      Constructs an instance.
      Parameters:
      opcode - Opcodes.isValid(); the opcode value itself
      family - Opcodes.isValid(); the opcode family
      nextOpcode - Opcodes.isValid(); what opcode (by number) to try next when attempting to match an opcode to particular arguments; Opcodes.NO_NEXT to indicate that this is the last opcode to try in a particular chain
      format - non-null; the instruction format
      hasResult - whether the opcode has a result register; if so it is always the first register
  • Method Details

    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getOpcode

      public int getOpcode()
      Gets the opcode value.
      Returns:
      Opcodes.MIN_VALUE..Opcodes.MAX_VALUE; the opcode value
    • getFamily

      public int getFamily()
      Gets the opcode family. The opcode family is the unmarked (no "/...") opcode that has equivalent semantics to this one.
      Returns:
      Opcodes.MIN_VALUE..Opcodes.MAX_VALUE; the opcode family
    • getFormat

      public InsnFormat getFormat()
      Gets the instruction format.
      Returns:
      non-null; the instruction format
    • hasResult

      public boolean hasResult()
      Returns whether this opcode uses a result register.
      Returns:
      true iff this opcode uses a result register
    • getName

      public String getName()
      Gets the opcode name.
      Returns:
      non-null; the opcode name
    • getNextOpcode

      public int getNextOpcode()
      Gets the opcode value to try next when attempting to match an opcode to particular arguments. This returns Opcodes.NO_NEXT to indicate that this is the last opcode to try in a particular chain.
      Returns:
      Opcodes.MIN_VALUE..Opcodes.MAX_VALUE; the opcode value
    • getOppositeTest

      public Dop getOppositeTest()
      Gets the opcode for the opposite test of this instance. This is only valid for opcodes which are in fact tests.
      Returns:
      non-null; the opposite test