Package org.apache.bcel.generic
Interface InstructionComparator
-
public interface InstructionComparatorEquality of instructions isn't clearly to be defined. You might wish, for example, to compare whether instructions have the same meaning. E.g., whether two INVOKEVIRTUALs describe the same call.The DEFAULT comparator however, considers two instructions to be equal if they have 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:
Instruction
-
-
Field Summary
Fields Modifier and Type Field Description static InstructionComparatorDEFAULTDefault instruction comparator.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanequals(Instruction i1, Instruction i2)Compares two instructions for equality.
-
-
-
Field Detail
-
DEFAULT
static final InstructionComparator DEFAULT
Default instruction comparator.
-
-
Method Detail
-
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.
-
-