Class TestCompiler
- java.lang.Object
- org.springframework.boot.testsupport.compiler.TestCompiler
public class TestCompiler extends Object
Wrapper to make theJavaCompiler
easier to use in tests.
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
TestCompiler.TestCompilationTask
A compilation task.
Field Summary
Fields Modifier and Type Field Description static File
SOURCE_FOLDER
The default source folder.
Constructor Summary
Constructors Constructor Description TestCompiler(JavaCompiler compiler, org.junit.rules.TemporaryFolder temporaryFolder)
TestCompiler(org.junit.rules.TemporaryFolder temporaryFolder)
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected File
getFile(Class<?> type)
File
getOutputLocation()
protected File
getSourceFolder()
TestCompiler.TestCompilationTask
getTask(Class<?>... types)
TestCompiler.TestCompilationTask
getTask(Collection<File> sourceFiles)
static String
sourcePathFor(Class<?> type)
Field Detail
SOURCE_FOLDER
public static final File SOURCE_FOLDER
The default source folder.
Constructor Detail
TestCompiler
public TestCompiler(org.junit.rules.TemporaryFolder temporaryFolder) throws IOException
- Throws:
IOException
TestCompiler
public TestCompiler(JavaCompiler compiler, org.junit.rules.TemporaryFolder temporaryFolder) throws IOException
- Throws:
IOException
Method Detail
getTask
public TestCompiler.TestCompilationTask getTask(Collection<File> sourceFiles)
getTask
public TestCompiler.TestCompilationTask getTask(Class<?>... types)
getOutputLocation
public File getOutputLocation()
sourcePathFor
public static String sourcePathFor(Class<?> type)
getSourceFolder
protected File getSourceFolder()