Enum Class TrivialType
- All Implemented Interfaces:
Serializable
,Comparable<TrivialType>
,Constable
,AuxiliaryType
A trivial type that extends
Object
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 class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
Nested classes/interfaces inherited from interface net.bytebuddy.implementation.auxiliary.AuxiliaryType
AuxiliaryType.NamingStrategy, AuxiliaryType.SignatureRelevant
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionA non-annotated trivial type.A trivial type that defines theAuxiliaryType.SignatureRelevant
annotation. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final boolean
Determines if this type determines theAuxiliaryType.SignatureRelevant
annotation.Fields inherited from interface net.bytebuddy.implementation.auxiliary.AuxiliaryType
DEFAULT_TYPE_MODIFIER
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionProduces a suffix that gives this auxiliary type a stable name.make
(String auxiliaryTypeName, ClassFileVersion classFileVersion, MethodAccessorFactory methodAccessorFactory) Creates a new auxiliary type.static TrivialType
Returns the enum constant of this class with the specified name.static TrivialType[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
SIGNATURE_RELEVANT
A trivial type that defines theAuxiliaryType.SignatureRelevant
annotation. -
PLAIN
A non-annotated trivial type.
-
-
Field Details
-
eager
private final boolean eagerDetermines if this type determines theAuxiliaryType.SignatureRelevant
annotation.
-
-
Constructor Details
-
TrivialType
private TrivialType(boolean eager) Creates a new trivial type.- Parameters:
eager
- Determines if this type determines theAuxiliaryType.SignatureRelevant
annotation.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
getSuffix
Produces a suffix that gives this auxiliary type a stable name. A best effort is made that this suffix is unique.- Specified by:
getSuffix
in interfaceAuxiliaryType
- Returns:
- The suffix for this auxiliary type.
-
make
public DynamicType make(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.
-