Package org.codehaus.groovy.control
Class ASTTransformationsContext
java.lang.Object
org.codehaus.groovy.control.ASTTransformationsContext
Stores state information about global AST transformations applied to a compilation unit.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final CompilationUnitCompilation unit that receives the transformations.Names of the global transformations applied so far.protected final GroovyClassLoaderClass loader used to load global and local AST transformations. -
Constructor Summary
ConstructorsConstructorDescriptionASTTransformationsContext(CompilationUnit compilationUnit, GroovyClassLoader transformLoader) Creates a context for tracking AST transformations during compilation. -
Method Summary
Modifier and TypeMethodDescriptionReturns the compilation unit associated with this context.Returns the names of applied global AST transformations.Returns the class loader used to load transformations.
-
Field Details
-
transformLoader
Class loader used to load global and local AST transformations. -
compilationUnit
Compilation unit that receives the transformations. -
globalTransformNames
Names of the global transformations applied so far.
-
-
Constructor Details
-
ASTTransformationsContext
public ASTTransformationsContext(CompilationUnit compilationUnit, GroovyClassLoader transformLoader) Creates a context for tracking AST transformations during compilation.- Parameters:
compilationUnit- the compilation unit being transformedtransformLoader- the class loader used for transformation classes
-
-
Method Details
-
getCompilationUnit
Returns the compilation unit associated with this context.- Returns:
- the owning compilation unit
-
getGlobalTransformNames
Returns the names of applied global AST transformations.- Returns:
- the recorded transformation names
-
getTransformLoader
Returns the class loader used to load transformations.- Returns:
- the transformation class loader
-