protected class ContainerGhostingAugmenter.AugmentClassAdapter
extends ClassAdapter
Constructor and Description |
---|
ContainerGhostingAugmenter.AugmentClassAdapter(ClassVisitor cv,
java.util.Set<java.lang.String> existingMethods,
java.util.Set<java.lang.String> existingFields,
java.lang.reflect.Method methodToAugment,
boolean toInjectAfterOriginal)
Creates a new augmentor.
|
Modifier and Type | Method and Description |
---|---|
void |
augmentUpdateMethodAfter(boolean toSynthOriginal,
java.lang.String className,
java.lang.String superClassName,
java.lang.String methodDesc)
Augments the
update method that is assumed to always
have two parameters, injecting the ghosting code after the
original implementation. |
void |
augmentUpdateMethodBefore(boolean toSynthOriginal,
java.lang.String className,
java.lang.String superClassName,
java.lang.String methodDesc)
Augments the
update method that is assumed to always
have two parameters, injecting the ghosting code before the
original implementation. |
void |
visit(int version,
int access,
java.lang.String name,
java.lang.String signature,
java.lang.String superName,
java.lang.String[] interfaces) |
MethodVisitor |
visitMethod(int access,
java.lang.String name,
java.lang.String desc,
java.lang.String signature,
java.lang.String[] exceptions) |
public ContainerGhostingAugmenter.AugmentClassAdapter(ClassVisitor cv, java.util.Set<java.lang.String> existingMethods, java.util.Set<java.lang.String> existingFields, java.lang.reflect.Method methodToAugment, boolean toInjectAfterOriginal)
cv
- Class visitor to recreate the non-augmented methods.existingMethods
- Contains all method names.existingFields
- Contains all field names.methodToAugment
- Method to augment.toInjectAfterOriginal
- true
if the code needs to be injected after
the call to the original implementation.public void visit(int version, int access, java.lang.String name, java.lang.String signature, java.lang.String superName, java.lang.String[] interfaces)
public void augmentUpdateMethodBefore(boolean toSynthOriginal, java.lang.String className, java.lang.String superClassName, java.lang.String methodDesc)
update
method that is assumed to always
have two parameters, injecting the ghosting code before the
original implementation.toSynthOriginal
- Indication whether we need to create an empty (only call
to super()) implementation.className
- Class name.superClassName
- Super class name (relevant for generating empty
implementation).methodDesc
- Function signature (using JNI style declaration). Example
for void installUI(JButton button)
:
(Ljavax/swing/JButton;)V
.public void augmentUpdateMethodAfter(boolean toSynthOriginal, java.lang.String className, java.lang.String superClassName, java.lang.String methodDesc)
update
method that is assumed to always
have two parameters, injecting the ghosting code after the
original implementation.toSynthOriginal
- Indication whether we need to create an empty (only call
to super()) implementation.className
- Class name.superClassName
- Super class name (relevant for generating empty
implementation).methodDesc
- Function signature (using JNI style declaration). Example
for void installUI(JButton button)
:
(Ljavax/swing/JButton;)V
.public MethodVisitor visitMethod(int access, java.lang.String name, java.lang.String desc, java.lang.String signature, java.lang.String[] exceptions)