Package proguard.classfile.util.inject
Class AccumulatedCodeInjector
java.lang.Object
proguard.classfile.util.inject.CodeInjector
proguard.classfile.util.inject.AccumulatedCodeInjector
This utility class allows for injecting multiple static method invocations in multiple target
methods. It allows the repeated use of the API methods defined in the
CodeInjector class.-
Nested Class Summary
Nested classes/interfaces inherited from class proguard.classfile.util.inject.CodeInjector
CodeInjector.ClassMethodPair -
Field Summary
Fields inherited from class proguard.classfile.util.inject.CodeInjector
editor -
Constructor Summary
ConstructorsConstructorDescription -
Method Summary
Modifier and TypeMethodDescriptionat(InjectStrategy injectStrategy) Specify the location in which the invoke instruction should be injected into.voidcommit()Apply the invoke instruction in accordance to the specifications provided via the `.injectInvokeStatic(...)`, `.into(...)` and `.at(...)` methods.injectInvokeStatic(Clazz clazz, Method method) Specify the static method to be invoked.injectInvokeStatic(Clazz clazz, Method method, InjectedArgument... arguments) Specify the static method to be invoked.into(ProgramClass programClass, ProgramMethod programMethod) Specify the method where a static method invocation will be injected into.store()Methods inherited from class proguard.classfile.util.inject.CodeInjector
getArguments, getContent, getInjectStrategy, getResultLocalIndex, getTargets, readyToCommit, reset
-
Constructor Details
-
AccumulatedCodeInjector
public AccumulatedCodeInjector() -
AccumulatedCodeInjector
-
-
Method Details
-
injectInvokeStatic
Description copied from class:CodeInjectorSpecify the static method to be invoked.- Overrides:
injectInvokeStaticin classCodeInjector- Parameters:
clazz- The class containing the static method to be invoked.method- The method to be invoked.
-
injectInvokeStatic
Description copied from class:CodeInjectorSpecify the static method to be invoked.- Overrides:
injectInvokeStaticin classCodeInjector- Parameters:
clazz- 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.
-
into
Description copied from class:CodeInjectorSpecify the method where a static method invocation will be injected into.- Overrides:
intoin classCodeInjector- Parameters:
programClass- 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.
-
at
Description copied from class:CodeInjectorSpecify the location in which the invoke instruction should be injected into.- Overrides:
atin classCodeInjector- Parameters:
injectStrategy- The implementation of the InjectStrategy interface which determines the offset to inject the invoke instruction.
-
store
- Overrides:
storein classCodeInjector
-
commit
public void commit()Description copied from class:CodeInjectorApply the invoke instruction in accordance to the specifications provided via the `.injectInvokeStatic(...)`, `.into(...)` and `.at(...)` methods.- Overrides:
commitin classCodeInjector
-