Package org.codehaus.groovy.transform.sc

# Class StaticCompileTransformation

java.lang.Object
org.codehaus.groovy.transform.StaticTypesTransformation
org.codehaus.groovy.transform.sc.StaticCompileTransformation

All Implemented Interfaces:
  `CompilationUnitAware`, `ASTTransformation`

public class StaticCompileTransformation extends StaticTypesTransformation
Handles the implementation of the `CompileStatic` transformation.

- ## Field Summary

  ### Fields inherited from class org.codehaus.groovy.transform.StaticTypesTransformation

  `compilationUnit, STATIC_ERROR_PREFIX`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `StaticCompileTransformation()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected StaticTypeCheckingVisitor`
  `newVisitor(SourceUnit unit, ClassNode node)`
  Creates the type checking visitor used by this transformation.
  `void`
  `visit(ASTNode[] nodes, SourceUnit source)`
  Applies static type checking and rewrites the annotated class or method for static compilation.

  ### Methods inherited from class org.codehaus.groovy.transform.StaticTypesTransformation

  `addTypeCheckingExtensions, setCompilationUnit`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### StaticCompileTransformation

    public StaticCompileTransformation()

- ## Method Details

  - ### visit

    public void visit(ASTNode[] nodes, SourceUnit source)
    Applies static type checking and rewrites the annotated class or method for static compilation.
    Specified by:
      `visit` in interface `ASTTransformation`
    Overrides:
      `visit` in class `StaticTypesTransformation`
    Parameters:
      `nodes` - the annotation node and the annotated target node
      `source` - the source unit being transformed

  - ### newVisitor

    protected StaticTypeCheckingVisitor newVisitor(SourceUnit unit, ClassNode node)
    Creates the type checking visitor used by this transformation.
    Overrides:
      `newVisitor` in class `StaticTypesTransformation`
    Parameters:
      `unit` - the source unit being processed
      `node` - the class node that anchors the visit
    Returns:
      the static compilation visitor for the class