spring-framework / org.springframework.asm / ClassWriter / <init>

<init>

ClassWriter(flags: Int)

Constructs a new ClassWriter object.

Parameters

flags - option flags that can be used to modify the default behavior of this class. See #COMPUTE_MAXS, #COMPUTE_FRAMES.

ClassWriter(classReader: ClassReader, flags: Int)

Constructs a new ClassWriter object and enables optimizations for "mostly add" bytecode transformations. These optimizations are the following:

Parameters

classReader - the ClassReader used to read the original class. It will be used to copy the entire constant pool from the original class and also to copy other fragments of original bytecode where applicable.

flags - option flags that can be used to modify the default behavior of this class. These option flags do not affect methods that are copied as is in the new class. This means that neither the maximum stack size nor the stack frames will be computed for these methods. See #COMPUTE_MAXS, #COMPUTE_FRAMES.