public class ClassWriter extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
COMPUTE_FRAMES
Flag to automatically compute the stack map frames of methods from scratch.
|
static int |
COMPUTE_MAXS
Flag to automatically compute the maximum stack size and the maximum number of local variables of methods.
|
| Constructor and Description |
|---|
ClassWriter() |
| Modifier and Type | Method and Description |
|---|---|
int |
newClass(String value) |
int |
newNameType(String name,
String desc) |
int |
newUTF8(String value) |
byte[] |
toByteArray()
Returns the bytecode of the class that was build with this class writer.
|
void |
visit(int version,
int access,
String name,
String superName,
String[] interfaces) |
FieldVisitor |
visitField(int access,
String name,
String desc) |
MethodVisitor |
visitMethod(int access,
String name,
String desc,
String signature,
String[] exceptions) |
public static final int COMPUTE_MAXS
visitMaxs method of the
MethodVisitor returned by the visitMethod method will be ignored, and computed
automatically from the signature and the bytecode of each method.ClassWriter(int),
Constant Field Valuespublic static final int COMPUTE_FRAMES
ClassWriter(int),
Constant Field Valuespublic void visit(int version,
int access,
String name,
String superName,
String[] interfaces)
public FieldVisitor visitField(int access, String name, String desc)
public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions)
public byte[] toByteArray()
public int newUTF8(String value)
public int newClass(String value)
Copyright © 2012–2020 Alibaba Group. All rights reserved.