Class EnumerationDescription.Latent

java.lang.Object
net.bytebuddy.description.enumeration.EnumerationDescription.AbstractBase
net.bytebuddy.description.enumeration.EnumerationDescription.Latent
All Implemented Interfaces:
EnumerationDescription, NamedElement
Enclosing interface:
EnumerationDescription

public static class EnumerationDescription.Latent extends EnumerationDescription.AbstractBase
A latent description of an enumeration value.
  • Field Details

    • enumerationType

      private final TypeDescription enumerationType
      The type of the enumeration.
    • value

      private final String value
      The value of the enumeration.
  • Constructor Details

    • Latent

      public Latent(TypeDescription enumerationType, String value)
      Creates a latent description of an enumeration value.
      Parameters:
      enumerationType - The enumeration type.
      value - The value of the enumeration.
  • Method Details

    • getValue

      public String getValue()
      Returns the name of this instance's enumeration value.
      Returns:
      The name of this enumeration constant.
    • getEnumerationType

      public TypeDescription getEnumerationType()
      Returns the type of this enumeration.
      Returns:
      The type of this enumeration.
    • load

      public <T extends Enum<T>> T load(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.