Package org.codehaus.groovy.control

# 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 Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected final CompilationUnit`
  `compilationUnit`
  Compilation unit that receives the transformations.
  `protected final Set<String>`
  `globalTransformNames`
  Names of the global transformations applied so far.
  `protected final GroovyClassLoader`
  `transformLoader`
  Class loader used to load global and local AST transformations.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ASTTransformationsContext(CompilationUnit compilationUnit, GroovyClassLoader transformLoader)`
  Creates a context for tracking AST transformations during compilation.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `CompilationUnit`
  `getCompilationUnit()`
  Returns the compilation unit associated with this context.
  `Set<String>`
  `getGlobalTransformNames()`
  Returns the names of applied global AST transformations.
  `GroovyClassLoader`
  `getTransformLoader()`
  Returns the class loader used to load transformations.

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

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

- ## 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