Class ASTTransformationsContext

java.lang.Object
org.codehaus.groovy.control.ASTTransformationsContext

public class ASTTransformationsContext extends Object
Stores state information about global AST transformations applied to a compilation unit.
  • Field Details

    • transformLoader

      protected final GroovyClassLoader transformLoader
      Class loader used to load global and local AST transformations.
    • compilationUnit

      protected final CompilationUnit compilationUnit
      Compilation unit that receives the transformations.
    • globalTransformNames

      protected final Set<String> 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 transformed
      transformLoader - the class loader used for transformation classes
  • Method Details

    • getCompilationUnit

      public CompilationUnit getCompilationUnit()
      Returns the compilation unit associated with this context.
      Returns:
      the owning compilation unit
    • getGlobalTransformNames

      public Set<String> getGlobalTransformNames()
      Returns the names of applied global AST transformations.
      Returns:
      the recorded transformation names
    • getTransformLoader

      public GroovyClassLoader getTransformLoader()
      Returns the class loader used to load transformations.
      Returns:
      the transformation class loader