Class Gcj
java.lang.Object
org.apache.tools.ant.taskdefs.compilers.DefaultCompilerAdapter
org.apache.tools.ant.taskdefs.compilers.Gcj
- All Implemented Interfaces:
CompilerAdapter, CompilerAdapterExtension
The implementation of the gcj compiler.
This is primarily a cut-and-paste from the jikes.
- Since:
- Ant 1.4
-
Field Summary
Fields inherited from class DefaultCompilerAdapter
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, verboseModifier and TypeFieldDescriptionprotected Javacprotected Pathprotected Pathprotected File[]protected Pathprotected booleanprotected booleanprotected booleanprotected Fileprotected Stringprotected Pathprotected booleanprotected booleanprotected Locationprotected static final StringDeprecated.protected Stringprotected Stringprotected Pathprotected Pathprotected booleanprotected Projectprotected Stringprotected Pathprotected Stringprotected Pathprotected boolean -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanexecute()Performs a compile using the gcj compiler.booleanWhether any of the arguments given via <compilerarg> implies that compilation to native code is requested.protected CommandlineSet up the gcj commandline.Methods inherited from class DefaultCompilerAdapter
addCurrentCompilerArgs, addExtdirsToClasspath, assumeJava1_1Plus, assumeJava1_2Plus, assumeJava1_3Plus, assumeJava1_4Plus, assumeJava1_5Plus, assumeJava1_6Plus, assumeJava1_7Plus, assumeJava1_8Plus, assumeJava10Plus, 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, setupModernJavacCommandlineSwitchesModifier and TypeMethodDescriptionprotected voidAdds the command line arguments specific to the current implementation.protected voidaddExtdirsToClasspath(Path classpath) Deprecated.since 1.5.x.protected booleanShall we assume JDK 1.1+ command line switches?protected booleanShall we assume JDK 1.2+ command line switches?protected booleanShall we assume JDK 1.3+ command line switches?protected booleanShall we assume JDK 1.4+ command line switches?protected booleanShall we assume JDK 1.5+ command line switches?protected booleanShall we assume JDK 1.6+ command line switches?protected booleanShall we assume JDK 1.7+ command line switches?protected booleanShall we assume JDK 1.8+ command line switches?protected booleanShall we assume JDK 10+ command line switches?protected booleanDeprecated.since Ant 1.10.7, use assumeJava1_1Plus, if necessary combined with !assumeJava1_2Plusprotected booleanDeprecated.since Ant 1.10.7, use assumeJava1_2Plus, if necessary combined with !assumeJava1_3Plusprotected booleanDeprecated.since Ant 1.10.7, use assumeJava1_3Plus, if necessary combined with !assumeJava1_4Plusprotected booleanDeprecated.since Ant 1.10.7, use assumeJava1_4Plus, if necessary combined with !assumeJava1_5Plusprotected booleanDeprecated.since Ant 1.10.7, use assumeJava1_5Plus, if necessary combined with !assumeJava1_6Plusprotected booleanDeprecated.since Ant 1.10.7, use assumeJava1_6Plus, if necessary combined with !assumeJava1_7Plusprotected booleanDeprecated.since Ant 1.10.7, use assumeJava1_7Plus, if necessary combined with !assumeJava1_8Plusprotected booleanDeprecated.since Ant 1.10.7, use assumeJava1_8Plus, if necessary combined with !assumeJava9Plusprotected booleanDeprecated.use #assumeJava9 insteadprotected booleanDeprecated.since Ant 1.10.7, use assumeJava9Plus, in the future if necessary combined with !assumeJava10Plusprotected booleanShall we assume JDK 9+ command line switches?protected intexecuteExternalCompile(String[] args, int firstFileName) Do the compile with the specified arguments.protected intexecuteExternalCompile(String[] args, int firstFileName, boolean quoteFiles) Do the compile with the specified arguments.protected PathCombines a user specified bootclasspath with the system bootclasspath taking build.sysclasspath into account.protected PathBuilds the compilation classpath.getJavac()Get the Javac task instance associated with this compiler adapterprotected PathBuilds the modulepath.protected PathBuilds the modulesourcepath for multi module compilation.protected StringThe argument the compiler wants to see if the debug attribute has been set to false.protected ProjectGet the project this compiler adapter was created in.String[]By default, only recognize files with a Java extension, but specialized compilers can recognize multiple kinds of files.protected PathBuilds the upgrademodulepath.protected voidLogs the compilation parameters, adds the files to compile and logs the "niceSourceList"voidSet the Javac instance which contains the configured compilation attributes.protected CommandlineSet up the command line.protected CommandlinesetupJavacCommand(boolean debugLevelCheck) Does the command line argument processing for classic and adds the files to compile as well.protected CommandlineGet the command line arguments for the switches.protected CommandlinesetupJavacCommandlineSwitches(Commandline cmd, boolean useDebugLevel) Does the command line argument processing common to classic and modern.protected CommandlineDoes the command line argument processing for modern and adds the files to compile as well.protected CommandlineDoes the command line argument processing for modern.
-
Constructor Details
-
Gcj
public Gcj()
-
-
Method Details
-
execute
Performs a compile using the gcj compiler.- Returns:
- true if the compilation succeeded
- Throws:
BuildException- on error
-
setupGCJCommand
-
isNativeBuild
public boolean isNativeBuild()Whether any of the arguments given via <compilerarg> implies that compilation to native code is requested.- Returns:
- true if compilation to native code is requested
- Since:
- Ant 1.6.2
-