Class InjectorTarget
java.lang.Object
org.spongepowered.asm.mixin.injection.code.InjectorTarget
public class InjectorTarget
extends java.lang.Object
Couples
method slices to a Target for injection
purposes.-
Constructor Summary
Constructors Constructor Description InjectorTarget(ISliceContext context, Target target)ctor -
Method Summary
Modifier and Type Method Description voiddispose()Dispose all cached instruction listsjava.lang.StringgetMergedBy()Get the name of the mixin which merged this method, returns null for non- mixin methodsintgetMergedPriority()Get the priority of the mixin which merged this method, or default priority for non-mixin methodsorg.objectweb.asm.tree.MethodNodegetMethod()Get the target methodorg.objectweb.asm.tree.InsnListgetSlice(java.lang.String id)Get the slice instructions for the specified slice idorg.objectweb.asm.tree.InsnListgetSlice(InjectionPoint injectionPoint)Get the slice instructions for the specified injection pointTargetgetTarget()Get the target referencebooleanisMerged()Get whether this target method was merged by another mixinjava.lang.StringtoString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Constructor Details
-
InjectorTarget
ctor- Parameters:
context- ownertarget- target
-
-
Method Details
-
toString
public java.lang.String toString()- Overrides:
toStringin classjava.lang.Object
-
getTarget
Get the target reference -
getMethod
public org.objectweb.asm.tree.MethodNode getMethod()Get the target method -
isMerged
public boolean isMerged()Get whether this target method was merged by another mixin -
getMergedBy
public java.lang.String getMergedBy()Get the name of the mixin which merged this method, returns null for non- mixin methods -
getMergedPriority
public int getMergedPriority()Get the priority of the mixin which merged this method, or default priority for non-mixin methods -
getSlice
public org.objectweb.asm.tree.InsnList getSlice(java.lang.String id)Get the slice instructions for the specified slice id- Parameters:
id- slice id- Returns:
- insn slice
-
getSlice
Get the slice instructions for the specified injection point- Parameters:
injectionPoint- injection point to fetch slice for- Returns:
- slice
-
dispose
public void dispose()Dispose all cached instruction lists
-