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` | `name, equals, toString, hashCode, compareTo, compareTo, valueOf, describeConstable, getDeclaringClass, ordinal, wait, wait, wait, getClass, notify, notifyAll`

- - ### Enum Constant Detail

    - #### public SealedMode AUTO

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

    - #### public 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.

    - #### public 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.