public class JumpInsnPoint extends InjectionPoint
This injection point searches for JUMP opcodes (if, try/catch, continue,
break, conditional assignment, etc.) with either a particular opcode or at a
particular ordinal in the method body (eg. "the Nth JUMP insn" where N is the
ordinal of the instruction). By default it returns all JUMP instructions in a
method body. It accepts the following parameters from
At:
opcode of the jump instruction, must be one of
IFEQ, IFNE, IFLT, IFGE, IFGT, IFLE, IF_ICMPEQ, IF_ICMPNE, IF_ICMPLT,
IF_ICMPGE, IF_ICMPGT, IF_ICMPLE, IF_ACMPEQ, IF_ACMPNE, GOTO, JSR, IFNULL or
IFNONNULL. Defaults to -1 which matches any JUMP opcode.
Example:
@At(value = "JUMP", opcode = Opcodes.IFLE, ordinal = 2)
Note that like all standard injection points, this class matches the insn
itself, putting the injection point immediately before the access in
question. Use shift
specifier to adjust the matched opcode as necessary.
InjectionPoint.AtCode, InjectionPoint.RestrictTargetLevel, InjectionPoint.SelectorDEFAULT_ALLOWED_SHIFT_BY, MAX_ALLOWED_SHIFT_BY| Constructor and Description |
|---|
JumpInsnPoint(InjectionPointData data) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
find(java.lang.String desc,
org.objectweb.asm.tree.InsnList insns,
java.util.Collection<org.objectweb.asm.tree.AbstractInsnNode> nodes)
Find injection points in the supplied insn list
|
public JumpInsnPoint(InjectionPointData data)
public boolean find(java.lang.String desc,
org.objectweb.asm.tree.InsnList insns,
java.util.Collection<org.objectweb.asm.tree.AbstractInsnNode> nodes)
InjectionPointfind in class InjectionPointdesc - Method descriptor, supplied to allow return types and
arguments etc. to be determinedinsns - Insn list to search in, the strategy MUST ONLY add nodes
from this list to the nodes collectionnodes - Collection of nodes to populate. Injectors should NOT make
any assumptions about the state of this collection and should only
call the add() method