org.apache.tools.ant.taskdefs.compilersClass AptCompilerAdapter
- java.lang.Object
- org.apache.tools.ant.taskdefs.compilers.DefaultCompilerAdapter
- org.apache.tools.ant.taskdefs.compilers.AptCompilerAdapter
- All Implemented Interfaces:
- CompilerAdapter, CompilerAdapterExtension
public class AptCompilerAdapter extends DefaultCompilerAdapterThe implementation of the apt compiler for JDK 1.5.
As usual, the low level entry points for Java tools are neither documented or stable; this entry point may change from that of 1.5.0_01-b08 without any warning at all. The IDE decompile of the tool entry points is as follows:
public class Main { public Main() ; public static transient void main(String... strings); public static transient int process(String... strings); public static transient int process(PrintWriter printWriter, String... strings); public static transient int process( AnnotationProcessorFactory annotationProcessorFactory, String... strings); public static transient int process( AnnotationProcessorFactory annotationProcessorFactory, PrintWriter printWriter, String... strings); private static transient int processing( AnnotationProcessorFactory annotationProcessorFactory, PrintWriter printWriter, String... strings) ; }This Adapter is designed to run Apt in-JVM, an option that is not actually exposed to end-users, because it was too brittle during beta testing; classpath problems being the core issue.
- Since:
- Ant 1.7
Field Summary
Fields Modifier and Type Field and Description static java.lang.String
APT_ENTRY_POINT
class in tools.jar that implements APTstatic java.lang.String
APT_METHOD_NAME
method used to compile.
Fields inherited from class org.apache.tools.ant.taskdefs.compilers.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, verbose
Constructor Summary
Constructors Constructor and Description AptCompilerAdapter()
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description boolean
execute()
Run the compilation.protected Apt
getApt()
Get the facade task that fronts this adapterprotected void
setAptCommandlineSwitches(Commandline cmd)
using our front end task, set up the command line switches
Methods inherited from class org.apache.tools.ant.taskdefs.compilers.DefaultCompilerAdapter
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
Field Detail
APT_ENTRY_POINT
public static final java.lang.String APT_ENTRY_POINTclass in tools.jar that implements APT
- See Also:
- Constant Field Values
APT_METHOD_NAME
public static final java.lang.String APT_METHOD_NAMEmethod used to compile.
- See Also:
- Constant Field Values
Method Detail
getApt
protected Apt getApt()Get the facade task that fronts this adapter
- Returns:
- task instance
- See Also:
DefaultCompilerAdapter.getJavac()
setAptCommandlineSwitches
protected void setAptCommandlineSwitches(Commandline cmd)using our front end task, set up the command line switches
- Parameters:
cmd
- command line to set up
execute
public boolean execute() throws BuildExceptionRun the compilation.
- Returns:
- true on success.
- Throws:
BuildException
- if the compilation has problems.