Interface InstructionComparator


public interface InstructionComparator
Instruction equality can be defined in different ways. You might wish to compare whether instructions have the same meaning, for example, whether two INVOKEVIRTUALs describe the same call.

The DEFAULT comparator, however, considers two instructions to be equal if they have the same opcode and point to the same indexes (if any) in the constant pool or the same local variable index. Branch instructions must have the same target.

See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    Default instruction comparator.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Compares two instructions for equality.
  • Field Details

  • Method Details

    • equals

      boolean equals(Instruction i1, Instruction i2)
      Compares two instructions for equality.
      Parameters:
      i1 - The first instruction.
      i2 - The second instruction.
      Returns:
      true if the instructions are equal, false otherwise.