Class AnnotationValue.ForEnumerationDescription.WithUnknownConstant.Loaded

All Implemented Interfaces:
AnnotationValue.Loaded<Enum<?>>
Enclosing class:
AnnotationValue.ForEnumerationDescription.WithUnknownConstant<U extends Enum<U>>

public static class AnnotationValue.ForEnumerationDescription.WithUnknownConstant.Loaded extends AnnotationValue.Loaded.AbstractBase.ForUnresolvedProperty<Enum<?>>
Represents a property with an enumeration constant that is not defined by an enumeration type.
  • Field Details

    • enumType

      private final Class<? extends Enum<?>> enumType
      The loaded enumeration type.
    • value

      private final String value
      The value for which no enumeration constant exists at runtime.
  • Constructor Details

    • Loaded

      public Loaded(Class<? extends Enum<?>> enumType, String value)
      Creates a new representation for an unknown enumeration constant of an annotation.
      Parameters:
      enumType - The loaded enumeration type.
      value - The value for which no enumeration constant exists at runtime.
  • Method Details

    • resolve

      public Enum<?> resolve()
      Resolves the value to the actual value of an annotation. Calling this method might throw a runtime exception if this value is either not defined or not resolved.
      Returns:
      The actual annotation value represented by this instance.
    • toString

      public String toString()
      Overrides:
      toString in class Object