Module java.base
Package java.lang.classfilePREVIEW

# Interface AnnotationValue.OfEnum

All Superinterfaces:
  `AnnotationValuePREVIEW`, `ClassFileElementPREVIEW`, `WritableElementPREVIEW<AnnotationValuePREVIEW>`

Enclosing interface:
  `AnnotationValuePREVIEW`

public static sealed interface AnnotationValue.OfEnum extends AnnotationValuePREVIEW
`OfEnum` is a preview API of the Java platform.
Programs can only use `OfEnum` when preview features are enabled.
Preview features may be removed in a future release, or upgraded to permanent features of the Java platform.
Models an enum-valued element

Since:
  22

- ## Nested Class Summary

  ## Nested classes/interfaces declared in interface java.lang.classfile.AnnotationValuePREVIEW

  `AnnotationValue.OfAnnotationPREVIEW, AnnotationValue.OfArrayPREVIEW, AnnotationValue.OfBooleanPREVIEW, AnnotationValue.OfBytePREVIEW, AnnotationValue.OfCharacterPREVIEW, AnnotationValue.OfClassPREVIEW, AnnotationValue.OfConstantPREVIEW, AnnotationValue.OfDoublePREVIEW, AnnotationValue.OfEnumPREVIEW, AnnotationValue.OfFloatPREVIEW, AnnotationValue.OfIntegerPREVIEW, AnnotationValue.OfLongPREVIEW, AnnotationValue.OfShortPREVIEW, AnnotationValue.OfStringPREVIEW`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Utf8EntryPREVIEW`
  `className()`
  Returns the enum class name.
  `default ClassDesc`
  `classSymbol()`
  Returns the enum class symbol.
  `Utf8EntryPREVIEW`
  `constantName()`
  Returns the enum constant name.

  ### Methods declared in interface java.lang.classfile.AnnotationValuePREVIEW

  `tag`

  ### Methods declared in interface java.lang.classfile.WritableElementPREVIEW

  `writeTo`

- ## Method Details

  - ### className

    Utf8EntryPREVIEW className()
    Returns the enum class name.
    Returns:
      the enum class name

  - ### classSymbol

    default ClassDesc classSymbol()
    Returns the enum class symbol.
    Returns:
      the enum class symbol

  - ### constantName

    Utf8EntryPREVIEW constantName()
    Returns the enum constant name.
    Returns:
      the enum constant name