Package org.codehaus.groovy.tools.javac
Class JavaStubCompilationUnit
java.lang.Object
org.codehaus.groovy.control.ProcessingUnit
org.codehaus.groovy.control.CompilationUnit
org.codehaus.groovy.tools.javac.JavaStubCompilationUnit
public class JavaStubCompilationUnit extends CompilationUnit
Compilation unit to only generate stubs.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.codehaus.groovy.control.CompilationUnit
CompilationUnit.ClassgenCallback, CompilationUnit.GroovyClassOperation, CompilationUnit.IGroovyClassOperation, CompilationUnit.IPrimaryClassNodeOperation, CompilationUnit.ISourceUnitOperation, CompilationUnit.PrimaryClassNodeOperation, CompilationUnit.ProgressCallback, CompilationUnit.SourceUnitOperation
-
Field Summary
Fields inherited from class org.codehaus.groovy.control.CompilationUnit
ast, astTransformationsContext, classgenCallback, classNodeResolver, configured, debug, progressCallback, queuedSources, resolveVisitor, sources
Fields inherited from class org.codehaus.groovy.control.ProcessingUnit
classLoader, configuration, errorCollector, phase, phaseComplete
-
Constructor Summary
Constructors Constructor Description JavaStubCompilationUnit(CompilerConfiguration config, GroovyClassLoader gcl)
JavaStubCompilationUnit(CompilerConfiguration config, GroovyClassLoader gcl, java.io.File destDir)
-
Method Summary
Modifier and Type Method Description SourceUnit
addSource(java.io.File file)
Adds a source file to the unit.SourceUnit
addSource(java.net.URL url)
Adds a source file to the unit.void
compile()
Synonym forcompile(Phases.ALL)
.void
configure(CompilerConfiguration config)
Configures its debugging mode and classloader classpath from a given compiler configuration.int
getStubCount()
Methods inherited from class org.codehaus.groovy.control.CompilationUnit
addClassNode, addFirstPhaseOperation, addFirstPhaseOperation, addJavaCompilationUnits, addNewPhaseOperation, addNewPhaseOperation, addPhaseOperation, addPhaseOperation, addPhaseOperation, addPhaseOperation, addPhaseOperation, addPhaseOperation, addSource, addSource, addSource, addSources, addSources, applyToPrimaryClassNodes, applyToSourceUnits, compile, createClassVisitor, dequeued, getAST, getASTTransformationsContext, getClasses, getClassgenCallback, getClassNode, getClassNodeResolver, getFirstClassNode, getJavaCompilationUnitSet, getProgressCallback, getTransformLoader, iterator, mark, setClassgenCallback, setClassNodeResolver, setProgressCallback
Methods inherited from class org.codehaus.groovy.control.ProcessingUnit
completePhase, getClassLoader, getConfiguration, getErrorCollector, getPhase, getPhaseDescription, gotoPhase, isPhaseComplete, nextPhase, setClassLoader, setConfiguration
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
JavaStubCompilationUnit
public JavaStubCompilationUnit(CompilerConfiguration config, GroovyClassLoader gcl, java.io.File destDir) -
JavaStubCompilationUnit
-
-
Method Details
-
getStubCount
public int getStubCount() -
compile
Description copied from class:CompilationUnit
Synonym forcompile(Phases.ALL)
.- Overrides:
compile
in classCompilationUnit
- Throws:
CompilationFailedException
-
configure
Description copied from class:CompilationUnit
Configures its debugging mode and classloader classpath from a given compiler configuration. This cannot be done more than once due to limitations inURLClassLoader
.- Overrides:
configure
in classCompilationUnit
-
addSource
Description copied from class:CompilationUnit
Adds a source file to the unit.- Overrides:
addSource
in classCompilationUnit
-
addSource
Description copied from class:CompilationUnit
Adds a source file to the unit.- Overrides:
addSource
in classCompilationUnit
-