Package net.bytebuddy.dynamic.scaffold
Enum ClassWriterStrategy.Default
- java.lang.Object
-
- java.lang.Enum<ClassWriterStrategy.Default>
-
- net.bytebuddy.dynamic.scaffold.ClassWriterStrategy.Default
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<ClassWriterStrategy.Default>
,ClassWriterStrategy
- Enclosing interface:
- ClassWriterStrategy
public static enum ClassWriterStrategy.Default extends java.lang.Enum<ClassWriterStrategy.Default> implements ClassWriterStrategy
Default implementations of class writer strategies.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.bytebuddy.dynamic.scaffold.ClassWriterStrategy
ClassWriterStrategy.Default, ClassWriterStrategy.FrameComputingClassWriter
-
-
Enum Constant Summary
Enum Constants Enum Constant Description CONSTANT_POOL_DISCARDING
A class writer strategy that discards the original class's constant pool if applicable.CONSTANT_POOL_RETAINING
A class writer strategy that retains the original class's constant pool if applicable.
-
Constructor Summary
Constructors Modifier Constructor Description private
Default()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description org.objectweb.asm.ClassWriter
resolve(int flags, TypePool typePool)
Resolves a class writer.static ClassWriterStrategy.Default
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static ClassWriterStrategy.Default[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.-
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Methods inherited from interface net.bytebuddy.dynamic.scaffold.ClassWriterStrategy
resolve
-
-
-
-
Enum Constant Detail
-
CONSTANT_POOL_RETAINING
public static final ClassWriterStrategy.Default CONSTANT_POOL_RETAINING
A class writer strategy that retains the original class's constant pool if applicable.
-
CONSTANT_POOL_DISCARDING
public static final ClassWriterStrategy.Default CONSTANT_POOL_DISCARDING
A class writer strategy that discards the original class's constant pool if applicable.
-
-
Method Detail
-
values
public static ClassWriterStrategy.Default[] 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 (ClassWriterStrategy.Default c : ClassWriterStrategy.Default.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ClassWriterStrategy.Default 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
-
resolve
public org.objectweb.asm.ClassWriter resolve(int flags, TypePool typePool)
Resolves a class writer.- Specified by:
resolve
in interfaceClassWriterStrategy
- Parameters:
flags
- The flags to set.typePool
- A type pool for locating types.- Returns:
- The class writer to use.
-
-