public class JavaStubCompilationUnit
extends CompilationUnit
Compilation unit to only generate stubs.
| Fields inherited from class | Fields |
|---|---|
class CompilationUnit |
ast, astTransformationsContext, classNodeResolver, classgenCallback, configured, debug, progressCallback, queuedSources, resolveVisitor, sources |
class ProcessingUnit |
classLoader, configuration, errorCollector, phase, phaseComplete |
| Constructor and description |
|---|
JavaStubCompilationUnit(CompilerConfiguration config, GroovyClassLoader gcl, File destDir)Creates a compilation unit that generates Java stubs into the supplied destination directory. |
JavaStubCompilationUnit(CompilerConfiguration config, GroovyClassLoader gcl)Creates a compilation unit that generates Java stubs into the configured stub directory. |
| Type Params | Return Type | Name and description |
|---|---|---|
|
public SourceUnit |
addSource(File file)Adds a source file when its extension is accepted for stub generation. |
|
public SourceUnit |
addSource(URL url)Adds a source URL when its extension is accepted for stub generation. |
|
public void |
compile()Compiles sources through the conversion phase to generate stubs only. |
|
public void |
configure(CompilerConfiguration config)Configures the compilation unit and makes the target directory visible to the Groovy class loader. |
|
public int |
getStubCount()Returns the number of stubs generated during the last compilation run. |
Creates a compilation unit that generates Java stubs into the supplied destination directory.
config - the compiler configurationgcl - the Groovy class loader to usedestDir - the destination directory for generated stubsCreates a compilation unit that generates Java stubs into the configured stub directory.
config - the compiler configurationgcl - the Groovy class loader to useAdds a source file when its extension is accepted for stub generation.
file - the source file to addnull if the extension is not
acceptedAdds a source URL when its extension is accepted for stub generation.
url - the source URL to addnull if the extension is not
acceptedCompiles sources through the conversion phase to generate stubs only.
Configures the compilation unit and makes the target directory visible to the Groovy class loader.
config - the compiler configuration to applyReturns the number of stubs generated during the last compilation run.
Copyright © 2003-2026 The Apache Software Foundation. All rights reserved.