public class JavaAwareCompilationUnit extends CompilationUnit
CompilationUnit.ClassgenCallback, CompilationUnit.GroovyClassOperation, CompilationUnit.PrimaryClassNodeOperation, CompilationUnit.ProgressCallback, CompilationUnit.SourceUnitOperation
ast, astTransformationsContext, classgenCallback, classNodeResolver, classSourcesByPublicClassName, configured, debug, generatedClasses, names, optimizer, progressCallback, queuedSources, resolveVisitor, sources, staticImportVisitor, summariesByPublicClassName, summariesBySourceName, verifier
classLoader, configuration, errorCollector, phase, phaseComplete
Constructor and Description |
---|
JavaAwareCompilationUnit(CompilerConfiguration configuration) |
JavaAwareCompilationUnit(CompilerConfiguration configuration,
GroovyClassLoader groovyClassLoader) |
JavaAwareCompilationUnit(CompilerConfiguration configuration,
GroovyClassLoader groovyClassLoader,
GroovyClassLoader transformClassLoader) |
Modifier and Type | Method and Description |
---|---|
void |
addSources(File[] files)
Adds a set of source files to the unit.
|
void |
addSources(String[] paths)
Adds a set of file paths to the unit.
|
void |
configure(CompilerConfiguration configuration)
Configures its debugging mode and classloader classpath from a given compiler configuration.
|
JavaCompilerFactory |
getCompilerFactory() |
void |
gotoPhase(int phase)
Wraps up any pending operations for the current phase
and switches to the next phase.
|
void |
setCompilerFactory(JavaCompilerFactory compilerFactory) |
addClassNode, addNewPhaseOperation, addPhaseOperation, addPhaseOperation, addPhaseOperation, addSource, addSource, addSource, addSource, addSource, applyToGeneratedGroovyClasses, applyToPrimaryClassNodes, applyToSourceUnits, compile, compile, createClassVisitor, dequeued, getAST, getASTTransformationsContext, getClasses, getClassgenCallback, getClassNode, getClassNodeResolver, getClassSourcesByPublicClassName, getFirstClassNode, getProgressCallback, getSummariesByPublicClassName, getSummariesBySourceName, getTransformLoader, isPublicClass, iterator, mark, setClassgenCallback, setClassNodeResolver, setProgressCallback
completePhase, getClassLoader, getConfiguration, getErrorCollector, getPhase, getPhaseDescription, nextPhase, setClassLoader, setConfiguration
public JavaAwareCompilationUnit(CompilerConfiguration configuration)
public JavaAwareCompilationUnit(CompilerConfiguration configuration, GroovyClassLoader groovyClassLoader)
public JavaAwareCompilationUnit(CompilerConfiguration configuration, GroovyClassLoader groovyClassLoader, GroovyClassLoader transformClassLoader)
public void gotoPhase(int phase) throws CompilationFailedException
ProcessingUnit
gotoPhase
in class ProcessingUnit
CompilationFailedException
public void configure(CompilerConfiguration configuration)
CompilationUnit
URLClassLoader
.configure
in class CompilationUnit
public void addSources(String[] paths)
CompilationUnit
addSources
in class CompilationUnit
public void addSources(File[] files)
CompilationUnit
addSources
in class CompilationUnit
public JavaCompilerFactory getCompilerFactory()
public void setCompilerFactory(JavaCompilerFactory compilerFactory)