public class CompilerConfiguration
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
CompilerConfiguration.CompilerReuseStrategy
Re-use strategy of the compiler (implement for java only).
|
Modifier and Type | Field and Description |
---|---|
private java.lang.String[] |
annotationProcessors
-processor parameters in jdk 1.6+
|
private java.io.File |
buildDirectory
A build temporary directory, eg target/.
|
private java.util.List<java.lang.String> |
classpathEntries |
private CompilerConfiguration.CompilerReuseStrategy |
compilerReuseStrategy
default value
CompilerReuseStrategy.ReuseCreated |
private java.lang.String |
compilerVersion |
private java.util.Collection<java.util.Map.Entry<java.lang.String,java.lang.String>> |
customCompilerArguments |
private boolean |
debug |
private java.lang.String |
debugLevel |
private java.util.Set<java.lang.String> |
excludes |
private java.lang.String |
executable |
private boolean |
failOnWarning
-Werror argument as supported since Java 1.7
|
private boolean |
forceJavacCompilerUse
force usage of old JavacCompiler even if javax.tools is detected
|
private boolean |
fork |
private java.io.File |
generatedSourcesDirectory
in jdk 1.6+, used to hold value of the -s path parameter.
|
private java.util.Set<java.lang.String> |
includes |
private java.lang.String |
maxmem |
private java.lang.String |
meminitial |
private java.util.List<java.lang.String> |
modulepathEntries |
private boolean |
optimize |
private java.lang.String |
outputFileName
Used to control the name of the output file when compiling a set of
sources to a single file.
|
private java.lang.String |
outputLocation |
private java.lang.String |
proc
value of the -proc parameter in jdk 1.6+
|
private java.util.List<java.lang.String> |
processorPathEntries
-processorpath parameter in jdk 1.6+.
|
private java.lang.String |
releaseVersion
value of -release parameter in java 9+
|
private boolean |
showDeprecation |
private boolean |
showWarnings |
private java.lang.String |
sourceEncoding |
private java.util.Set<java.io.File> |
sourceFiles |
private java.util.List<java.lang.String> |
sourceLocations |
private java.lang.String |
sourceVersion |
private java.lang.String |
targetVersion |
private boolean |
verbose |
private java.io.File |
workingDirectory |
Constructor and Description |
---|
CompilerConfiguration() |
Modifier and Type | Method and Description |
---|---|
void |
addClasspathEntry(java.lang.String classpathEntry) |
void |
addCompilerCustomArgument(java.lang.String customArgument,
java.lang.String value) |
void |
addExclude(java.lang.String exclude) |
void |
addInclude(java.lang.String include) |
void |
addModulepathEntry(java.lang.String modulepathEntry) |
void |
addProcessorPathEntry(java.lang.String entry)
-processorpath parameter in jdk 1.6+.
|
void |
addSourceLocation(java.lang.String sourceLocation) |
java.lang.String[] |
getAnnotationProcessors() |
java.io.File |
getBuildDirectory() |
java.util.List<java.lang.String> |
getClasspathEntries() |
CompilerConfiguration.CompilerReuseStrategy |
getCompilerReuseStrategy() |
java.lang.String |
getCompilerVersion() |
java.util.LinkedHashMap<java.lang.String,java.lang.String> |
getCustomCompilerArguments()
Deprecated.
will be removed in 2.X use #getCustomCompilerArgumentsAsMap
|
java.util.Map<java.lang.String,java.lang.String> |
getCustomCompilerArgumentsAsMap()
Get all unique argument keys and their value.
|
java.util.Collection<java.util.Map.Entry<java.lang.String,java.lang.String>> |
getCustomCompilerArgumentsEntries()
In case argument keys are not unique, this will return all entries
|
java.lang.String |
getDebugLevel() |
java.util.Set<java.lang.String> |
getExcludes() |
java.lang.String |
getExecutable() |
java.io.File |
getGeneratedSourcesDirectory() |
java.util.Set<java.lang.String> |
getIncludes() |
java.lang.String |
getMaxmem() |
java.lang.String |
getMeminitial() |
java.util.List<java.lang.String> |
getModulepathEntries() |
java.lang.String |
getOutputFileName() |
java.lang.String |
getOutputLocation() |
java.lang.String |
getProc() |
java.util.List<java.lang.String> |
getProcessorPathEntries()
-processorpath parameter in jdk 1.6+.
|
java.lang.String |
getReleaseVersion() |
java.lang.String |
getSourceEncoding() |
java.util.Set<java.io.File> |
getSourceFiles() |
java.util.List<java.lang.String> |
getSourceLocations() |
java.lang.String |
getSourceVersion() |
java.lang.String |
getTargetVersion() |
java.io.File |
getWorkingDirectory() |
boolean |
isDebug() |
boolean |
isFailOnWarning() |
boolean |
isForceJavacCompilerUse() |
boolean |
isFork() |
boolean |
isOptimize() |
boolean |
isShowDeprecation() |
boolean |
isShowWarnings() |
boolean |
isVerbose() |
void |
setAnnotationProcessors(java.lang.String[] annotationProcessors) |
void |
setBuildDirectory(java.io.File buildDirectory) |
void |
setClasspathEntries(java.util.List<java.lang.String> classpathEntries) |
void |
setCompilerReuseStrategy(CompilerConfiguration.CompilerReuseStrategy compilerReuseStrategy) |
void |
setCompilerVersion(java.lang.String compilerVersion) |
void |
setCustomCompilerArguments(java.util.LinkedHashMap<java.lang.String,java.lang.String> customCompilerArguments)
Deprecated.
will be removed in 2.X use #setCustomCompilerArgumentsAsMap
|
void |
setCustomCompilerArgumentsAsMap(java.util.Map<java.lang.String,java.lang.String> customCompilerArguments) |
void |
setDebug(boolean debug) |
void |
setDebugLevel(java.lang.String debugLevel) |
void |
setExcludes(java.util.Set<java.lang.String> excludes) |
void |
setExecutable(java.lang.String executable) |
void |
setFailOnWarning(boolean failOnWarnings) |
void |
setForceJavacCompilerUse(boolean forceJavacCompilerUse) |
void |
setFork(boolean fork) |
void |
setGeneratedSourcesDirectory(java.io.File generatedSourcesDirectory) |
void |
setIncludes(java.util.Set<java.lang.String> includes) |
void |
setMaxmem(java.lang.String maxmem) |
void |
setMeminitial(java.lang.String meminitial) |
void |
setModulepathEntries(java.util.List<java.lang.String> modulepathEntries) |
void |
setOptimize(boolean optimize) |
void |
setOutputFileName(java.lang.String outputFileName) |
void |
setOutputLocation(java.lang.String outputLocation) |
void |
setProc(java.lang.String proc) |
void |
setProcessorPathEntries(java.util.List<java.lang.String> processorPathEntries)
-processorpath parameter in jdk 1.6+.
|
void |
setReleaseVersion(java.lang.String releaseVersion) |
void |
setShowDeprecation(boolean showDeprecation) |
void |
setShowWarnings(boolean showWarnings) |
void |
setSourceEncoding(java.lang.String sourceEncoding) |
void |
setSourceFiles(java.util.Set<java.io.File> sourceFiles) |
void |
setSourceLocations(java.util.List<java.lang.String> sourceLocations) |
void |
setSourceVersion(java.lang.String sourceVersion) |
void |
setTargetVersion(java.lang.String targetVersion) |
void |
setVerbose(boolean verbose) |
void |
setWorkingDirectory(java.io.File workingDirectory) |
private java.lang.String outputLocation
private java.util.List<java.lang.String> classpathEntries
private java.util.List<java.lang.String> modulepathEntries
private java.util.Set<java.io.File> sourceFiles
private java.util.List<java.lang.String> sourceLocations
private java.util.Set<java.lang.String> includes
private java.util.Set<java.lang.String> excludes
private boolean debug
private java.lang.String debugLevel
private boolean showWarnings
private boolean failOnWarning
private boolean showDeprecation
private java.lang.String sourceVersion
private java.lang.String targetVersion
private java.lang.String releaseVersion
private java.lang.String sourceEncoding
private java.util.Collection<java.util.Map.Entry<java.lang.String,java.lang.String>> customCompilerArguments
private boolean fork
private boolean optimize
private java.lang.String meminitial
private java.lang.String maxmem
private java.lang.String executable
private java.io.File workingDirectory
private java.lang.String compilerVersion
private boolean verbose
private java.io.File buildDirectory
private java.lang.String outputFileName
private java.io.File generatedSourcesDirectory
private java.lang.String proc
private java.lang.String[] annotationProcessors
private java.util.List<java.lang.String> processorPathEntries
private CompilerConfiguration.CompilerReuseStrategy compilerReuseStrategy
CompilerReuseStrategy.ReuseCreated
private boolean forceJavacCompilerUse
public void setOutputLocation(java.lang.String outputLocation)
public java.lang.String getOutputLocation()
public void addClasspathEntry(java.lang.String classpathEntry)
public void setClasspathEntries(java.util.List<java.lang.String> classpathEntries)
public java.util.List<java.lang.String> getClasspathEntries()
public void addModulepathEntry(java.lang.String modulepathEntry)
public void setModulepathEntries(java.util.List<java.lang.String> modulepathEntries)
public java.util.List<java.lang.String> getModulepathEntries()
public void setSourceFiles(java.util.Set<java.io.File> sourceFiles)
public java.util.Set<java.io.File> getSourceFiles()
public void addSourceLocation(java.lang.String sourceLocation)
public void setSourceLocations(java.util.List<java.lang.String> sourceLocations)
public java.util.List<java.lang.String> getSourceLocations()
public void addInclude(java.lang.String include)
public void setIncludes(java.util.Set<java.lang.String> includes)
public java.util.Set<java.lang.String> getIncludes()
public void addExclude(java.lang.String exclude)
public void setExcludes(java.util.Set<java.lang.String> excludes)
public java.util.Set<java.lang.String> getExcludes()
public void setDebug(boolean debug)
public boolean isDebug()
public void setDebugLevel(java.lang.String debugLevel)
public java.lang.String getDebugLevel()
public void setShowWarnings(boolean showWarnings)
public boolean isShowWarnings()
public boolean isShowDeprecation()
public void setShowDeprecation(boolean showDeprecation)
public boolean isFailOnWarning()
public void setFailOnWarning(boolean failOnWarnings)
public java.lang.String getSourceVersion()
public void setSourceVersion(java.lang.String sourceVersion)
public java.lang.String getTargetVersion()
public void setTargetVersion(java.lang.String targetVersion)
public java.lang.String getReleaseVersion()
public void setReleaseVersion(java.lang.String releaseVersion)
public java.lang.String getSourceEncoding()
public void setSourceEncoding(java.lang.String sourceEncoding)
public void addCompilerCustomArgument(java.lang.String customArgument, java.lang.String value)
@Deprecated public java.util.LinkedHashMap<java.lang.String,java.lang.String> getCustomCompilerArguments()
@Deprecated public void setCustomCompilerArguments(java.util.LinkedHashMap<java.lang.String,java.lang.String> customCompilerArguments)
customCompilerArguments
- public java.util.Map<java.lang.String,java.lang.String> getCustomCompilerArgumentsAsMap()
getCustomCompilerArgumentsEntries()
public void setCustomCompilerArgumentsAsMap(java.util.Map<java.lang.String,java.lang.String> customCompilerArguments)
public java.util.Collection<java.util.Map.Entry<java.lang.String,java.lang.String>> getCustomCompilerArgumentsEntries()
public boolean isFork()
public void setFork(boolean fork)
public java.lang.String getMeminitial()
public void setMeminitial(java.lang.String meminitial)
public java.lang.String getMaxmem()
public void setMaxmem(java.lang.String maxmem)
public java.lang.String getExecutable()
public void setExecutable(java.lang.String executable)
public java.io.File getWorkingDirectory()
public void setWorkingDirectory(java.io.File workingDirectory)
public java.io.File getBuildDirectory()
public void setBuildDirectory(java.io.File buildDirectory)
public java.lang.String getOutputFileName()
public void setOutputFileName(java.lang.String outputFileName)
public boolean isOptimize()
public void setOptimize(boolean optimize)
public java.lang.String getCompilerVersion()
public void setCompilerVersion(java.lang.String compilerVersion)
public boolean isVerbose()
public void setVerbose(boolean verbose)
public void setProc(java.lang.String proc)
public void setGeneratedSourcesDirectory(java.io.File generatedSourcesDirectory)
public java.io.File getGeneratedSourcesDirectory()
public java.lang.String getProc()
public void setAnnotationProcessors(java.lang.String[] annotationProcessors)
public java.lang.String[] getAnnotationProcessors()
public void addProcessorPathEntry(java.lang.String entry)
entry
- processor path entry to addpublic java.util.List<java.lang.String> getProcessorPathEntries()
public void setProcessorPathEntries(java.util.List<java.lang.String> processorPathEntries)
processorPathEntries
- the processorPathEntries to setpublic CompilerConfiguration.CompilerReuseStrategy getCompilerReuseStrategy()
public void setCompilerReuseStrategy(CompilerConfiguration.CompilerReuseStrategy compilerReuseStrategy)
public boolean isForceJavacCompilerUse()
public void setForceJavacCompilerUse(boolean forceJavacCompilerUse)