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:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA 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
FieldsFields inherited from class org.apache.tools.ant.taskdefs.Javac
compileList, failOnError, listFilesFields inherited from class org.apache.tools.ant.taskdefs.MatchingTask
filesetFields inherited from class org.apache.tools.ant.Task
description, location, taskName, taskType, wrapperFields inherited from class org.apache.tools.ant.ProjectComponent
project -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCreates a nestedArgfile, add it to the listargfiles, and returns the newArgfileinstance.org.apache.tools.ant.types.PatternSet.NameEntryOverride Javac.createExclude() to sethaveExcludestotrue.org.apache.tools.ant.types.PatternSet.NameEntryOverride Javac.createInclude() to sethaveIncludestotrue.final voidexecute()voidExecutes by first setting thebuild.compilerproperty to AjcCompiler, then invokes the super.execute() method.Returns the java.util.List of argfiles.booleanReturns if the-nocommentsflag is turned on.booleanReturns if the-nosymbolsflag is turned on.booleanReturns if the-preprocessflag is turned on.Returns the number of threads.Returns the current workingdir.protected booleanWhether we have used theexcludesattribute.protected booleanWhether we have used theincludesattribute.voidprepare()Guaranteed to be called before doing real execute.protected voidOverrides Javac.scanDir(..) so that it doesn't check dependencies.voidsetArgfiles(String argfiles) Sets the the argument files by the comma-delimited String passed in.voidsetExcludes(String excludes) Override Javac.setExcludes(String) to sethaveExcludestotrue.voidsetIncludes(String includes) Override Javac.setIncludes(String) to sethaveIncludestotrue.voidsetNocomments(boolean nocomments) Set the-nocommentsflag.voidsetNosymbols(boolean nosymbols) Set the-nosymbolsflag.voidsetPreprocess(boolean preprocess) Set the-preprocessflag.voidsetThreads(Integer threads) Sets the number of threads.voidsetWorkingdir(File workingdir) Sets the workingdir.protected final voidMethods 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, setVerboseMethods 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, XsetItemsMethods 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, setTaskTypeMethods inherited from class org.apache.tools.ant.ProjectComponent
getProject
-
Field Details
-
ADAPTER_CLASS
-
-
Constructor Details
-
Ajc2
public Ajc2()
-
-
Method Details
-
hasExcludes
protected boolean hasExcludes()Whether we have used theexcludesattribute.- Returns:
- Whether we have used the
excludesattribute.
-
hasIncludes
protected boolean hasIncludes()Whether we have used theincludesattribute.- Returns:
- Whether we have used the
includesattribute.
-
setThreads
Sets the number of threads.- Parameters:
threads- the number of threads.- See Also:
-
getThreads
Returns the number of threads.- Returns:
- the number of threads.
- See Also:
-
setNocomments
public void setNocomments(boolean nocomments) Set the-nocommentsflag.- Parameters:
nocomments- true turns on the flag.- See Also:
-
getNocomments
public boolean getNocomments()Returns if the-nocommentsflag is turned on.- Returns:
trueif the-nocommentsflag is on.- See Also:
-
setNosymbols
public void setNosymbols(boolean nosymbols) Set the-nosymbolsflag.- Parameters:
nosymbols- true turns on the flag.- See Also:
-
getNosymbols
public boolean getNosymbols()Returns if the-nosymbolsflag is turned on.- Returns:
trueif the-nosymbolsflag is on.- See Also:
-
setPreprocess
public void setPreprocess(boolean preprocess) Set the-preprocessflag.- Parameters:
preprocess-trueturns on the-preprocessflag.- See Also:
-
getPreprocess
public boolean getPreprocess()Returns if the-preprocessflag is turned on.- Returns:
trueif the-preprocessflag is on.- See Also:
-
setWorkingdir
Sets the workingdir.- Parameters:
workingdir- the new workingdir.- See Also:
-
getWorkingdir
Returns the current workingdir.- Returns:
- the current workingdir.
- See Also:
-
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 newArgfileinstance.- Returns:
- a new
Argfileinstance.
-
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 sethaveIncludestotrue.- Overrides:
createIncludein classorg.apache.tools.ant.taskdefs.MatchingTask- Returns:
- new PatternSet.NameEntry to be added to the include list.
- See Also:
-
createExclude
public org.apache.tools.ant.types.PatternSet.NameEntry createExclude()Override Javac.createExclude() to sethaveExcludestotrue.- Overrides:
createExcludein classorg.apache.tools.ant.taskdefs.MatchingTask- Returns:
- new PatternSet.NameEntry to be added to the exclude list.
- See Also:
-
setIncludes
Override Javac.setIncludes(String) to sethaveIncludestotrue.- Overrides:
setIncludesin classorg.apache.tools.ant.taskdefs.MatchingTask- Parameters:
includes- Comma-separated list of includes.- See Also:
-
setExcludes
Override Javac.setExcludes(String) to sethaveExcludestotrue.- Overrides:
setExcludesin classorg.apache.tools.ant.taskdefs.MatchingTask- Parameters:
excludes- Comma-separated list of excludes.- See Also:
-
getAdapterClass
-
execute
public final void execute() throws org.apache.tools.ant.BuildException- Overrides:
executein 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.compilerproperty to AjcCompiler, then invokes the super.execute() method.- Throws:
org.apache.tools.ant.BuildException- See Also:
-
prepare
public void prepare()Guaranteed to be called before doing real execute. -
useDefaultSrcdir
protected final void useDefaultSrcdir() -
scanDir
-