All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.codehaus.groovy.control.ASTTransformationsContext Maven / Gradle / Ivy

The newest version!
package org.codehaus.groovy.control;

import groovy.lang.GroovyClassLoader;
import org.codehaus.groovy.control.CompilationUnit;

import java.util.HashSet;
import java.util.Set;

/**
 * Stores state information about global AST transformations applied to a compilation unit.
 *
 * @author Cedric Champeau
*/
public class ASTTransformationsContext {
    protected final GroovyClassLoader transformLoader;  // Classloader for global and local transforms

    protected final CompilationUnit compilationUnit; // The compilation unit global AST transformations are applied on
    protected final Set globalTransformNames = new HashSet(); // collected AST transformation names

    public ASTTransformationsContext(final CompilationUnit compilationUnit, final GroovyClassLoader transformLoader) {
        this.compilationUnit = compilationUnit;
        this.transformLoader = transformLoader;
    }

    public CompilationUnit getCompilationUnit() {
        return compilationUnit;
    }

    public Set getGlobalTransformNames() {
        return globalTransformNames;
    }

    public GroovyClassLoader getTransformLoader() {
        return transformLoader;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy