org.apache.tools.ant.taskdefs.compilers

Class AptCompilerAdapter

public class AptCompilerAdapter extends DefaultCompilerAdapter

The 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
static StringAPT_ENTRY_POINT
class in tools.jar that implements APT
static StringAPT_METHOD_NAME
method used to compile.
Method Summary
booleanexecute()
Run the compilation.
protected AptgetApt()
Get the facade task that fronts this adapter
protected voidsetAptCommandlineSwitches(Commandline cmd)
using our front end task, set up the command line switches

Field Detail

APT_ENTRY_POINT

public static final String APT_ENTRY_POINT
class in tools.jar that implements APT

APT_METHOD_NAME

public static final String APT_METHOD_NAME
method used to compile.

Method Detail

execute

public boolean execute()
Run the compilation.

Returns: true on success.

Throws: BuildException if the compilation has problems.

getApt

protected Apt getApt()
Get the facade task that fronts this adapter

Returns: task instance

See Also: 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