@ParametersAreNonnullByDefault public interface IInjectionTarget extends IDynamicRemapper
| Modifier and Type | Method and Description |
|---|---|
default RemapType |
dynamicRemap(AMapper mapper,
java.lang.Class<?> annotation,
java.util.Map<java.lang.String,java.lang.Object> values,
java.lang.reflect.Method remappedMethod,
TransformerManager transformerManager,
org.objectweb.asm.tree.ClassNode target,
org.objectweb.asm.tree.ClassNode transformer)
Remap the annotation fields dynamically.
A new type can be returned to let the default remapper handle the remapping. If the return value is null or RemapType.DYNAMIC the default remapper will be skipped. |
default CTarget.Shift |
getShift(CTarget target)
Get the shift for this target.
By default, it is defined in the CTarget annotation. |
default java.util.List<org.objectweb.asm.tree.AbstractInsnNode> |
getSlice(java.util.Map<java.lang.String,IInjectionTarget> injectionTargets,
org.objectweb.asm.tree.MethodNode method,
CSlice slice)
Get all instructions in the given slice.
|
java.util.List<org.objectweb.asm.tree.AbstractInsnNode> |
getTargets(java.util.Map<java.lang.String,IInjectionTarget> injectionTargets,
org.objectweb.asm.tree.MethodNode method,
CTarget target,
CSlice slice)
Get all matching target instructions.
|
java.util.List<org.objectweb.asm.tree.AbstractInsnNode> getTargets(java.util.Map<java.lang.String,IInjectionTarget> injectionTargets, org.objectweb.asm.tree.MethodNode method, CTarget target, @Nullable CSlice slice)
default CTarget.Shift getShift(CTarget target)
CTarget annotation.target - The CTarget annotationdefault java.util.List<org.objectweb.asm.tree.AbstractInsnNode> getSlice(java.util.Map<java.lang.String,IInjectionTarget> injectionTargets, org.objectweb.asm.tree.MethodNode method, @Nullable CSlice slice)
injectionTargets - All existing injection targetsmethod - The method to search inslice - The CSlice annotationjava.lang.IllegalArgumentException - If the slice is invalid@Nullable default RemapType dynamicRemap(AMapper mapper, java.lang.Class<?> annotation, java.util.Map<java.lang.String,java.lang.Object> values, java.lang.reflect.Method remappedMethod, TransformerManager transformerManager, org.objectweb.asm.tree.ClassNode target, org.objectweb.asm.tree.ClassNode transformer)
IDynamicRemappernull or RemapType.DYNAMIC the default remapper will be skipped.dynamicRemap in interface IDynamicRemappermapper - The mapper instanceannotation - The annotation classvalues - The raw values of the annotationremappedMethod - The annotation method that is being remappedtransformerManager - The transformer managertarget - The transformer target classtransformer - The transformer class