public class AntCompilerAdapter
extends org.apache.tools.ant.taskdefs.compilers.DefaultCompilerAdapter
CompilerAdapter
for the "ant" tool
that silently ignores most of the configuration parameters and attempts to compile all given
source files into class files.attributes, bootclasspath, compileClasspath, compileList, compileSourcepath, debug, depend, deprecation, destDir, encoding, extdirs, includeAntRuntime, includeJavaRuntime, location, lSep, memoryInitialSize, memoryMaximumSize, modulepath, moduleSourcepath, optimize, project, release, src, target, upgrademodulepath, verbose
Constructor and Description |
---|
AntCompilerAdapter() |
Modifier and Type | Method and Description |
---|---|
boolean |
execute()
Compile all source files in
DefaultCompilerAdapter.compileList individually and
write class files in directory DefaultCompilerAdapter.destDir . |
private static java.io.File[] |
pathToFiles(org.apache.tools.ant.types.Path path)
Convert a
Path into an array of
File . |
private static java.io.File[] |
pathToFiles(org.apache.tools.ant.types.Path path,
java.io.File[] defaultValue)
Convert a
Path into an array of
File . |
addCurrentCompilerArgs, addExtdirsToClasspath, assumeJava11, assumeJava12, assumeJava13, assumeJava14, assumeJava15, assumeJava16, assumeJava17, assumeJava18, assumeJava19, assumeJava9, assumeJava9Plus, executeExternalCompile, executeExternalCompile, getBootClassPath, getCompileClasspath, getJavac, getModulepath, getModulesourcepath, getNoDebugArgument, getProject, getSupportedFileExtensions, getUpgrademodulepath, logAndAddFilesToCompile, setJavac, setupJavacCommand, setupJavacCommand, setupJavacCommandlineSwitches, setupJavacCommandlineSwitches, setupModernJavacCommand, setupModernJavacCommandlineSwitches
public boolean execute()
DefaultCompilerAdapter.compileList
individually and
write class files in directory DefaultCompilerAdapter.destDir
.
The following fields of DefaultCompilerAdapter
are honored:
DefaultCompilerAdapter.compileList
- the set of Java™ source files to compile
DefaultCompilerAdapter.destDir
- where to store the class files
DefaultCompilerAdapter.compileSourcepath
- where to look for more Java™ source files
DefaultCompilerAdapter.compileClasspath
- where to look for required classes
DefaultCompilerAdapter.extdirs
DefaultCompilerAdapter.bootclasspath
DefaultCompilerAdapter.encoding
- how the Java™ source files are encoded
DefaultCompilerAdapter.verbose
DefaultCompilerAdapter.debug
org.apache.tools.ant.taskdefs.Javac.getDebugLevel()
DefaultCompilerAdapter.src
DefaultCompilerAdapter
are not honored at this time:
DefaultCompilerAdapter.depend
DefaultCompilerAdapter.deprecation
DefaultCompilerAdapter.includeAntRuntime
DefaultCompilerAdapter.includeJavaRuntime
DefaultCompilerAdapter.location
DefaultCompilerAdapter.optimize
DefaultCompilerAdapter.target
private static java.io.File[] pathToFiles(org.apache.tools.ant.types.Path path)
Path
into an array of
File
.path
- null
if path
is null
private static java.io.File[] pathToFiles(org.apache.tools.ant.types.Path path, java.io.File[] defaultValue)
Path
into an array of
File
.path
- defaultValue
- path
is null
, the defaultValue