public class AfterStoreLocal extends BeforeLoadLocal
This injection point is a companion for the ModifyVariable
injector which searches for STORE operations which match the local variables
described by the injector's defined discriminators.
This allows you consumers to specify an injection immediately after a local variable is written in a method. Specify an ordinal of n to match the n + 1th access of the variable in question.
Example:
@ModifyVariable(
method = "md",
ordinal = 1,
at = @At(
value = "STORE",
ordinal = 0
)
)
Note that if value is the only parameter specified, it can be omitted:
@At("STORE")
Important Note: Unlike other standard injection points, this class matches the insn immediately after the matching point.
InjectionPoint.AtCode, InjectionPoint.Selector| Modifier and Type | Field and Description |
|---|---|
protected IMixinContext |
context |
DEFAULT_ALLOWED_SHIFT_BY, MAX_ALLOWED_SHIFT_BY| Constructor and Description |
|---|
AfterStoreLocal(InjectionPointData data) |
| Modifier and Type | Method and Description |
|---|---|
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
|
protected final IMixinContext context
public AfterStoreLocal(InjectionPointData data)
public 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