public abstract class InvokeInjector extends Injector
Injector.TargetNodeannotationType, classNode, info, isStatic, logger, methodArgs, methodNode, returnType| Constructor and Description |
|---|
InvokeInjector(InjectionInfo info,
java.lang.String annotationType) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkTarget(Target target)
Sanity checks on target
|
protected void |
inject(Target target,
InjectionNodes.InjectionNode node) |
protected abstract void |
injectAtInvoke(Target target,
InjectionNodes.InjectionNode node)
Perform a single injection
|
protected org.objectweb.asm.tree.AbstractInsnNode |
invokeHandlerWithArgs(org.objectweb.asm.Type[] args,
org.objectweb.asm.tree.InsnList insns,
int[] argMap) |
protected org.objectweb.asm.tree.AbstractInsnNode |
invokeHandlerWithArgs(org.objectweb.asm.Type[] args,
org.objectweb.asm.tree.InsnList insns,
int[] argMap,
int startArg,
int endArg) |
protected void |
pushArgs(org.objectweb.asm.Type[] args,
org.objectweb.asm.tree.InsnList insns,
int[] argMap,
int start,
int end)
Load args onto the stack from their positions allocated in argMap
|
protected void |
sanityCheck(Target target,
java.util.List<InjectionPoint> injectionPoints) |
protected int[] |
storeArgs(Target target,
org.objectweb.asm.Type[] args,
org.objectweb.asm.tree.InsnList insns,
int start)
Store args on the stack starting at the end and working back to position
specified by start, return the generated argMap
|
protected void |
storeArgs(org.objectweb.asm.Type[] args,
org.objectweb.asm.tree.InsnList insns,
int[] argMap,
int start,
int end)
Store args on the stack to their positions allocated based on argMap
|
addTargetNode, canCoerce, canCoerce, canCoerce, checkTargetForNode, checkTargetModifiers, find, findTargetNodes, inject, invokeHandler, invokeHandler, postInject, throwException, toStringpublic InvokeInjector(InjectionInfo info, java.lang.String annotationType)
info - Information about this injectionannotationType - Annotation type, used for error messagesprotected void sanityCheck(Target target, java.util.List<InjectionPoint> injectionPoints)
sanityCheck in class Injectorprotected void checkTarget(Target target)
target - targetprotected void inject(Target target, InjectionNodes.InjectionNode node)
protected abstract void injectAtInvoke(Target target, InjectionNodes.InjectionNode node)
target - Target to inject intonode - Discovered instruction nodeprotected org.objectweb.asm.tree.AbstractInsnNode invokeHandlerWithArgs(org.objectweb.asm.Type[] args,
org.objectweb.asm.tree.InsnList insns,
int[] argMap)
args - handler argumentsinsns - InsnList to inject insns intoargMap - Mapping of args to local variablesprotected org.objectweb.asm.tree.AbstractInsnNode invokeHandlerWithArgs(org.objectweb.asm.Type[] args,
org.objectweb.asm.tree.InsnList insns,
int[] argMap,
int startArg,
int endArg)
args - handler argumentsinsns - InsnList to inject insns intoargMap - Mapping of args to local variablesstartArg - Starting arg to consumeendArg - Ending arg to consumeprotected int[] storeArgs(Target target, org.objectweb.asm.Type[] args, org.objectweb.asm.tree.InsnList insns, int start)
target - target methodargs - argument typesinsns - instruction list to generate insns intostart - Starting indexprotected void storeArgs(org.objectweb.asm.Type[] args,
org.objectweb.asm.tree.InsnList insns,
int[] argMap,
int start,
int end)
args - argument typesinsns - instruction list to generate insns intoargMap - generated argmap containing local indices for all argsstart - Starting indexend - Ending indexprotected void pushArgs(org.objectweb.asm.Type[] args,
org.objectweb.asm.tree.InsnList insns,
int[] argMap,
int start,
int end)
args - argument typesinsns - instruction list to generate insns intoargMap - generated argmap containing local indices for all argsstart - Starting indexend - Ending index