Java org.objectweb.asm ClassWriter fields, constructors, methods, implement or subclass

Example usage for Java org.objectweb.asm ClassWriter fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for org.objectweb.asm ClassWriter.

The text is from its open source code.

Subclass

org.objectweb.asm.ClassWriter has subclasses.
Click this link to see all its subclasses.

Field

intCOMPUTE_MAXS
A flag to automatically compute the maximum stack size and the maximum number of local variables of methods.
intCOMPUTE_FRAMES
A flag to automatically compute the stack map frames of methods from scratch.

Constructor

ClassWriter(final int flags)
Constructs a new ClassWriter object.
ClassWriter(final ClassReader classReader, final int flags)
Constructs a new ClassWriter object and enables optimizations for "mostly add" bytecode transformations.

Method

intnewClass(final String value)
Adds a class reference to the constant pool of the class being build.
intnewConst(final Object value)
Adds a number or string constant to the constant pool of the class being build.
intnewField(final String owner, final String name, final String descriptor)
Adds a field reference to the constant pool of the class being build.
intnewHandle(final int tag, final String owner, final String name, final String descriptor)
Adds a handle to the constant pool of the class being build.
intnewInvokeDynamic(final String name, final String descriptor, final Handle bootstrapMethodHandle, final Object... bootstrapMethodArguments)
Adds an invokedynamic reference to the constant pool of the class being build.
intnewMethod(final String owner, final String name, final String descriptor, final boolean isInterface)
Adds a method reference to the constant pool of the class being build.
intnewMethodType(final String methodDescriptor)
Adds a method type reference to the constant pool of the class being build.
intnewNameType(final String name, final String descriptor)
Adds a name and type to the constant pool of the class being build.
intnewUTF8(final String value)
Adds an UTF8 string to the constant pool of the class being build.
byte[]toByteArray()
Returns the content of the class file that was built by this ClassWriter.
voidvisit(final int version, final int access, final String name, final String signature, final String superName, final String[] interfaces)
AnnotationVisitorvisitAnnotation(final String descriptor, final boolean visible)
voidvisitAttribute(final Attribute attribute)
voidvisitEnd()
FieldVisitorvisitField(final int access, final String name, final String descriptor, final String signature, final Object value)
voidvisitInnerClass(final String name, final String outerName, final String innerName, final int access)
MethodVisitorvisitMethod(final int access, final String name, final String descriptor, final String signature, final String[] exceptions)
ModuleVisitorvisitModule(final String name, final int access, final String version)
voidvisitOuterClass(final String owner, final String name, final String descriptor)
voidvisitSource(final String file, final String debug)
AnnotationVisitorvisitTypeAnnotation(final int typeRef, final TypePath typePath, final String descriptor, final boolean visible)