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
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 -
Method Summary
Modifier and TypeMethodDescriptionprotected StaticTypeCheckingVisitornewVisitor(SourceUnit unit, ClassNode node) Creates the type checking visitor used by this transformation.voidvisit(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
-
Constructor Details
-
StaticCompileTransformation
public StaticCompileTransformation()
-
-
Method Details
-
visit
Applies static type checking and rewrites the annotated class or method for static compilation.- Specified by:
visitin interfaceASTTransformation- Overrides:
visitin classStaticTypesTransformation- Parameters:
nodes- the annotation node and the annotated target nodesource- the source unit being transformed
-
newVisitor
Creates the type checking visitor used by this transformation.- Overrides:
newVisitorin classStaticTypesTransformation- Parameters:
unit- the source unit being processednode- the class node that anchors the visit- Returns:
- the static compilation visitor for the class
-