insnEquals

fun AbstractInsnNode.insnEquals(other: AbstractInsnNode): Boolean(source)

Used as a replacement for ASM's missing equals implementation on AbstractInsnNode and its subclasses. This is used along with InsnTarget to match bytecode instructions in lists, and therefore only supports necessary attributes. LabelNodes, LineNumberNodes and FrameNodes are not supported.

Full list of supported attributes:

  • All Opcodes

  • FieldInsnNode - Matches all attributes

  • FrameNode - Matches type only

  • IincInsnNode - Matches all attributes

  • IntInsnNode - Matches all attributes

  • InvokeDynamicInsnNode - Matches name, desc and bsm

  • JumpInsnNode - Matches opcode only

  • LabelNode - Matches opcode only

  • LdcInsnNode - Matches all attributes

  • LineNumberNode - Matches all attributes

  • LookupSwitchInsnNode - Matches all attributes

  • MethodInsnNode - Matches all attributes

  • MultiANewArrayInsnNode - Matches all attributes

  • TableSwitchInsnNode - Matches all attributes

  • TypeInsnNode - Matches all attributes

  • VarInsnNode - Matches all attributes