public class GroovyCompiler extends Object
GroovyClassLoader.parseClass(GroovyCodeSource) with the following additional
features:
CompilerAutoConfiguration strategies will be read from
META-INF/services/org.springframework.boot.cli.compiler.CompilerAutoConfiguration
(per the standard java ServiceLoader contract) and applied during compilation
ClassLoader.getResource(String)| Constructor and Description |
|---|
GroovyCompiler(GroovyCompilerConfiguration configuration)
Create a new
GroovyCompiler instance. |
| Modifier and Type | Method and Description |
|---|---|
void |
addCompilationCustomizers(org.codehaus.groovy.control.customizers.CompilationCustomizer... customizers) |
Class<?>[] |
compile(String... sources)
Compile the specified Groovy sources, applying any
CompilerAutoConfigurations. |
List<org.codehaus.groovy.transform.ASTTransformation> |
getAstTransformations()
Return a mutable list of the
ASTTransformations to be applied during
compile(String...). |
ExtendedGroovyClassLoader |
getLoader() |
public GroovyCompiler(GroovyCompilerConfiguration configuration)
GroovyCompiler instance.configuration - the compiler configurationpublic List<org.codehaus.groovy.transform.ASTTransformation> getAstTransformations()
ASTTransformations to be applied during
compile(String...).public ExtendedGroovyClassLoader getLoader()
public void addCompilationCustomizers(org.codehaus.groovy.control.customizers.CompilationCustomizer... customizers)
public Class<?>[] compile(String... sources) throws org.codehaus.groovy.control.CompilationFailedException, IOException
CompilerAutoConfigurations. All classes defined in the sources will be
returned from this method.sources - the sources to compileorg.codehaus.groovy.control.CompilationFailedException - in case of compilation failuresIOException - in case of I/O errorsorg.codehaus.groovy.control.CompilationFailedException - in case of compilation errorsCopyright © 2016 Pivotal Software, Inc.. All rights reserved.