Class CstInsn

java.lang.Object
com.android.dx.rop.code.Insn
com.android.dx.rop.code.CstInsn
All Implemented Interfaces:
ToHuman
Direct Known Subclasses:
PlainCstInsn, ThrowingCstInsn

public abstract class CstInsn extends Insn
Instruction which contains an explicit reference to a constant.
  • Constructor Details

    • CstInsn

      public CstInsn(Rop opcode, SourcePosition position, RegisterSpec result, RegisterSpecList sources, Constant cst)
      Constructs an instance.
      Parameters:
      opcode - non-null; the opcode
      position - non-null; source position
      result - null-ok; spec for the result, if any
      sources - non-null; specs for all the sources
      cst - non-null; constant
  • Method Details

    • getInlineString

      public String getInlineString()
      Gets an "inline" string portion for toHuman(), if available. This is the portion that appears after the Rop opcode
      Overrides:
      getInlineString in class Insn
      Returns:
      null-ok; if non-null, the inline text for toHuman()
    • getConstant

      public Constant getConstant()
      Gets the constant.
      Returns:
      non-null; the constant
    • contentEquals

      public boolean contentEquals(Insn b)
      Compares Insn contents, since Insn.equals() is defined to be an identity compare. Insn's are contentEquals() if they have the same opcode, registers, source position, and other metadata.
      Overrides:
      contentEquals in class Insn
      Returns:
      true in the case described above