Class SpringTestCompilerAutoConfiguration
java.lang.Object
org.springframework.boot.cli.compiler.CompilerAutoConfiguration
org.springframework.boot.cli.compiler.autoconfigure.SpringTestCompilerAutoConfiguration
CompilerAutoConfiguration for Spring Test.- Since:
- 1.1.0
- Author:
- Dave Syer
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidapply(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 additional configuration.voidapplyDependencies(DependencyCustomizer dependencies) Apply any dependency customizations.voidapplyImports(org.codehaus.groovy.control.customizers.ImportCustomizer imports) Apply any import customizations.booleanmatches(org.codehaus.groovy.ast.ClassNode classNode) Strategy method used to determine when compiler auto-configuration should be applied.Methods inherited from class org.springframework.boot.cli.compiler.CompilerAutoConfiguration
applyToMainClass
-
Constructor Details
-
SpringTestCompilerAutoConfiguration
public SpringTestCompilerAutoConfiguration()
-
-
Method Details
-
matches
public boolean matches(org.codehaus.groovy.ast.ClassNode classNode) Description copied from class:CompilerAutoConfigurationStrategy method used to determine when compiler auto-configuration should be applied. Defaults to always.- Overrides:
matchesin classCompilerAutoConfiguration- Parameters:
classNode- the class node- Returns:
trueif the compiler should be auto-configured using this class. If this method returnsfalseno other strategy methods will be called.
-
applyDependencies
Description copied from class:CompilerAutoConfigurationApply any dependency customizations. This method will only be called ifCompilerAutoConfiguration.matches(org.codehaus.groovy.ast.ClassNode)returnstrue.- Overrides:
applyDependenciesin classCompilerAutoConfiguration- Parameters:
dependencies- dependency customizer
-
apply
public void apply(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:CompilerAutoConfigurationApply any additional configuration.- Overrides:
applyin classCompilerAutoConfiguration- Parameters:
loader- the class loader being used during compilationconfiguration- the compiler configurationgeneratorContext- the current contextsource- the source unitclassNode- the class- Throws:
org.codehaus.groovy.control.CompilationFailedException- if the configuration cannot be applied
-
applyImports
public void applyImports(org.codehaus.groovy.control.customizers.ImportCustomizer imports) throws org.codehaus.groovy.control.CompilationFailedException Description copied from class:CompilerAutoConfigurationApply any import customizations. This method will only be called ifCompilerAutoConfiguration.matches(org.codehaus.groovy.ast.ClassNode)returnstrue.- Overrides:
applyImportsin classCompilerAutoConfiguration- Parameters:
imports- import customizer- Throws:
org.codehaus.groovy.control.CompilationFailedException- if the imports cannot be applied
-