public class GroovyCompiler extends java.lang.Object
Compiler for Groovy sources. Primarily a simple Facade for groovy.lang.GroovyClassLoader#parseClass(groovy.lang.GroovyCodeSource) with the following additional features:
META-INF/services/org.springframework.boot.cli.compiler.CompilerAutoConfiguration
(per the standard java java.util.ServiceLoader contract) and applied during compilation
Constructor and description |
---|
GroovyCompiler(GroovyCompilerConfiguration configuration) Create a new GroovyCompiler instance. |
Type Params | Return Type | Name and description |
---|---|---|
|
public void |
addCompilationCustomizers(org.codehaus.groovy.control.customizers.CompilationCustomizer customizers) |
|
public void |
call(org.codehaus.groovy.control.SourceUnit source) |
|
public java.lang.Class<?>[] |
compile(java.lang.String sources) Compile the specified Groovy sources, applying any CompilerAutoConfigurations. |
|
public java.util.List<org.codehaus.groovy.transform.ASTTransformation> |
getAstTransformations() Return a mutable list of the org.codehaus.groovy.transform.ASTTransformations to be applied during compile(String...). |
|
public ExtendedGroovyClassLoader |
getLoader() |
Methods inherited from class | Name |
---|---|
class java.lang.Object |
java.lang.Object#equals(java.lang.Object), java.lang.Object#getClass(), java.lang.Object#hashCode(), java.lang.Object#notify(), java.lang.Object#notifyAll(), java.lang.Object#toString(), java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int) |
Create a new GroovyCompiler instance.
configuration
- the compiler configurationCompile the specified Groovy sources, applying any CompilerAutoConfigurations. All classes defined in the sources will be returned from this method.
sources
- the sources to compileReturn a mutable list of the org.codehaus.groovy.transform.ASTTransformations to be applied during compile(String...).