Package: org.codehaus.groovy.transform.trait

## [Java] Class TraitASTTransformation

- org.codehaus.groovy.transform.trait.TraitASTTransformation

- All Implemented Interfaces and Traits:
    CompilationUnitAware

      @GroovyASTTransformation(phase = CompilePhase.SEMANTIC_ANALYSIS)
      public class TraitASTTransformation
      extends AbstractASTTransformation
      implements CompilationUnitAware

  Handles generation of code for the traits (trait keyword is equivalent to using the

  Trait:
    annotation). A class annotated with
  Trait:
    will generate, instead:
    - an interface with the same name
    - a utility inner class that will be used by the compiler to implement the trait
    - potentially a utility inner class to assist with implementing trait fields

- - ### Field Summary

    Fields
    Modifiers | Name | Description
    --- | --- | ---
    `static String` | `DO_DYNAMIC` |
    `static String` | `POST_TYPECHECKING_REPLACEMENT` |

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

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `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 DO_DYNAMIC

    - #### public static final String POST_TYPECHECKING_REPLACEMENT

  - ### Method Detail

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

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