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.PrimaryClassNodeOperation, CompilationUnit.ProgressCallback, CompilationUnit.SourceUnitOperation
-
-
Field Summary
-
Fields inherited from class org.codehaus.groovy.control.CompilationUnit
ast, astTransformationsContext, classgenCallback, classNodeResolver, classSourcesByPublicClassName, configured, debug, generatedClasses, names, optimizer, progressCallback, queuedSources, resolveVisitor, sources, staticImportVisitor, summariesByPublicClassName, summariesBySourceName, verifier
-
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
All Methods Instance Methods Concrete Methods 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 for compile(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, addNewPhaseOperation, addPhaseOperation, addPhaseOperation, addPhaseOperation, addSource, addSource, addSource, addSources, addSources, applyToGeneratedGroovyClasses, applyToPrimaryClassNodes, applyToSourceUnits, compile, createClassVisitor, dequeued, getAST, getASTTransformationsContext, getClasses, getClassgenCallback, getClassNode, getClassNodeResolver, getClassSourcesByPublicClassName, getFirstClassNode, getProgressCallback, getSummariesByPublicClassName, getSummariesBySourceName, getTransformLoader, isPublicClass, 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
-
-
-
-
Constructor Detail
-
JavaStubCompilationUnit
public JavaStubCompilationUnit(CompilerConfiguration config, GroovyClassLoader gcl, java.io.File destDir)
-
JavaStubCompilationUnit
public JavaStubCompilationUnit(CompilerConfiguration config, GroovyClassLoader gcl)
-
-
Method Detail
-
getStubCount
public int getStubCount()
-
compile
public void compile() throws CompilationFailedException
Description copied from class:CompilationUnit
Synonym for compile(Phases.ALL).- Overrides:
compile
in classCompilationUnit
- Throws:
CompilationFailedException
-
configure
public void configure(CompilerConfiguration config)
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
public SourceUnit addSource(java.io.File file)
Description copied from class:CompilationUnit
Adds a source file to the unit.- Overrides:
addSource
in classCompilationUnit
-
addSource
public SourceUnit addSource(java.net.URL url)
Description copied from class:CompilationUnit
Adds a source file to the unit.- Overrides:
addSource
in classCompilationUnit
-
-