Package org.aspectj.tools.ant.taskdefs
Class Ajc2
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.aspectj.tools.ant.taskdefs.Ajc2
- All Implemented Interfaces:
org.apache.tools.ant.types.selectors.SelectorContainer
public class Ajc2
extends org.apache.tools.ant.taskdefs.Javac
Ant task for the AspectJ compiler -- AJC.
List (.lst) files are passed in as includes.
This task was developed by the AspectJ Project
- Author:
- Jeffrey Palm
- See Also:
Ajc
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
A simple class with one member --file
-- that represents an argument file.Nested classes/interfaces inherited from class org.apache.tools.ant.taskdefs.Javac
org.apache.tools.ant.taskdefs.Javac.ImplementationSpecificArgument
-
Field Summary
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
description, location, taskName, taskType, wrapper
Fields inherited from class org.apache.tools.ant.ProjectComponent
project
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionCreates a nestedArgfile
, add it to the listargfiles
, and returns the newArgfile
instance.org.apache.tools.ant.types.PatternSet.NameEntry
Override Javac.createExclude() to sethaveExcludes
totrue
.org.apache.tools.ant.types.PatternSet.NameEntry
Override Javac.createInclude() to sethaveIncludes
totrue
.void
execute()
void
Executes by first setting thebuild.compiler
property to AjcCompiler, then invokes the super.execute() method.Returns the java.util.List of argfiles.boolean
Returns if the-nocomments
flag is turned on.boolean
Returns if the-nosymbols
flag is turned on.boolean
Returns if the-preprocess
flag is turned on.Returns the number of threads.Returns the current workingdir.protected boolean
Whether we have used theexcludes
attribute.protected boolean
Whether we have used theincludes
attribute.void
prepare()
Guaranteed to be called before doing real execute.protected void
Overrides Javac.scanDir(..) so that it doesn't check dependencies.void
setArgfiles(String argfiles)
Sets the the argument files by the comma-delimited String passed in.void
setExcludes(String excludes)
Override Javac.setExcludes(String) to sethaveExcludes
totrue
.void
setIncludes(String includes)
Override Javac.setIncludes(String) to sethaveIncludes
totrue
.void
setNocomments(boolean nocomments)
Set the-nocomments
flag.void
setNosymbols(boolean nosymbols)
Set the-nosymbols
flag.void
setPreprocess(boolean preprocess)
Set the-preprocess
flag.void
setThreads(Integer threads)
Sets the number of threads.void
setWorkingdir(File workingdir)
Sets the workingdir.protected void
Methods inherited from class org.apache.tools.ant.taskdefs.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, 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 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, createExcludesFile, createIncludesFile, createPatternSet, getDirectoryScanner, getImplicitFileSet, getSelectors, hasSelectors, selectorCount, selectorElements, setCaseSensitive, setDefaultexcludes, setExcludesfile, setFollowSymlinks, setIncludesfile, setProject, XsetIgnore, XsetItems
Methods inherited from class org.apache.tools.ant.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 org.apache.tools.ant.ProjectComponent
getProject
-
Field Details
-
ADAPTER_CLASS
The name of the adapter we use.- See Also:
- Constant Field Values
-
-
Constructor Details
-
Ajc2
public Ajc2()
-
-
Method Details
-
hasExcludes
protected boolean hasExcludes()Whether we have used theexcludes
attribute.- Returns:
- Whether we have used the
excludes
attribute.
-
hasIncludes
protected boolean hasIncludes()Whether we have used theincludes
attribute.- Returns:
- Whether we have used the
includes
attribute.
-
setThreads
Sets the number of threads.- Parameters:
threads
- the number of threads.- See Also:
threads
-
getThreads
Returns the number of threads.- Returns:
- the number of threads.
- See Also:
threads
-
setNocomments
public void setNocomments(boolean nocomments)Set the-nocomments
flag.- Parameters:
nocomments
- true turns on the flag.- See Also:
nocomments
-
getNocomments
public boolean getNocomments()Returns if the-nocomments
flag is turned on.- Returns:
true
if the-nocomments
flag is on.- See Also:
nocomments
-
setNosymbols
public void setNosymbols(boolean nosymbols)Set the-nosymbols
flag.- Parameters:
nosymbols
- true turns on the flag.- See Also:
nosymbols
-
getNosymbols
public boolean getNosymbols()Returns if the-nosymbols
flag is turned on.- Returns:
true
if the-nosymbols
flag is on.- See Also:
nosymbols
-
setPreprocess
public void setPreprocess(boolean preprocess)Set the-preprocess
flag.- Parameters:
preprocess
-true
turns on the-preprocess
flag.- See Also:
preprocess
-
getPreprocess
public boolean getPreprocess()Returns if the-preprocess
flag is turned on.- Returns:
true
if the-preprocess
flag is on.- See Also:
preprocess
-
setWorkingdir
Sets the workingdir.- Parameters:
workingdir
- the new workingdir.- See Also:
workingdir
-
getWorkingdir
Returns the current workingdir.- Returns:
- the current workingdir.
- See Also:
workingdir
-
setArgfiles
Sets the the argument files by the comma-delimited String passed in.- Parameters:
argfiles
- comma-delimited String contained argument files.
-
createArgfile
Creates a nestedArgfile
, add it to the listargfiles
, and returns the newArgfile
instance.- Returns:
- a new
Argfile
instance.
-
getArgfiles
Returns the java.util.List of argfiles. This could benull
.- Returns:
- the list of argfiles.
-
createInclude
public org.apache.tools.ant.types.PatternSet.NameEntry createInclude()Override Javac.createInclude() to sethaveIncludes
totrue
.- Overrides:
createInclude
in classorg.apache.tools.ant.taskdefs.MatchingTask
- Returns:
- new PatternSet.NameEntry to be added to the include list.
- See Also:
MatchingTask.createInclude()
-
createExclude
public org.apache.tools.ant.types.PatternSet.NameEntry createExclude()Override Javac.createExclude() to sethaveExcludes
totrue
.- Overrides:
createExclude
in classorg.apache.tools.ant.taskdefs.MatchingTask
- Returns:
- new PatternSet.NameEntry to be added to the exclude list.
- See Also:
MatchingTask.createExclude()
-
setIncludes
Override Javac.setIncludes(String) to sethaveIncludes
totrue
.- Overrides:
setIncludes
in classorg.apache.tools.ant.taskdefs.MatchingTask
- Parameters:
includes
- Comma-separated list of includes.- See Also:
MatchingTask.setIncludes(java.lang.String)
-
setExcludes
Override Javac.setExcludes(String) to sethaveExcludes
totrue
.- Overrides:
setExcludes
in classorg.apache.tools.ant.taskdefs.MatchingTask
- Parameters:
excludes
- Comma-separated list of excludes.- See Also:
MatchingTask.setExcludes(java.lang.String)
-
getAdapterClass
-
execute
public final void execute() throws org.apache.tools.ant.BuildException- Overrides:
execute
in classorg.apache.tools.ant.taskdefs.Javac
- Throws:
org.apache.tools.ant.BuildException
-
executeAfterPrepare
public void executeAfterPrepare() throws org.apache.tools.ant.BuildExceptionExecutes by first setting thebuild.compiler
property to AjcCompiler, then invokes the super.execute() method.- Throws:
org.apache.tools.ant.BuildException
- See Also:
Javac.execute()
-
prepare
public void prepare()Guaranteed to be called before doing real execute. -
useDefaultSrcdir
protected final void useDefaultSrcdir() -
scanDir
Overrides Javac.scanDir(..) so that it doesn't check dependencies.- Overrides:
scanDir
in classorg.apache.tools.ant.taskdefs.Javac
- See Also:
Javac.scanDir(java.io.File, java.io.File, java.lang.String[])
-