|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.tools.ant.ProjectComponent org.apache.tools.ant.Task org.apache.tools.ant.taskdefs.MatchingTask org.apache.tools.ant.taskdefs.Javac org.apache.tools.ant.taskdefs.Apt
public class Apt
Apt Task for running the Annotation processing tool for JDK 1.5. It derives from the existing Javac task, and forces the compiler based on whether we're executing internally, or externally.
Nested Class Summary | |
---|---|
static class |
Apt.Option
The nested option element. |
Nested classes/interfaces inherited from class org.apache.tools.ant.taskdefs.Javac |
---|
Javac.ImplementationSpecificArgument |
Field Summary | |
---|---|
static java.lang.String |
ERROR_IGNORING_COMPILER_OPTION
An warning message when ignoring compiler attribute. |
static java.lang.String |
ERROR_WRONG_JAVA_VERSION
A warning message if used with java < 1.5. |
static java.lang.String |
EXECUTABLE_NAME
The name of the apt tool. |
static java.lang.String |
WARNING_IGNORING_FORK
exposed for debug messages |
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.Task |
---|
target, taskName, taskType, wrapper |
Fields inherited from class org.apache.tools.ant.ProjectComponent |
---|
description, location, project |
Constructor Summary | |
---|---|
Apt()
Construtor for Apt task. |
Method Summary | |
---|---|
Path |
createFactoryPath()
Add a path to the factoryPath attribute. |
Apt.Option |
createOption()
Create a nested option. |
void |
execute()
Do the compilation. |
java.lang.String |
getAptExecutable()
Get the name of the apt executable. |
java.lang.String |
getCompiler()
Get the compiler class name. |
java.lang.String |
getFactory()
Get the factory option for the apt compiler. |
Path |
getFactoryPath()
Get the factory path attribute. |
java.util.Vector |
getOptions()
Get the options to the compiler. |
java.io.File |
getPreprocessDir()
Get the preprocessdir attribute. |
boolean |
isCompile()
Get the compile option for the apt compiler. |
void |
setCompile(boolean compile)
Set the compile option for the apt compiler. |
void |
setCompiler(java.lang.String compiler)
Set the compiler. |
void |
setFactory(java.lang.String factory)
Set the factory option for the apt compiler. |
void |
setFactoryPathRef(Reference ref)
Add a reference to a path to the factoryPath attribute. |
void |
setFork(boolean fork)
Set the fork attribute. |
void |
setPreprocessDir(java.io.File preprocessDir)
Set the preprocessdir attribute. |
Methods inherited from class org.apache.tools.ant.taskdefs.MatchingTask |
---|
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, XsetIgnore, XsetItems |
Methods inherited from class org.apache.tools.ant.Task |
---|
bindToOwner, 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, setDescription, setLocation |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String EXECUTABLE_NAME
public static final java.lang.String ERROR_IGNORING_COMPILER_OPTION
public static final java.lang.String ERROR_WRONG_JAVA_VERSION
public static final java.lang.String WARNING_IGNORING_FORK
Constructor Detail |
---|
public Apt()
Method Detail |
---|
public java.lang.String getAptExecutable()
public void setCompiler(java.lang.String compiler)
setCompiler
in class Javac
compiler
- not used.public void setFork(boolean fork)
setFork
in class Javac
fork
- if false; warn the option is ignored.public java.lang.String getCompiler()
getCompiler
in class Javac
Javac.getCompilerVersion()
public boolean isCompile()
public void setCompile(boolean compile)
compile
- if true set the compile option.public java.lang.String getFactory()
public void setFactory(java.lang.String factory)
factory
- the classname of the factory.public void setFactoryPathRef(Reference ref)
ref
- a reference to a path.public Path createFactoryPath()
public Path getFactoryPath()
public Apt.Option createOption()
public java.util.Vector getOptions()
public java.io.File getPreprocessDir()
public void setPreprocessDir(java.io.File preprocessDir)
preprocessDir
- where to place processor generated source files.public void execute() throws BuildException
execute
in class Javac
BuildException
- on error.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |