public class MethodHead extends InjectionPoint
This injection point simply returns the first instruction in the target method body, allowing the injection to be placed at the "head" of the target method. It accepts no parameters and only returns a single insn in all circumstances.
Example:
@At("HEAD")
InjectionPoint.AtCode, InjectionPoint.SelectorDEFAULT_ALLOWED_SHIFT_BY, MAX_ALLOWED_SHIFT_BY| Constructor and Description |
|---|
MethodHead(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 MethodHead(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