public class CLocalVariableCoprocessor extends java.lang.Object implements IAnnotationCoprocessor
| Constructor and Description |
|---|
CLocalVariableCoprocessor() |
| Modifier and Type | Method and Description |
|---|---|
void |
postprocess(TransformerManager transformerManager,
org.objectweb.asm.tree.ClassNode transformedClass,
org.objectweb.asm.tree.MethodNode transformedMethod,
java.util.List<org.objectweb.asm.tree.MethodInsnNode> transformerMethodCalls,
org.objectweb.asm.tree.ClassNode transformer,
org.objectweb.asm.tree.MethodNode transformerMethod)
Postprocess the transformer and target method after the annotation handler injected calls to the target method.
The transformerMethodCalls list only contains direct calls to the transformer method.Example usage: Add the parameter array back and modify the calls to the transformer method to use the parameter array. |
org.objectweb.asm.tree.MethodNode |
preprocess(TransformerManager transformerManager,
org.objectweb.asm.tree.ClassNode transformedClass,
org.objectweb.asm.tree.MethodNode transformedMethod,
org.objectweb.asm.tree.ClassNode transformer,
org.objectweb.asm.tree.MethodNode transformerMethod)
Preprocess the target method before the annotation handler injects calls to the target method.
This happens before the transformer method is verified by the annotation handler. Example usage: Merge all parameters into one array and add it to the end of the method. |
org.objectweb.asm.tree.MethodNode |
transform(TransformerManager transformerManager,
org.objectweb.asm.tree.ClassNode transformedClass,
org.objectweb.asm.tree.MethodNode transformedMethod,
org.objectweb.asm.tree.ClassNode transformer,
org.objectweb.asm.tree.MethodNode transformerMethod)
Process the target method before the annotation handler injects calls to the target method.
This happens before the transformer method is verified by the annotation handler but after IAnnotationCoprocessor.preprocess(TransformerManager, ClassNode, MethodNode, ClassNode, MethodNode).The calls to this method are in reverse order of the IAnnotationCoprocessor.preprocess(TransformerManager, ClassNode, MethodNode, ClassNode, MethodNode) calls.Example usage: Remove the previously added parameter array so the transformer method can be verified by the annotation handler. |
public org.objectweb.asm.tree.MethodNode preprocess(TransformerManager transformerManager, org.objectweb.asm.tree.ClassNode transformedClass, org.objectweb.asm.tree.MethodNode transformedMethod, org.objectweb.asm.tree.ClassNode transformer, org.objectweb.asm.tree.MethodNode transformerMethod)
IAnnotationCoprocessorMerge all parameters into one array and add it to the end of the method.preprocess in interface IAnnotationCoprocessortransformerManager - The transformer managertransformedClass - The target class nodetransformedMethod - The target method nodetransformer - The transformer class nodetransformerMethod - The transformer method nodetransformerMethod nodepublic org.objectweb.asm.tree.MethodNode transform(TransformerManager transformerManager, org.objectweb.asm.tree.ClassNode transformedClass, org.objectweb.asm.tree.MethodNode transformedMethod, org.objectweb.asm.tree.ClassNode transformer, org.objectweb.asm.tree.MethodNode transformerMethod)
IAnnotationCoprocessorIAnnotationCoprocessor.preprocess(TransformerManager, ClassNode, MethodNode, ClassNode, MethodNode).IAnnotationCoprocessor.preprocess(TransformerManager, ClassNode, MethodNode, ClassNode, MethodNode) calls.Remove the previously added parameter array so the transformer method can be verified by the annotation handler.transform in interface IAnnotationCoprocessortransformerManager - The transformer managertransformedClass - The target class nodetransformedMethod - The target method nodetransformer - The transformer class nodetransformerMethod - The transformer method nodetransformerMethod nodepublic void postprocess(TransformerManager transformerManager, org.objectweb.asm.tree.ClassNode transformedClass, org.objectweb.asm.tree.MethodNode transformedMethod, java.util.List<org.objectweb.asm.tree.MethodInsnNode> transformerMethodCalls, org.objectweb.asm.tree.ClassNode transformer, org.objectweb.asm.tree.MethodNode transformerMethod)
IAnnotationCoprocessortransformerMethodCalls list only contains direct calls to the transformer method.Add the parameter array back and modify the calls to the transformer method to use the parameter array.postprocess in interface IAnnotationCoprocessortransformerManager - The transformer managertransformedClass - The target class nodetransformedMethod - The target method nodetransformerMethodCalls - The list of calls to the transformer methodtransformer - The transformer class nodetransformerMethod - The transformer method node