public enum TypeConstantAdjustment extends Enum<TypeConstantAdjustment> implements ClassVisitorWrapper
 This class visitor wrapper ensures that class files of a version previous to Java 5 do not store class entries in the generated class's constant pool.
 All found class instances are instead mapped as String values where the class constant is retrieved by a call to Class.forName(String).
 
 Warning: This can lead to subtle bugs as classes that are not available yield a ClassNotFoundException instead of a
 NoClassDefFoundError. The former, checked exception could therefore be thrown even if the method that unsuccessfully loads a class does
 not declared the checked exception. Furthermore, Class constants are not cached as fields within the class as the Java compiler implemented
 class constants before Java 5. As a benefit for this limitation, the registered wrapper does not require any additional work by a ClassWriter
 or ClassReader, i.e. does not set any flags.
 
| Modifier and Type | Class and Description | 
|---|---|
| protected static class  | TypeConstantAdjustment.TypeConstantDissolvingClassVisitorA class visitor that checks a class file version for its support of storing class constants in the constant pool and remaps such constants
 on discovery if that is not the case. | 
ClassVisitorWrapper.Compound, ClassVisitorWrapper.NoOp| Enum Constant and Description | 
|---|
| INSTANCEThe singleton instance. | 
| Modifier and Type | Method and Description | 
|---|---|
| int | mergeReader(int flags)Defines the flags that are provided to any  ClassReaderwhen reading a class if applicable. | 
| int | mergeWriter(int flags)Defines the flags that are provided to any  ClassWriterwhen writing a class. | 
| String | toString() | 
| static TypeConstantAdjustment | valueOf(String name)Returns the enum constant of this type with the specified name. | 
| static TypeConstantAdjustment[] | values()Returns an array containing the constants of this enum type, in
the order they are declared. | 
| ClassVisitor | wrap(ClassVisitor classVisitor)Applies a  ClassVisitorWrapperto the creation of aDynamicType. | 
public static final TypeConstantAdjustment INSTANCE
public static TypeConstantAdjustment[] values()
for (TypeConstantAdjustment c : TypeConstantAdjustment.values()) System.out.println(c);
public static TypeConstantAdjustment valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic int mergeWriter(int flags)
ClassVisitorWrapperClassWriter 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.mergeWriter in interface ClassVisitorWrapperflags - The currently set flags. This value should be combined (e.g. flags | foo) into the value that is returned by this wrapper.ClassWriter.public int mergeReader(int flags)
ClassVisitorWrapperClassReader 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.mergeReader in interface ClassVisitorWrapperflags - The currently set flags. This value should be combined (e.g. flags | foo) into the value that is returned by this wrapper.ClassReader.public ClassVisitor wrap(ClassVisitor classVisitor)
ClassVisitorWrapperClassVisitorWrapper to the creation of a DynamicType.wrap in interface ClassVisitorWrapperclassVisitor - A ClassVisitor to become the new primary class visitor to which the created
                     DynamicType is written to.ClassVisitor that usually delegates to the ClassVisitor delivered in the argument.public String toString()
toString in class Enum<TypeConstantAdjustment>Copyright © 2014–2015. All rights reserved.