Class CompilerConfiguration


  • public class CompilerConfiguration
    extends java.lang.Object
    • Field Detail

      • outputLocation

        private java.lang.String outputLocation
      • classpathEntries

        private java.util.List<java.lang.String> classpathEntries
      • modulepathEntries

        private java.util.List<java.lang.String> modulepathEntries
      • sourceFiles

        private java.util.Set<java.io.File> sourceFiles
      • sourceLocations

        private java.util.List<java.lang.String> sourceLocations
      • includes

        private java.util.Set<java.lang.String> includes
      • excludes

        private java.util.Set<java.lang.String> excludes
      • debug

        private boolean debug
      • debugLevel

        private java.lang.String debugLevel
      • showWarnings

        private boolean showWarnings
      • failOnWarning

        private boolean failOnWarning
        -Werror argument as supported since Java 1.7
      • showDeprecation

        private boolean showDeprecation
      • sourceVersion

        private java.lang.String sourceVersion
      • targetVersion

        private java.lang.String targetVersion
      • releaseVersion

        private java.lang.String releaseVersion
        value of -release parameter in java 9+
      • sourceEncoding

        private java.lang.String sourceEncoding
      • moduleVersion

        private java.lang.String moduleVersion
        value of --module-version parameter in java 9+
      • customCompilerArguments

        private java.util.Collection<java.util.Map.Entry<java.lang.String,​java.lang.String>> customCompilerArguments
      • fork

        private boolean fork
      • optimize

        private boolean optimize
      • meminitial

        private java.lang.String meminitial
      • maxmem

        private java.lang.String maxmem
      • executable

        private java.lang.String executable
      • workingDirectory

        private java.io.File workingDirectory
      • compilerVersion

        private java.lang.String compilerVersion
      • verbose

        private boolean verbose
      • parameters

        private boolean parameters
        Since:
        2.8.2
      • buildDirectory

        private java.io.File buildDirectory
        A build temporary directory, eg target/.

        Used by the compiler implementation to put temporary files.

      • outputFileName

        private java.lang.String outputFileName
        Used to control the name of the output file when compiling a set of sources to a single file.
      • generatedSourcesDirectory

        private java.io.File generatedSourcesDirectory
        in jdk 1.6+, used to hold value of the -s path parameter.
      • proc

        private java.lang.String proc
        value of the -proc parameter in jdk 1.6+
      • annotationProcessors

        private java.lang.String[] annotationProcessors
        -processor parameters in jdk 1.6+
      • processorPathEntries

        private java.util.List<java.lang.String> 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.
      • forceJavacCompilerUse

        private boolean forceJavacCompilerUse
        force usage of old JavacCompiler even if javax.tools is detected
        Since:
        2.0
    • Constructor Detail

      • CompilerConfiguration

        public CompilerConfiguration()
    • Method Detail

      • setOutputLocation

        public void setOutputLocation​(java.lang.String outputLocation)
      • getOutputLocation

        public java.lang.String getOutputLocation()
      • addClasspathEntry

        public void addClasspathEntry​(java.lang.String classpathEntry)
      • setClasspathEntries

        public void setClasspathEntries​(java.util.List<java.lang.String> classpathEntries)
      • getClasspathEntries

        public java.util.List<java.lang.String> getClasspathEntries()
      • addModulepathEntry

        public void addModulepathEntry​(java.lang.String modulepathEntry)
      • setModulepathEntries

        public void setModulepathEntries​(java.util.List<java.lang.String> modulepathEntries)
      • getModulepathEntries

        public java.util.List<java.lang.String> getModulepathEntries()
      • setSourceFiles

        public void setSourceFiles​(java.util.Set<java.io.File> sourceFiles)
      • getSourceFiles

        public java.util.Set<java.io.File> getSourceFiles()
      • addSourceLocation

        public void addSourceLocation​(java.lang.String sourceLocation)
      • setSourceLocations

        public void setSourceLocations​(java.util.List<java.lang.String> sourceLocations)
      • getSourceLocations

        public java.util.List<java.lang.String> getSourceLocations()
      • addInclude

        public void addInclude​(java.lang.String include)
      • setIncludes

        public void setIncludes​(java.util.Set<java.lang.String> includes)
      • getIncludes

        public java.util.Set<java.lang.String> getIncludes()
      • addExclude

        public void addExclude​(java.lang.String exclude)
      • setExcludes

        public void setExcludes​(java.util.Set<java.lang.String> excludes)
      • getExcludes

        public java.util.Set<java.lang.String> getExcludes()
      • setDebug

        public void setDebug​(boolean debug)
      • isDebug

        public boolean isDebug()
      • setDebugLevel

        public void setDebugLevel​(java.lang.String debugLevel)
      • getDebugLevel

        public java.lang.String getDebugLevel()
      • setShowWarnings

        public void setShowWarnings​(boolean showWarnings)
      • isShowWarnings

        public boolean isShowWarnings()
      • isShowDeprecation

        public boolean isShowDeprecation()
      • setShowDeprecation

        public void setShowDeprecation​(boolean showDeprecation)
      • isFailOnWarning

        public boolean isFailOnWarning()
      • setFailOnWarning

        public void setFailOnWarning​(boolean failOnWarnings)
      • getSourceVersion

        public java.lang.String getSourceVersion()
      • setSourceVersion

        public void setSourceVersion​(java.lang.String sourceVersion)
      • getTargetVersion

        public java.lang.String getTargetVersion()
      • setTargetVersion

        public void setTargetVersion​(java.lang.String targetVersion)
      • getReleaseVersion

        public java.lang.String getReleaseVersion()
      • setReleaseVersion

        public void setReleaseVersion​(java.lang.String releaseVersion)
      • getSourceEncoding

        public java.lang.String getSourceEncoding()
      • setSourceEncoding

        public void setSourceEncoding​(java.lang.String sourceEncoding)
      • getModuleVersion

        public java.lang.String getModuleVersion()
      • setModuleVersion

        public void setModuleVersion​(java.lang.String moduleVersion)
      • addCompilerCustomArgument

        public void addCompilerCustomArgument​(java.lang.String customArgument,
                                              java.lang.String value)
      • getCustomCompilerArguments

        @Deprecated
        public java.util.LinkedHashMap<java.lang.String,​java.lang.String> getCustomCompilerArguments()
        Deprecated.
        will be removed in 2.X use #getCustomCompilerArgumentsAsMap
        Returns:
      • setCustomCompilerArguments

        @Deprecated
        public void setCustomCompilerArguments​(java.util.LinkedHashMap<java.lang.String,​java.lang.String> customCompilerArguments)
        Deprecated.
        will be removed in 2.X use #setCustomCompilerArgumentsAsMap
        Parameters:
        customCompilerArguments -
      • getCustomCompilerArgumentsAsMap

        public java.util.Map<java.lang.String,​java.lang.String> getCustomCompilerArgumentsAsMap()
        Get all unique argument keys and their value. In case of duplicate keys, last one added wins.
        Returns:
        See Also:
        getCustomCompilerArgumentsEntries()
      • setCustomCompilerArgumentsAsMap

        public void setCustomCompilerArgumentsAsMap​(java.util.Map<java.lang.String,​java.lang.String> customCompilerArguments)
      • getCustomCompilerArgumentsEntries

        public 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
        Returns:
      • isFork

        public boolean isFork()
      • setFork

        public void setFork​(boolean fork)
      • getMeminitial

        public java.lang.String getMeminitial()
      • setMeminitial

        public void setMeminitial​(java.lang.String meminitial)
      • getMaxmem

        public java.lang.String getMaxmem()
      • setMaxmem

        public void setMaxmem​(java.lang.String maxmem)
      • getExecutable

        public java.lang.String getExecutable()
      • setExecutable

        public void setExecutable​(java.lang.String executable)
      • getWorkingDirectory

        public java.io.File getWorkingDirectory()
      • setWorkingDirectory

        public void setWorkingDirectory​(java.io.File workingDirectory)
      • getBuildDirectory

        public java.io.File getBuildDirectory()
      • setBuildDirectory

        public void setBuildDirectory​(java.io.File buildDirectory)
      • getOutputFileName

        public java.lang.String getOutputFileName()
      • setOutputFileName

        public void setOutputFileName​(java.lang.String outputFileName)
      • isOptimize

        public boolean isOptimize()
      • setOptimize

        public void setOptimize​(boolean optimize)
      • getCompilerVersion

        public java.lang.String getCompilerVersion()
      • setCompilerVersion

        public void setCompilerVersion​(java.lang.String compilerVersion)
      • isVerbose

        public boolean isVerbose()
      • setVerbose

        public void setVerbose​(boolean verbose)
      • isParameters

        public boolean isParameters()
      • setParameters

        public void setParameters​(boolean parameters)
      • setProc

        public void setProc​(java.lang.String proc)
      • setGeneratedSourcesDirectory

        public void setGeneratedSourcesDirectory​(java.io.File generatedSourcesDirectory)
      • getGeneratedSourcesDirectory

        public java.io.File getGeneratedSourcesDirectory()
      • getProc

        public java.lang.String getProc()
      • setAnnotationProcessors

        public void setAnnotationProcessors​(java.lang.String[] annotationProcessors)
      • getAnnotationProcessors

        public java.lang.String[] getAnnotationProcessors()
      • addProcessorPathEntry

        public void addProcessorPathEntry​(java.lang.String entry)
        -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

        public java.util.List<java.lang.String> 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

        public void setProcessorPathEntries​(java.util.List<java.lang.String> 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.
        Parameters:
        processorPathEntries - the processorPathEntries to set
      • isForceJavacCompilerUse

        public boolean isForceJavacCompilerUse()
      • setForceJavacCompilerUse

        public void setForceJavacCompilerUse​(boolean forceJavacCompilerUse)