SealedMode (Groovy 5.0.8)

Package: groovy.transform

## [Java] Enum SealedMode

- groovy.transform.SealedMode

-     public enum SealedMode
      extends Enum

  Intended mode to use for sealed classes when using the `@Sealed` annotation (or `sealed` keyword).

  Since:
    4.0.0
  See Also:
    Sealed

- - ### Enum Constants Summary

    Enum constants classes
    Enum constant | Description
    --- | ---
    `AUTO` | Produce native sealed classes when compiling for a suitable target bytecode (JDK17+) and automatically emulate the concept on earlier JDKs.
    `EMULATE` | Indicate the sealed nature using annotations.
    `NATIVE` | Produce Java-like code with sealed nature indicated by "native" bytecode information (JEP 360/397/409).

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class Enum` | `compareTo, compareTo, describeConstable, equals, getClass, getDeclaringClass, hashCode, name, notify, notifyAll, ordinal, toString, valueOf, wait, wait, wait`

- - ### Enum Constant Detail

    - #### SealedMode AUTO

      Produce native sealed classes when compiling for a suitable target bytecode (JDK17+) and automatically emulate the concept on earlier JDKs.

    - #### SealedMode EMULATE

      Indicate the sealed nature using annotations. This allows sealed hierarchies in earlier JDKs but for integration purposes won't be recognised by Java.

    - #### SealedMode NATIVE

      Produce Java-like code with sealed nature indicated by "native" bytecode information (JEP 360/397/409). Produces a compile-time error when used on earlier JDKs.