Class AfterInvoke
java.lang.Object
org.spongepowered.asm.mixin.injection.InjectionPoint
org.spongepowered.asm.mixin.injection.points.BeforeInvoke
org.spongepowered.asm.mixin.injection.points.AfterInvoke
This injection point searches for INVOKEVIRTUAL, INVOKESTATIC and
INVOKESPECIAL opcodes matching its arguments and returns a list of insns
after the matching instructions, with special handling for methods
invocations which return a value and immediately assign it to a local
variable. It accepts the following parameters from
At:
- target
- A
Target Selectorwhich identifies the target method - ordinal
- The ordinal position of the method invocation to match. For example if the method is invoked 3 times and you want to match the 3rd then you can specify an ordinal of 2 (ordinals are zero-indexed). The default value is -1 which supresses ordinal matching
Example:
@At(value = "INVOKE_ASSIGN", target="func_1234_a(III)J")
Note that unlike other standard injection points, this class matches the
insn after the invocation, and after any local variable assignment. Use the
shift specifier to
adjust the matched opcode as necessary.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.spongepowered.asm.mixin.injection.points.BeforeInvoke
BeforeInvoke.SearchTypeNested classes/interfaces inherited from class org.spongepowered.asm.mixin.injection.InjectionPoint
InjectionPoint.AtCode, InjectionPoint.RestrictTargetLevel, InjectionPoint.Selector -
Field Summary
Fields inherited from class org.spongepowered.asm.mixin.injection.points.BeforeInvoke
allowPermissive, className, context, logger, mixin, ordinal, targetFields inherited from class org.spongepowered.asm.mixin.injection.InjectionPoint
DEFAULT_ALLOWED_SHIFT_BY, MAX_ALLOWED_SHIFT_BY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanaddInsn(org.objectweb.asm.tree.InsnList insns, Collection<org.objectweb.asm.tree.AbstractInsnNode> nodes, org.objectweb.asm.tree.AbstractInsnNode insn) Methods inherited from class org.spongepowered.asm.mixin.injection.points.BeforeInvoke
find, find, inspectInsn, log, matchesInsn, matchesOrdinal, setLoggingMethods inherited from class org.spongepowered.asm.mixin.injection.InjectionPoint
addMessage, after, and, before, checkPriority, getAtCode, getCancellationRestriction, getId, getSelector, getSlice, getTargetRestriction, nextNode, or, parse, parse, parse, parse, parse, parse, parse, parse, register, register, shift, toString
-
Constructor Details
-
AfterInvoke
-
-
Method Details
-
addInsn
protected boolean addInsn(org.objectweb.asm.tree.InsnList insns, Collection<org.objectweb.asm.tree.AbstractInsnNode> nodes, org.objectweb.asm.tree.AbstractInsnNode insn) - Overrides:
addInsnin classBeforeInvoke
-