Package net.bytebuddy.asm
Enum AsmVisitorWrapper.NoOp
- java.lang.Object
-
- java.lang.Enum<AsmVisitorWrapper.NoOp>
-
- net.bytebuddy.asm.AsmVisitorWrapper.NoOp
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<AsmVisitorWrapper.NoOp>,AsmVisitorWrapper
- Enclosing interface:
- AsmVisitorWrapper
public static enum AsmVisitorWrapper.NoOp extends java.lang.Enum<AsmVisitorWrapper.NoOp> implements AsmVisitorWrapper
A class visitor wrapper that does not apply any changes.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.bytebuddy.asm.AsmVisitorWrapper
AsmVisitorWrapper.AbstractBase, AsmVisitorWrapper.Compound, AsmVisitorWrapper.ForDeclaredFields, AsmVisitorWrapper.ForDeclaredMethods, AsmVisitorWrapper.NoOp
-
-
Enum Constant Summary
Enum Constants Enum Constant Description INSTANCEThe singleton instance.
-
Field Summary
-
Fields inherited from interface net.bytebuddy.asm.AsmVisitorWrapper
NO_FLAGS
-
-
Constructor Summary
Constructors Modifier Constructor Description privateNoOp()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intmergeReader(int flags)Defines the flags that are provided to anyClassReaderwhen reading a class if applicable.intmergeWriter(int flags)Defines the flags that are provided to anyClassWriterwhen writing a class.static AsmVisitorWrapper.NoOpvalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static AsmVisitorWrapper.NoOp[]values()Returns an array containing the constants of this enum type, in the order they are declared.org.objectweb.asm.ClassVisitorwrap(TypeDescription instrumentedType, org.objectweb.asm.ClassVisitor classVisitor, Implementation.Context implementationContext, TypePool typePool, FieldList<FieldDescription.InDefinedShape> fields, MethodList<?> methods, int writerFlags, int readerFlags)Applies aClassVisitorWrapperto the creation of aDynamicType.
-
-
-
Enum Constant Detail
-
INSTANCE
public static final AsmVisitorWrapper.NoOp INSTANCE
The singleton instance.
-
-
Method Detail
-
values
public static AsmVisitorWrapper.NoOp[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (AsmVisitorWrapper.NoOp c : AsmVisitorWrapper.NoOp.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static AsmVisitorWrapper.NoOp valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
mergeWriter
public int mergeWriter(int flags)
Defines the flags that are provided to anyClassWriterwhen 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.- Specified by:
mergeWriterin interfaceAsmVisitorWrapper- Parameters:
flags- The currently set flags. This value should be combined (e.g.flags | foo) into the value that is returned by this wrapper.- Returns:
- The flags to be provided to the ASM
ClassWriter.
-
mergeReader
public int mergeReader(int flags)
Defines the flags that are provided to anyClassReaderwhen 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.- Specified by:
mergeReaderin interfaceAsmVisitorWrapper- Parameters:
flags- The currently set flags. This value should be combined (e.g.flags | foo) into the value that is returned by this wrapper.- Returns:
- The flags to be provided to the ASM
ClassReader.
-
wrap
public org.objectweb.asm.ClassVisitor wrap(TypeDescription instrumentedType, org.objectweb.asm.ClassVisitor classVisitor, Implementation.Context implementationContext, TypePool typePool, FieldList<FieldDescription.InDefinedShape> fields, MethodList<?> methods, int writerFlags, int readerFlags)
Applies aClassVisitorWrapperto the creation of aDynamicType.- Specified by:
wrapin interfaceAsmVisitorWrapper- Parameters:
instrumentedType- The instrumented type.classVisitor- AClassVisitorto become the new primary class visitor to which the createdDynamicTypeis 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 ASMClassWriterflags to consider.readerFlags- The ASMClassReaderflags to consider.- Returns:
- A new
ClassVisitorthat usually delegates to theClassVisitordelivered in the argument.
-
-