public class CompilationTask
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
CompilationResult |
please()
Starts the compilation of this task
|
CompilationTask |
sourceCode(java.lang.String... lines)
Adds source code to the compilation task
|
CompilationTask |
sourceCode(java.lang.String code)
Adds source code to the compilation task
|
CompilationTask |
sourcePath(java.io.File file)
Adds the source code path to search for class or interface definitions (-sourcepath options of javac)
|
CompilationTask |
sourcePath(java.lang.String sourcePath)
Same as
sourcePath(File) but the path is specified as a string |
CompilationTask |
withProcessor(javax.annotation.processing.Processor processor)
Adds annotation processor to the processors list
|
public CompilationTask sourceCode(java.lang.String code)
code - whole Java file with package, imports and other codepublic CompilationTask sourceCode(java.lang.String... lines)
lines - whole Java file with package, imports and other code.
All lines will be concatenated in a single string with '\n' delimiter.public CompilationTask sourcePath(java.io.File file)
file - that specifies the source code pathpublic CompilationTask sourcePath(java.lang.String sourcePath)
sourcePath(File) but the path is specified as a stringsourcePath - source code pathpublic CompilationTask withProcessor(javax.annotation.processing.Processor processor)
processor - instance of annotation processorpublic CompilationResult please()