public class AccumulatedCodeInjector extends CodeInjector
CodeInjector class.CodeInjector.ClassMethodPair| Constructor and Description |
|---|
AccumulatedCodeInjector() |
| Modifier and Type | Method and Description |
|---|---|
CodeInjector |
at(InjectStrategy injectStrategy)
Specify the location in which the invoke instruction should be injected into.
|
void |
commit()
Apply the invoke instruction in accordance to the specifications provided via the
`.injectInvokeStatic(...)`, `.into(...)` and `.at(...)` methods.
|
CodeInjector |
injectInvokeStatic(Clazz clazz,
Method method)
Specify the static method to be invoked.
|
CodeInjector |
injectInvokeStatic(Clazz clazz,
Method method,
InjectedArgument... arguments)
Specify the static method to be invoked.
|
CodeInjector |
into(ProgramClass programClass,
ProgramMethod programMethod)
Specify the method where a static method invocation will be injected into.
|
LocalVariable |
store() |
getArguments, getContent, getInjectStrategy, getResultLocalIndex, getTargets, readyToCommitpublic CodeInjector injectInvokeStatic(Clazz clazz, Method method)
CodeInjectorinjectInvokeStatic in class CodeInjectorclazz - The class containing the static method to be invoked.method - The method to be invoked.public CodeInjector injectInvokeStatic(Clazz clazz, Method method, InjectedArgument... arguments)
CodeInjectorinjectInvokeStatic in class CodeInjectorclazz - The class containing the static method to be invoked.method - The method to be invoked.arguments - A list of arguments to be passed to the method to be invoked.public CodeInjector into(ProgramClass programClass, ProgramMethod programMethod)
CodeInjectorinto in class CodeInjectorprogramClass - The program class that has the method where a static method invocation will
be injected into.programMethod - The method where a static method invocation will be injected into.public CodeInjector at(InjectStrategy injectStrategy)
CodeInjectorat in class CodeInjectorinjectStrategy - The implementation of the InjectStrategy interface which determines the
offset to inject the invoke instruction.public LocalVariable store()
store in class CodeInjectorpublic void commit()
CodeInjectorcommit in class CodeInjector