| Prev Class | Next Class | Frames | No Frames |
| Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Objectpublic class Aptextends JavacNested Class Summary | |
static class |
|
Nested classes/interfaces inherited from class org.apache.tools.ant.taskdefs.Javac | |
Javac.ImplementationSpecificArgument | |
Field Summary | |
static String |
|
static String |
|
static String |
|
static String |
|
Fields inherited from class org.apache.tools.ant.taskdefs.Javac | |
compileList, failOnError, listFiles | |
Fields inherited from class org.apache.tools.ant.taskdefs.MatchingTask | |
fileset | |
Fields inherited from class org.apache.tools.ant.ProjectComponent | |
description, location, project | |
Constructor Summary | |
| |
Method Summary | |
Path |
|
Apt.Option |
|
void |
|
String |
|
String |
|
String |
|
Path |
|
Vector |
|
File |
|
boolean |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
Methods inherited from class org.apache.tools.ant.taskdefs.MatchingTask | |
XsetIgnore, XsetItems, add, addAnd, addContains, addContainsRegexp, addCustom, addDate, addDepend, addDepth, addDifferent, addFilename, addMajority, addModified, addNone, addNot, addOr, addPresent, addSelector, addSize, addType, appendSelector, createExclude, createExcludesFile, createInclude, createIncludesFile, createPatternSet, getDirectoryScanner, getImplicitFileSet, getSelectors, hasSelectors, selectorCount, selectorElements, setCaseSensitive, setDefaultexcludes, setExcludes, setExcludesfile, setFollowSymlinks, setIncludes, setIncludesfile, setProject | |
Methods inherited from class org.apache.tools.ant.Task | |
bindToOwner, execute, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType | |
Methods inherited from class org.apache.tools.ant.ProjectComponent | |
clone, getDescription, getLocation, getProject, log, log, setDescription, setLocation, setProject | |
public static final String ERROR_IGNORING_COMPILER_OPTION
An warning message when ignoring compiler attribute.
public static final String ERROR_WRONG_JAVA_VERSION
A warning message if used with java <321.5.
public static final String EXECUTABLE_NAME
The name of the apt tool.
public static final String WARNING_IGNORING_FORK
exposed for debug messages
public Apt()
Construtor for Apt task. This sets the apt compiler adapter as the compiler in the super class.
public Path createFactoryPath()
Add a path to the factoryPath attribute.
- Returns:
- a path to be configured.
public Apt.Option createOption()
Create a nested option.
- Returns:
- an option to be configured.
public void execute()
throws BuildExceptionDo the compilation.
- Throws:
BuildException- on error.
public String getAptExecutable()
Get the name of the apt executable.
- Returns:
- the name of the executable.
public String getCompiler()
Get the compiler class name.
- Overrides:
- getCompiler in interface Javac
- Returns:
- the compiler class name.
public String getFactory()
Get the factory option for the apt compiler. If this is non-null the "-factory" argument will be used.
- Returns:
- the value of the factory option.
public Path getFactoryPath()
Get the factory path attribute. If this is not null, the "-factorypath" argument will be used. The default value is null.
- Returns:
- the factory path attribute.
public Vector getOptions()
Get the options to the compiler. Each option will use '"-E" name ["=" value]' argument.
- Returns:
- the options.
public File getPreprocessDir()
Get the preprocessdir attribute. This corresponds to the "-s" argument. The default value is null.
- Returns:
- the preprocessdir attribute.
public boolean isCompile()
Get the compile option for the apt compiler. If this is false the "-nocompile" argument will be used.
- Returns:
- the value of the compile option.
public void setCompile(boolean compile)
Set the compile option for the apt compiler. Default value is true.
- Parameters:
compile- if true set the compile option.
public void setCompiler(String compiler)
Set the compiler. This is not allowed and a warning log message is made.
- Overrides:
- setCompiler in interface Javac
- Parameters:
compiler- not used.
public void setFactory(String factory)
Set the factory option for the apt compiler. Default value is null.
- Parameters:
factory- the classname of the factory.
public void setFactoryPathRef(Reference ref)
Add a reference to a path to the factoryPath attribute.
- Parameters:
ref- a reference to a path.
public void setFork(boolean fork)
Set the fork attribute. Non-forking APT is highly classpath dependent and appears to be too brittle to work. The sole reason this attribute is retained is the superclass does it
- Parameters:
fork- if false; warn the option is ignored.
public void setPreprocessDir(File preprocessDir)
Set the preprocessdir attribute.
- Parameters:
preprocessDir- where to place processor generated source files.