public interface AsmVisitorWrapper
ClassVisitor which
is applied to the main type created by a DynamicType.Builder but not
to any AuxiliaryTypes, if any.| Modifier and Type | Interface and Description |
|---|---|
static class |
AsmVisitorWrapper.AbstractBase
An abstract base implementation of an ASM visitor wrapper that does not set any flags.
|
static class |
AsmVisitorWrapper.Compound
An ordered, immutable chain of
AsmVisitorWrappers. |
static class |
AsmVisitorWrapper.ForDeclaredFields
An ASM visitor wrapper that allows to wrap declared fields of the instrumented type with a
AsmVisitorWrapper.ForDeclaredFields.FieldVisitorWrapper. |
static class |
AsmVisitorWrapper.ForDeclaredMethods
An ASM visitor wrapper that allows to wrap declared methods of the instrumented type with a
AsmVisitorWrapper.ForDeclaredMethods.MethodVisitorWrapper. |
static class |
AsmVisitorWrapper.NoOp
A class visitor wrapper that does not apply any changes.
|
| Modifier and Type | Field and Description |
|---|---|
static int |
NO_FLAGS
Indicates that no flags should be set.
|
| Modifier and Type | Method and Description |
|---|---|
int |
mergeReader(int flags)
Defines the flags that are provided to any
ClassReader when reading a class if applicable. |
int |
mergeWriter(int flags)
Defines the flags that are provided to any
ClassWriter when writing a class. |
ClassVisitor |
wrap(TypeDescription instrumentedType,
ClassVisitor classVisitor,
Implementation.Context implementationContext,
TypePool typePool,
FieldList<FieldDescription.InDefinedShape> fields,
MethodList<?> methods,
int writerFlags,
int readerFlags)
Applies a
ClassVisitorWrapper to the creation of a DynamicType. |
static final int NO_FLAGS
int mergeWriter(int flags)
ClassWriter when writing a class. Typically, this gives opportunity to instruct ASM
to compute stack map frames or the size of the local variables array and the operand stack. If no specific flags are required for
applying this wrapper, the given value is to be returned.flags - The currently set flags. This value should be combined (e.g. flags | foo) into the value that is returned by this wrapper.ClassWriter.int mergeReader(int flags)
ClassReader when reading a class if applicable. Typically, this gives opportunity to
instruct ASM to expand or skip frames and to skip code and debug information. If no specific flags are required for applying this
wrapper, the given value is to be returned.flags - The currently set flags. This value should be combined (e.g. flags | foo) into the value that is returned by this wrapper.ClassReader.ClassVisitor wrap(TypeDescription instrumentedType, ClassVisitor classVisitor, Implementation.Context implementationContext, TypePool typePool, FieldList<FieldDescription.InDefinedShape> fields, MethodList<?> methods, int writerFlags, int readerFlags)
ClassVisitorWrapper to the creation of a DynamicType.instrumentedType - The instrumented type.classVisitor - A ClassVisitor to become the new primary class visitor to which the created
DynamicType is written to.implementationContext - The implementation context of the current instrumentation.typePool - The type pool that was provided for the class creation.fields - The instrumented type's fields.methods - The instrumented type's methods non-ignored declared and virtually inherited methods.writerFlags - The ASM ClassWriter flags to consider.readerFlags - The ASM ClassReader flags to consider.ClassVisitor that usually delegates to the ClassVisitor delivered in the argument.Copyright © 2014–2025. All rights reserved.