org.objectweb.asm.tree
public class TreeClassAdapter extends ClassAdapter
In order to implement a usefull class adapter based on a tree representation of classes, one just need to override the {@link #visitEnd visitEnd} method with a method of the following form:
public void visitEnd () { // ... // code to modify the classNode tree, can be arbitrary complex // ... // makes the cv visitor visit this modified class: classNode.accept(cv); }
Field Summary | |
---|---|
ClassNode | classNode
A tree representation of the class that is being visited by this visitor. |
Constructor Summary | |
---|---|
TreeClassAdapter(ClassVisitor cv)
Constructs a new {@link TreeClassAdapter TreeClassAdapter} object.
|
Method Summary | |
---|---|
void | visit(int version, int access, String name, String superName, String[] interfaces, String sourceFile) |
void | visitAttribute(Attribute attr) |
void | visitEnd() |
void | visitField(int access, String name, String desc, Object value, Attribute attrs) |
void | visitInnerClass(String name, String outerName, String innerName, int access) |
CodeVisitor | visitMethod(int access, String name, String desc, String[] exceptions, Attribute attrs) |
Parameters: cv the class visitor to which this adapter must delegate calls.