Enum TrivialType
- java.lang.Object
-
- java.lang.Enum<TrivialType>
-
- net.bytebuddy.implementation.auxiliary.TrivialType
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<TrivialType>
,AuxiliaryType
public enum TrivialType extends java.lang.Enum<TrivialType> implements AuxiliaryType
A trivial type that extendsObject
without defining any fields, methods or constructors. This type is meant to be used as a marker type only.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.bytebuddy.implementation.auxiliary.AuxiliaryType
AuxiliaryType.NamingStrategy, AuxiliaryType.SignatureRelevant
-
-
Enum Constant Summary
Enum Constants Enum Constant Description PLAIN
A non-annotated trivial type.SIGNATURE_RELEVANT
A trivial type that defines theAuxiliaryType.SignatureRelevant
annotation.
-
Field Summary
Fields Modifier and Type Field Description private boolean
eager
Determines if this type determines theAuxiliaryType.SignatureRelevant
annotation.-
Fields inherited from interface net.bytebuddy.implementation.auxiliary.AuxiliaryType
DEFAULT_TYPE_MODIFIER
-
-
Constructor Summary
Constructors Modifier Constructor Description private
TrivialType(boolean eager)
Creates a new trivial type.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description DynamicType
make(java.lang.String auxiliaryTypeName, ClassFileVersion classFileVersion, MethodAccessorFactory methodAccessorFactory)
Creates a new auxiliary type.static TrivialType
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static TrivialType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
SIGNATURE_RELEVANT
public static final TrivialType SIGNATURE_RELEVANT
A trivial type that defines theAuxiliaryType.SignatureRelevant
annotation.
-
PLAIN
public static final TrivialType PLAIN
A non-annotated trivial type.
-
-
Field Detail
-
eager
private final boolean eager
Determines if this type determines theAuxiliaryType.SignatureRelevant
annotation.
-
-
Constructor Detail
-
TrivialType
private TrivialType(boolean eager)
Creates a new trivial type.- Parameters:
eager
- Determines if this type determines theAuxiliaryType.SignatureRelevant
annotation.
-
-
Method Detail
-
values
public static TrivialType[] 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 (TrivialType c : TrivialType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static TrivialType 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
-
make
public DynamicType make(java.lang.String auxiliaryTypeName, ClassFileVersion classFileVersion, MethodAccessorFactory methodAccessorFactory)
Creates a new auxiliary type.- Specified by:
make
in interfaceAuxiliaryType
- Parameters:
auxiliaryTypeName
- The fully qualified binary name for this auxiliary type. The type should be in the same package than the instrumented type this auxiliary type is providing services to in order to allow package-private access.classFileVersion
- The class file version the auxiliary class should be written in.methodAccessorFactory
- A factory for accessor methods.- Returns:
- A dynamically created type representing this auxiliary type.
-
-