public final class JkJavaCompileSpec<T>
extends java.lang.Object
implements java.lang.Cloneable
Modifier and Type | Field and Description |
---|---|
T |
__
Owner for parent chaining
|
static java.lang.String |
ENCODING_OPTS |
static java.lang.String |
PROCESSOR_OPTS |
static java.lang.String |
SOURCE_OPTS |
static java.lang.String |
TARGET_OPTS |
Modifier and Type | Method and Description |
---|---|
JkJavaCompileSpec<T> |
addOptions(java.lang.Iterable<java.lang.String> options)
|
JkJavaCompileSpec<T> |
addOptions(java.lang.String... options)
Adds specified options to pass to the compileRunner.
|
JkJavaCompileSpec<T> |
addSources(java.lang.Iterable<java.nio.file.Path> paths)
Adds specified source files to the set of java sources to compile.
|
JkJavaCompileSpec<T> |
addSources(JkPathTree tree) |
JkJavaCompileSpec<T> |
addSources(JkPathTreeSet treeSet) |
JkJavaCompileSpec<T> |
addSources(java.nio.file.Path path1,
java.nio.file.Path path2,
java.nio.file.Path... files) |
JkJavaCompileSpec<T> |
clone() |
JkJavaCompileSpec<T> |
disableAnnotationProcessing()
Disable annotation processing.
|
java.lang.String |
getEncoding() |
java.lang.String |
getNextValue(java.lang.String optionName) |
java.util.List<java.lang.String> |
getOptions()
Returns the specifications as a list of string directly usable in the
JkJavaCompiler except
sourcepath |
java.nio.file.Path |
getOutputDir() |
java.util.List<java.nio.file.Path> |
getSourceFiles()
Returns all source files to be compiled.
|
JkJavaVersion |
getSourceVersion() |
JkJavaVersion |
getTargetVersion() |
static JkJavaCompileSpec<java.lang.Void> |
of() |
static <T> JkJavaCompileSpec<T> |
ofParent(T o) |
JkJavaCompileSpec<T> |
setAnnotationProcessingOnly()
Only process annotation.
|
JkJavaCompileSpec<T> |
setAnnotationProcessors(java.lang.String... annotationProcessorClassNames)
Sets specified annotation classes instead of using the ones discovered by default Java 6 mechanism.
|
JkJavaCompileSpec<T> |
setClasspath(java.lang.Iterable<java.nio.file.Path> files)
Creates a copy of this
JkJavaCompiler but with the specified
classpath. |
JkJavaCompileSpec<T> |
setEncoding(java.lang.String encoding)
Creates a copy of this
JkJavaCompileSpec but using the
specified source encoding (e.g. |
JkJavaCompileSpec<T> |
setOption(java.lang.String optionName,
java.lang.String optionValue)
Some options of a compileRunner are set in a couple of name/value (version, classpath, .....).
|
JkJavaCompileSpec<T> |
setOutputDir(java.nio.file.Path outputDir) |
JkJavaCompileSpec<T> |
setSourceAndTargetVersion(JkJavaVersion version)
Shorthand for #setSourceVersion chained to #setTargetVersion
|
JkJavaCompileSpec<T> |
setSourceVersion(JkJavaVersion version)
Sets the version of source code accepted.
|
JkJavaCompileSpec<T> |
setTargetVersion(JkJavaVersion version)
Sets the target Java version for compiled classes.
|
public static final java.lang.String SOURCE_OPTS
public static final java.lang.String TARGET_OPTS
public static final java.lang.String PROCESSOR_OPTS
public static final java.lang.String ENCODING_OPTS
public final T __
public static JkJavaCompileSpec<java.lang.Void> of()
public static <T> JkJavaCompileSpec<T> ofParent(T o)
public JkJavaCompileSpec<T> clone()
clone
in class java.lang.Object
public java.util.List<java.lang.String> getOptions()
JkJavaCompiler
except
sourcepathpublic java.nio.file.Path getOutputDir()
public JkJavaCompileSpec<T> setOutputDir(java.nio.file.Path outputDir)
public JkJavaVersion getSourceVersion()
public JkJavaVersion getTargetVersion()
public JkJavaCompileSpec<T> setSourceVersion(JkJavaVersion version)
public JkJavaCompileSpec<T> setTargetVersion(JkJavaVersion version)
JkJavaCompiler
can choose to use the appropriate compileRunner to compile to the
specified target.public JkJavaCompileSpec<T> setSourceAndTargetVersion(JkJavaVersion version)
public java.lang.String getEncoding()
public JkJavaCompileSpec<T> setEncoding(java.lang.String encoding)
JkJavaCompileSpec
but using the
specified source encoding (e.g. UTF-8). If null
is specified,
then default plateform encoding will be used.public JkJavaCompileSpec<T> addSources(java.lang.Iterable<java.nio.file.Path> paths)
public JkJavaCompileSpec<T> addSources(JkPathTree tree)
public JkJavaCompileSpec<T> addSources(JkPathTreeSet treeSet)
public JkJavaCompileSpec<T> addSources(java.nio.file.Path path1, java.nio.file.Path path2, java.nio.file.Path... files)
addSources(Iterable)
public java.util.List<java.nio.file.Path> getSourceFiles()
public JkJavaCompileSpec<T> setClasspath(java.lang.Iterable<java.nio.file.Path> files)
JkJavaCompiler
but with the specified
classpath.public JkJavaCompileSpec<T> addOptions(java.lang.String... options)
javac -deprecation -cp path1 path2
, you should pass "-deprecation",
"-cp", "path1", "path2" parameters.public JkJavaCompileSpec<T> addOptions(java.lang.Iterable<java.lang.String> options)
public JkJavaCompileSpec<T> setOption(java.lang.String optionName, java.lang.String optionValue)
public JkJavaCompileSpec<T> setAnnotationProcessors(java.lang.String... annotationProcessorClassNames)
public JkJavaCompileSpec<T> disableAnnotationProcessing()
public JkJavaCompileSpec<T> setAnnotationProcessingOnly()
public java.lang.String getNextValue(java.lang.String optionName)