Class SpringBootCompilerAutoConfiguration
java.lang.Object
org.springframework.boot.cli.compiler.CompilerAutoConfiguration
org.springframework.boot.cli.compiler.autoconfigure.SpringBootCompilerAutoConfiguration
CompilerAutoConfiguration
for Spring.- Since:
- 1.0.0
- Author:
- Dave Syer, Phillip Webb
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
applyDependencies
(DependencyCustomizer dependencies) Apply any dependency customizations.void
applyImports
(org.codehaus.groovy.control.customizers.ImportCustomizer imports) Apply any import customizations.void
applyToMainClass
(groovy.lang.GroovyClassLoader loader, GroovyCompilerConfiguration configuration, org.codehaus.groovy.classgen.GeneratorContext generatorContext, org.codehaus.groovy.control.SourceUnit source, org.codehaus.groovy.ast.ClassNode classNode) Apply any customizations to the main class.Methods inherited from class org.springframework.boot.cli.compiler.CompilerAutoConfiguration
apply, matches
-
Constructor Details
-
SpringBootCompilerAutoConfiguration
public SpringBootCompilerAutoConfiguration()
-
-
Method Details
-
applyDependencies
Description copied from class:CompilerAutoConfiguration
Apply any dependency customizations. This method will only be called ifCompilerAutoConfiguration.matches(org.codehaus.groovy.ast.ClassNode)
returnstrue
.- Overrides:
applyDependencies
in classCompilerAutoConfiguration
- Parameters:
dependencies
- dependency customizer
-
applyImports
public void applyImports(org.codehaus.groovy.control.customizers.ImportCustomizer imports) Description copied from class:CompilerAutoConfiguration
Apply any import customizations. This method will only be called ifCompilerAutoConfiguration.matches(org.codehaus.groovy.ast.ClassNode)
returnstrue
.- Overrides:
applyImports
in classCompilerAutoConfiguration
- Parameters:
imports
- import customizer
-
applyToMainClass
public void applyToMainClass(groovy.lang.GroovyClassLoader loader, GroovyCompilerConfiguration configuration, org.codehaus.groovy.classgen.GeneratorContext generatorContext, org.codehaus.groovy.control.SourceUnit source, org.codehaus.groovy.ast.ClassNode classNode) throws org.codehaus.groovy.control.CompilationFailedException Description copied from class:CompilerAutoConfiguration
Apply any customizations to the main class. This method will only be called ifCompilerAutoConfiguration.matches(org.codehaus.groovy.ast.ClassNode)
returnstrue
. This method is useful when a groovy file defines more than one class but customization only applies to the first class.- Overrides:
applyToMainClass
in classCompilerAutoConfiguration
- Parameters:
loader
- the class loader being used during compilationconfiguration
- the compiler configurationgeneratorContext
- the current contextsource
- the source unitclassNode
- the main class- Throws:
org.codehaus.groovy.control.CompilationFailedException
- if the customizations cannot be applied
-