ImmutableASTTransformation (Groovy 5.1.0)

Package: org.codehaus.groovy.transform

## [Java] Class ImmutableASTTransformation

- org.codehaus.groovy.transform.ImmutableASTTransformation

- All Implemented Interfaces and Traits:
    CompilationUnitAware

      @GroovyASTTransformation(phase = CompilePhase.CANONICALIZATION)
      public class ImmutableASTTransformation
      extends AbstractASTTransformation
      implements CompilationUnitAware

  Handles generation of code for the

  Immutable:
    annotation.

- - ### Field Summary

    Fields
    Modifiers | Name | Description
    --- | --- | ---
    `static String` | `IMMUTABLE_BREADCRUMB` |
    `static ClassNode` | `MY_TYPE` |

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

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `public static Object` | `checkImmutable(String className, String fieldName, Object field)` This method exists to be binary compatible with 1.7 - 1.8.6 compiled code.
    `` | `public static Object` | `checkImmutable(Class<?> clazz, String fieldName, Object field)` For compatibility with pre 2.5 compiled classes
    `` | `public static Object` | `checkImmutable(Class<?> clazz, String fieldName, Object field, List<String> knownImmutableFieldNames, List<Class> knownImmutableClasses)`
    `` | `public static void` | `checkPropNames(Object instance, Map<String, Object> args)` Called during named-arguments constructor execution to check given names.
    `` | `public String` | `getAnnotationName()`
    `` | `public void` | `setCompilationUnit(CompilationUnit unit)`
    `` | `public void` | `visit(ASTNode[] nodes, SourceUnit source)`

  - ### Inherited Methods Summary

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

- - ### Field Detail

    - #### public static final String IMMUTABLE_BREADCRUMB

    - #### public static final ClassNode MY_TYPE

  - ### Method Detail

    - #### public static Object checkImmutable(String className, String fieldName, Object field)

      This method exists to be binary compatible with 1.7 - 1.8.6 compiled code.

    - #### public static Object checkImmutable(Class<?> clazz, String fieldName, Object field)

      For compatibility with pre 2.5 compiled classes

    - #### public static Object checkImmutable(Class<?> clazz, String fieldName, Object field, List<String> knownImmutableFieldNames, List<Class> knownImmutableClasses)

    - #### public static void checkPropNames(Object instance, Map<String, Object> args)

      Called during named-arguments constructor execution to check given names.

    - #### @Override
      public String getAnnotationName()

    - #### @Override
      public void setCompilationUnit(CompilationUnit unit)

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