Package: org.codehaus.groovy.transform

## [Java] Class SealedASTTransformation

- org.codehaus.groovy.transform.SealedASTTransformation

-     @GroovyASTTransformation(phase = CompilePhase.SEMANTIC_ANALYSIS)
      public class SealedASTTransformation
      extends AbstractASTTransformation

  Handles generation of code for the

  Sealed:
    annotation.

- - ### Field Summary

    Fields
    Modifiers | Name | Description
    --- | --- | ---
    `static String` | `SEALED_ALWAYS_ANNOTATE` |

  - Inherited fields
    Fields inherited from class | Fields
    --- | ---
    `class AbstractASTTransformation` | `RETENTION_CLASSNODE`

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `public static boolean` | `sealedNative(AnnotatedNode node)` Reports true if native sealed class information should be written into the bytecode.
    `` | `public static boolean` | `sealedSkipAnnotation(AnnotatedNode node)` Reports true if the `Sealed` annotation should not be included in the bytecode for a sealed or emulated-sealed class.
    `` | `public void` | `visit(ASTNode[] nodes, SourceUnit source)`

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class AbstractASTTransformation` | `addError, checkPropertyList, checkPropertyList, checkPropertyList, deemedInternalName, getAnnotationName, getMemberClassList, getMemberClassValue, getMemberClassValue, getMemberIntValue, getMemberStringList, getMemberStringValue, getMemberStringValue, getMemberValue, hasAnnotation, memberHasValue, shouldSkip, shouldSkip, shouldSkipOnDescriptorUndefinedAware, shouldSkipUndefinedAware, shouldSkipUndefinedAware, tokenize`

- - ### Field Detail

    - #### @Deprecated
      public static final String SEALED_ALWAYS_ANNOTATE

  - ### Method Detail

    - #### @Incubating
      public static boolean sealedNative(AnnotatedNode node)

      Reports true if native sealed class information should be written into the bytecode. Will only ever return true after the SealedASTTransformation visit method has completed.

      Returns:
        true for a native sealed class

    - #### @Incubating
      public static boolean sealedSkipAnnotation(AnnotatedNode node)

      Reports true if the `Sealed` annotation should not be included in the bytecode for a sealed or emulated-sealed class. Will only ever return true after the `SealedASTTransformation` transform has been invoked.

      Returns:
        true if a `Sealed` annotation is not required for this node

    - #### @Override
      public void visit(ASTNode[] nodes, SourceUnit source)