Class Generation
ClassVisitor
/*
A ClassVisitor that generates a corresponding ClassFile structure, as defined in the Java Virtual Machine Specification (JVMS). It can be used alone, to generate a Java class "from scratch", or with one or more ClassReader and adapter ClassVisitor to generate a modified class from one or more existing Java classes.
*/
public class ClassWriter extends ClassVisitor// A node that represents a class.
public class ClassNode extends ClassVisitorpublic abstract class ClassVisitor {
/**
* The ASM API version implemented by this visitor. The value of this field must be one of Opcodes
*/
protected final int api;
/** The class visitor to which this visitor must delegate method calls. May be null. */
protected ClassVisitor cv;
public ClassVisitor(final int api, final ClassVisitor classVisitor) {
this.api = api;
this.cv = classVisitor;
}
}Java 类型
ClassFile 描述符

ClassWriter
Best Practice
FieldVisitor
FieldWriter
MethodVisitor
MethodWriter
Best Practice
Label

Best Practice
If
Switch

For

Try-Catch

Last updated