Package: org.codehaus.groovy.transform

## [Java] Class StaticTypesTransformation

- org.codehaus.groovy.transform.StaticTypesTransformation

- All Implemented Interfaces and Traits:
    ASTTransformation, CompilationUnitAware

      @GroovyASTTransformation(phase = CompilePhase.INSTRUCTION_SELECTION)
      public class StaticTypesTransformation
      extends Object
      implements ASTTransformation, CompilationUnitAware

  Handles the implementation of the TypeChecked transformation.

- - ### Field Summary

    Fields
    Modifiers | Name | Description
    --- | --- | ---
    `static String` | `STATIC_ERROR_PREFIX` |
    `protected CompilationUnit` | `compilationUnit` |

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `protected void` | `addTypeCheckingExtensions(StaticTypeCheckingVisitor visitor, Expression extensions)`
    `` | `protected SourceUnit` | `getSourceUnit()`
    `` | `protected StaticTypeCheckingVisitor` | `newVisitor(SourceUnit unit, ClassNode node)` Allows subclasses to provide their own visitor.
    `` | `public void` | `setCompilationUnit(CompilationUnit unit)`
    `` | `public Expression` | `transform(Expression expression)`
    `` | `public void` | `visit(ASTNode[] nodes, SourceUnit source)`

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class Object` | `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### public static final String STATIC_ERROR_PREFIX

    - #### protected CompilationUnit compilationUnit

  - ### Method Detail

    - #### protected void addTypeCheckingExtensions(StaticTypeCheckingVisitor visitor, Expression extensions)

    - #### @Override
      protected SourceUnit getSourceUnit()

    - #### protected StaticTypeCheckingVisitor newVisitor(SourceUnit unit, ClassNode node)

      Allows subclasses to provide their own visitor. This is useful for example for transformations relying on the static type checker.

      Parameters:
        `unit` - the source unit
        `node` - the current classnode
      Returns:
        a static type checking visitor

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

    - #### @Override
      public Expression transform(Expression expression)

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