Interface EnumerationDescription
-
- All Superinterfaces:
NamedElement
- All Known Implementing Classes:
EnumerationDescription.AbstractBase
,EnumerationDescription.ForLoadedEnumeration
,EnumerationDescription.Latent
public interface EnumerationDescription extends NamedElement
Describes an enumeration value. Note that theObject.toString()
method always returns the value as if the method was not overridden, i.e. the name of the enumeration constant.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
EnumerationDescription.AbstractBase
An adapter implementation of an enumeration description.static class
EnumerationDescription.ForLoadedEnumeration
An enumeration description representing a loaded enumeration.static class
EnumerationDescription.Latent
A latent description of an enumeration value.-
Nested classes/interfaces inherited from interface net.bytebuddy.description.NamedElement
NamedElement.WithDescriptor, NamedElement.WithGenericName, NamedElement.WithOptionalName, NamedElement.WithRuntimeName
-
-
Field Summary
-
Fields inherited from interface net.bytebuddy.description.NamedElement
EMPTY_NAME, NO_NAME
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description TypeDescription
getEnumerationType()
Returns the type of this enumeration.java.lang.String
getValue()
Returns the name of this instance's enumeration value.<T extends java.lang.Enum<T>>
Tload(java.lang.Class<T> type)
Prepares this enumeration value to be loaded.-
Methods inherited from interface net.bytebuddy.description.NamedElement
getActualName
-
-
-
-
Method Detail
-
getValue
java.lang.String getValue()
Returns the name of this instance's enumeration value.- Returns:
- The name of this enumeration constant.
-
getEnumerationType
TypeDescription getEnumerationType()
Returns the type of this enumeration.- Returns:
- The type of this enumeration.
-
load
<T extends java.lang.Enum<T>> T load(java.lang.Class<T> type)
Prepares this enumeration value to be loaded.- Type Parameters:
T
- The enumeration type.- Parameters:
type
- A type constant representing the enumeration value.- Returns:
- The loaded enumeration constant corresponding to this value.
-
-