org.apache.beehive.controls.runtime.generator
Class AptTask
Object
ProjectComponent
Task
MatchingTask
Javac
AptTask
- All Implemented Interfaces:
- SelectorContainer
public class AptTask
- extends Javac
The AptTask class defines a custom ANT task for invoking APT-based code generation. It
derives from the built-in task, so all of the attributes and nested elements of that
task are supported, for source list selection, classpath selection, compiler arguments,
etc. Each of these options will be passed onto APT for processing.
AptTask also adds some new attributes:
- gendir - specifies the directory where temporary source files that are produced during
generation will be kept.
- srcExtensions - provides a comma-separated list of source file extensions that are
considered valid input to APT. The default value is "*.java".
-
Nested classes/interfaces inherited from class Javac |
Javac.ImplementationSpecificArgument |
Fields inherited from class Javac |
compileList, failOnError, listFiles |
Fields inherited from class MatchingTask |
fileset |
Fields inherited from class Task |
description, location, taskName, taskType, wrapper |
Fields inherited from class ProjectComponent |
project |
Method Summary |
void |
execute()
|
protected void |
scanDir(File srcDir,
File destDir,
String[] files,
String ext)
Override the implementation of scanDir, to look for additional files based upon any
specified source extensions |
void |
setCompileByExtension(boolean compileByExt)
The compileByExtension attribute causes each input source extension to be compiled
independently (and sequentially). |
void |
setGendir(File genDir)
The gendir attribute specifies the name of the output directory for any files generated
as a result of calling APT. |
void |
setNocompile(boolean nocompile)
The nocompile attribute disables compilation of the input source file list and any
generated sources that are derived from them. |
void |
setProcessorOptions(String processorOptions)
The srcExtensions attribute can be set to a comma-separated list of processor options
(of the form option or option= value) to be passed to
APT. |
void |
setSrcExtensions(String srcExts)
The srcExtensions attribute can be set to a comma-separated list of source filename
extensions that are considered to be valid inputs to APT processing. |
Methods inherited from class Javac |
checkParameters, compile, createBootclasspath, createClasspath, createCompilerArg, createExtdirs, createSourcepath, createSrc, getBootclasspath, getClasspath, getCompiler, getCompilerVersion, getCurrentCompilerArgs, getDebug, getDebugLevel, getDepend, getDeprecation, getDestdir, getEncoding, getExecutable, getExtdirs, getFailonerror, getFileList, getIncludeantruntime, getIncludejavaruntime, getJavacExecutable, getListfiles, getMemoryInitialSize, getMemoryMaximumSize, getNowarn, getOptimize, getSource, getSourcepath, getSrcdir, getSystemJavac, getTarget, getTempdir, getVerbose, isForkedJavac, isJdkCompiler, recreateSrc, resetFileLists, scanDir, setBootclasspath, setBootClasspathRef, setClasspath, setClasspathRef, setCompiler, setDebug, setDebugLevel, setDepend, setDeprecation, setDestdir, setEncoding, setExecutable, setExtdirs, setFailonerror, setFork, setIncludeantruntime, setIncludejavaruntime, setListfiles, setMemoryInitialSize, setMemoryMaximumSize, setNowarn, setOptimize, setProceed, setSource, setSourcepath, setSourcepathRef, setSrcdir, setTarget, setTempdir, setVerbose |
Methods inherited from class 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 Task |
getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, maybeConfigure, perform, reconfigure, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType |
Methods inherited from class ProjectComponent |
getProject |
Methods inherited from class Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_nocompile
protected boolean _nocompile
_compileByExt
protected boolean _compileByExt
_hasSourcepath
protected boolean _hasSourcepath
_genDir
protected File _genDir
_srcExts
protected Vector _srcExts
_processorOptions
protected Vector _processorOptions
AptTask
public AptTask()
setSrcExtensions
public void setSrcExtensions(String srcExts)
- The srcExtensions attribute can be set to a comma-separated list of source filename
extensions that are considered to be valid inputs to APT processing.
The default value is "*.java".
setProcessorOptions
public void setProcessorOptions(String processorOptions)
- The srcExtensions attribute can be set to a comma-separated list of processor options
(of the form option or option
=
value) to be passed to
APT.
setGendir
public void setGendir(File genDir)
- The gendir attribute specifies the name of the output directory for any files generated
as a result of calling APT.
setNocompile
public void setNocompile(boolean nocompile)
- The nocompile attribute disables compilation of the input source file list and any
generated sources that are derived from them. The default value is 'false'.
setCompileByExtension
public void setCompileByExtension(boolean compileByExt)
- The compileByExtension attribute causes each input source extension to be compiled
independently (and sequentially). This is useful when one type of extensio can
possibly depend upon the generation output from another. The default value 'false'.
scanDir
protected void scanDir(File srcDir,
File destDir,
String[] files,
String ext)
- Override the implementation of scanDir, to look for additional files based upon any
specified source extensions
execute
public void execute()
throws BuildException
- Overrides:
execute
in class Javac
- Throws:
BuildException