Class InstructionSequenceReplacer.Label

java.lang.Object
proguard.classfile.instruction.Instruction
proguard.classfile.editor.InstructionSequenceReplacer.Label
Enclosing class:
InstructionSequenceReplacer

public static class InstructionSequenceReplacer.Label extends Instruction
This pseudo-instruction represents a label that marks an instruction offset, for use in the context of the sequence replacer only.
  • Field Details

    • identifier

      protected final int identifier
  • Method Details

    • offset

      public int offset()
      Returns the offset that can then be used as a branch target in other replacement instructions.
    • shrink

      public Instruction shrink()
      Description copied from class: Instruction
      Shrinks this instruction to its shortest possible form.
      Specified by:
      shrink in class Instruction
      Returns:
      this instruction.
    • write

      public void write(byte[] code, int offset)
      Description copied from class: Instruction
      Writes the Instruction at the given offset in the given code array.
      Overrides:
      write in class Instruction
    • readInfo

      protected void readInfo(byte[] code, int offset)
      Description copied from class: Instruction
      Reads the data following the instruction opcode.
      Specified by:
      readInfo in class Instruction
    • writeInfo

      protected void writeInfo(byte[] code, int offset)
      Description copied from class: Instruction
      Writes data following the instruction opcode.
      Specified by:
      writeInfo in class Instruction
    • length

      public int length(int offset)
      Description copied from class: Instruction
      Returns the length in bytes of the instruction.
      Specified by:
      length in class Instruction
    • accept

      public void accept(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, InstructionVisitor instructionVisitor)
      Description copied from class: Instruction
      Accepts the given visitor.
      Specified by:
      accept in class Instruction
    • toString

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

      public boolean equals(Object o)
      Specified by:
      equals in class Instruction
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in class Instruction