public class BeforeFinalReturn extends InjectionPoint
This injection point searches for the last RETURN opcode in the target method and returns it. Note that the last RETURN opcode may not correspond to the notional "bottom" of a method in the original Java source, since conditional expressions can cause the bytecode emitted to differ significantly in order from the original Java.
Example:
@At(value = "TAIL")
Note that if value is the only parameter specified, it can be omitted:
@At("TAIL")
InjectionPoint.AtCode, InjectionPoint.SelectorDEFAULT_ALLOWED_SHIFT_BY, MAX_ALLOWED_SHIFT_BY| Constructor and Description |
|---|
BeforeFinalReturn(InjectionPointData data) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
checkPriority(int targetPriority,
int ownerPriority)
Runs a priority check in the context of this injection point.
|
boolean |
find(java.lang.String desc,
org.spongepowered.asm.lib.tree.InsnList insns,
java.util.Collection<org.spongepowered.asm.lib.tree.AbstractInsnNode> nodes)
Find injection points in the supplied insn list
|
public BeforeFinalReturn(InjectionPointData data)
public boolean checkPriority(int targetPriority,
int ownerPriority)
InjectionPointcheckPriority in class InjectionPointtargetPriority - Priority of the mixin which originally merged the
target method in questionownerPriority - Priority of the mixin which owns the owning injectorpublic boolean find(java.lang.String desc,
org.spongepowered.asm.lib.tree.InsnList insns,
java.util.Collection<org.spongepowered.asm.lib.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