Package org.codehaus.plexus.compiler
Class CompilerConfiguration
java.lang.Object
org.codehaus.plexus.compiler.CompilerConfiguration
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
Re-use strategy of the compiler (implement for java only). -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate String[]
-processor parameters in jdk 1.6+private File
A build temporary directory, eg target/.default valueCompilerConfiguration.CompilerReuseStrategy.ReuseCreated
private String
private Collection<Map.Entry<String,
String>> private boolean
private String
force a different of the debug file containing the forked command run (such javac.sh)private String
private boolean
configure--enable-preview
of java compilerprivate String
private boolean
-Werror argument as supported since Java 1.7private boolean
force usage of old JavacCompiler even if javax.tools is detectedprivate boolean
private File
in jdk 1.6+, used to hold value of the -s path parameter.private String
value of-implicit:
of java compilerprivate String
private String
private String
value of --module-version parameter in java 9+private boolean
private String
Used to control the name of the output file when compiling a set of sources to a single file.private String
private boolean
private String
value of the -proc parameter in jdk 1.6+--processor-module-path parameter in jdk 9+.-processorpath parameter in jdk 1.6+.private String
value of -release parameter in java 9+private boolean
private boolean
private boolean
private String
private String
private String
private boolean
private String
private File
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addClasspathEntry
(String classpathEntry) void
addCompilerCustomArgument
(String customArgument, String value) void
addExclude
(String exclude) void
addInclude
(String include) void
addModulepathEntry
(String modulepathEntry) void
void
addProcessorPathEntry
(String entry) -processorpath parameter in jdk 1.6+.void
addSourceLocation
(String sourceLocation) describe()
String[]
Get all unique argument keys and their value.In case argument keys are not unique, this will return all entriesgetProc()
-processorpath parameter in jdk 1.6+.boolean
isDebug()
boolean
boolean
boolean
boolean
isFork()
boolean
boolean
boolean
boolean
boolean
boolean
void
setAnnotationProcessors
(String[] annotationProcessors) void
setBuildDirectory
(File buildDirectory) void
setClasspathEntries
(List<String> classpathEntries) void
setCompilerReuseStrategy
(CompilerConfiguration.CompilerReuseStrategy compilerReuseStrategy) void
setCompilerVersion
(String compilerVersion) void
setCustomCompilerArgumentsAsMap
(Map<String, String> customCompilerArguments) void
setDebug
(boolean debug) void
setDebugFileName
(String debugFileName) void
setDebugLevel
(String debugLevel) void
setEnablePreview
(boolean enablePreview) void
setExcludes
(Set<String> excludes) void
setExecutable
(String executable) void
setFailOnWarning
(boolean failOnWarnings) void
setForceJavacCompilerUse
(boolean forceJavacCompilerUse) void
setFork
(boolean fork) void
setGeneratedSourcesDirectory
(File generatedSourcesDirectory) void
setImplicitOption
(String implicitOption) void
setIncludes
(Set<String> includes) void
void
setMeminitial
(String meminitial) void
setModulepathEntries
(List<String> modulepathEntries) void
setModuleVersion
(String moduleVersion) void
setOptimize
(boolean optimize) void
setOutputFileName
(String outputFileName) void
setOutputLocation
(String outputLocation) void
setParameters
(boolean parameters) void
void
setProcessorModulePathEntries
(List<String> processorModulePathEntries) void
setProcessorPathEntries
(List<String> processorPathEntries) -processorpath parameter in jdk 1.6+.void
setReleaseVersion
(String releaseVersion) void
setShowDeprecation
(boolean showDeprecation) void
setShowLint
(boolean showLint) void
setShowWarnings
(boolean showWarnings) void
setSourceEncoding
(String sourceEncoding) void
setSourceFiles
(Set<File> sourceFiles) void
setSourceLocations
(List<String> sourceLocations) void
setSourceVersion
(String sourceVersion) void
setTargetVersion
(String targetVersion) void
setVerbose
(boolean verbose) void
setWarnings
(String warnings) void
setWorkingDirectory
(File workingDirectory)
-
Field Details
-
outputLocation
-
classpathEntries
-
modulepathEntries
-
sourceFiles
-
sourceLocations
-
includes
-
excludes
-
debug
private boolean debug -
debugLevel
-
showWarnings
private boolean showWarnings -
warnings
-
showLint
private boolean showLint -
failOnWarning
private boolean failOnWarning-Werror argument as supported since Java 1.7 -
showDeprecation
private boolean showDeprecation -
sourceVersion
-
targetVersion
-
releaseVersion
value of -release parameter in java 9+ -
sourceEncoding
-
moduleVersion
value of --module-version parameter in java 9+ -
customCompilerArguments
-
fork
private boolean fork -
optimize
private boolean optimize -
meminitial
-
maxmem
-
executable
-
workingDirectory
-
compilerVersion
-
verbose
private boolean verbose -
parameters
private boolean parameters- Since:
- 2.8.2
-
buildDirectory
A build temporary directory, eg target/. Used by the compiler implementation to put temporary files. -
outputFileName
Used to control the name of the output file when compiling a set of sources to a single file. -
generatedSourcesDirectory
in jdk 1.6+, used to hold value of the -s path parameter. -
proc
value of the -proc parameter in jdk 1.6+ -
annotationProcessors
-processor parameters in jdk 1.6+ -
processorPathEntries
-processorpath parameter in jdk 1.6+. If specified, annotation processors are only searched in the processor path. Otherwise they are searched in the classpath. -
processorModulePathEntries
--processor-module-path parameter in jdk 9+. If specified, annotation processors are only searched in the processor path. Otherwise they are searched in the modulepath. -
compilerReuseStrategy
default valueCompilerConfiguration.CompilerReuseStrategy.ReuseCreated
- Since:
- 1.9
-
forceJavacCompilerUse
private boolean forceJavacCompilerUseforce usage of old JavacCompiler even if javax.tools is detected- Since:
- 2.0
-
debugFileName
force a different of the debug file containing the forked command run (such javac.sh)- Since:
- 2.9.1
-
enablePreview
private boolean enablePreviewconfigure--enable-preview
of java compiler -
implicitOption
value of-implicit:
of java compiler
-
-
Constructor Details
-
CompilerConfiguration
public CompilerConfiguration()
-
-
Method Details
-
setOutputLocation
-
getOutputLocation
-
addClasspathEntry
-
setClasspathEntries
-
getClasspathEntries
-
addModulepathEntry
-
setModulepathEntries
-
getModulepathEntries
-
setSourceFiles
-
getSourceFiles
-
addSourceLocation
-
setSourceLocations
-
getSourceLocations
-
addInclude
-
setIncludes
-
getIncludes
-
addExclude
-
setExcludes
-
getExcludes
-
setDebug
public void setDebug(boolean debug) -
isDebug
public boolean isDebug() -
setDebugLevel
-
getDebugLevel
-
setWarnings
-
isShowWarnings
public boolean isShowWarnings() -
setShowWarnings
public void setShowWarnings(boolean showWarnings) -
isShowDeprecation
public boolean isShowDeprecation() -
getWarnings
-
setShowLint
public void setShowLint(boolean showLint) -
isShowLint
public boolean isShowLint() -
setShowDeprecation
public void setShowDeprecation(boolean showDeprecation) -
isFailOnWarning
public boolean isFailOnWarning() -
setFailOnWarning
public void setFailOnWarning(boolean failOnWarnings) -
getSourceVersion
-
setSourceVersion
-
getTargetVersion
-
setTargetVersion
-
getReleaseVersion
-
setReleaseVersion
-
getSourceEncoding
-
setSourceEncoding
-
getModuleVersion
-
setModuleVersion
-
addCompilerCustomArgument
-
getCustomCompilerArgumentsAsMap
Get all unique argument keys and their value. In case of duplicate keys, last one added wins.- Returns:
- See Also:
-
setCustomCompilerArgumentsAsMap
-
getCustomCompilerArgumentsEntries
In case argument keys are not unique, this will return all entries- Returns:
-
isFork
public boolean isFork() -
setFork
public void setFork(boolean fork) -
getMeminitial
-
setMeminitial
-
getMaxmem
-
setMaxmem
-
getExecutable
-
setExecutable
-
getWorkingDirectory
-
setWorkingDirectory
-
getBuildDirectory
-
setBuildDirectory
-
getOutputFileName
-
setOutputFileName
-
isOptimize
public boolean isOptimize() -
setOptimize
public void setOptimize(boolean optimize) -
getCompilerVersion
-
setCompilerVersion
-
isVerbose
public boolean isVerbose() -
setVerbose
public void setVerbose(boolean verbose) -
isParameters
public boolean isParameters() -
setParameters
public void setParameters(boolean parameters) -
isEnablePreview
public boolean isEnablePreview() -
setEnablePreview
public void setEnablePreview(boolean enablePreview) -
setProc
-
setGeneratedSourcesDirectory
-
getGeneratedSourcesDirectory
-
getProc
-
setAnnotationProcessors
-
getAnnotationProcessors
-
addProcessorPathEntry
-processorpath parameter in jdk 1.6+. If specified, annotation processors are only searched in the processor path. Otherwise they are searched in the classpath.- Parameters:
entry
- processor path entry to add
-
getProcessorPathEntries
-processorpath parameter in jdk 1.6+. If specified, annotation processors are only searched in the processor path. Otherwise they are searched in the classpath.- Returns:
- the processorPathEntries
-
setProcessorPathEntries
-processorpath parameter in jdk 1.6+. If specified, annotation processors are only searched in the processor path. Otherwise they are searched in the classpath.- Parameters:
processorPathEntries
- the processorPathEntries to set
-
addProcessorModulePathEntry
-
getProcessorModulePathEntries
-
setProcessorModulePathEntries
-
getCompilerReuseStrategy
-
setCompilerReuseStrategy
public void setCompilerReuseStrategy(CompilerConfiguration.CompilerReuseStrategy compilerReuseStrategy) -
getDebugFileName
-
setDebugFileName
-
isForceJavacCompilerUse
public boolean isForceJavacCompilerUse() -
setForceJavacCompilerUse
public void setForceJavacCompilerUse(boolean forceJavacCompilerUse) -
getImplicitOption
-
setImplicitOption
-
describe
-