Class ParanamerTask
java.lang.Object
org.apache.tools.ant.ProjectComponent
org.apache.tools.ant.Task
com.thoughtworks.paranamer.ant.ParanamerTask
- All Implemented Interfaces:
Cloneable
public class ParanamerTask
extends org.apache.tools.ant.Task
Ant Task to process parameter names. This ant task facilitates the
specification of the java source and class files to process as attributes,
nested file sets or a combination of both. The attributes applicable to
this ant task include a source directory, class directory, include pattern
and exclude pattern. i.e.:
<paranamer srcdir="src" classdir="classes" includes="*.java" excludes="excluded.java"/>
Each of these attributes contains a default:
- srcdir: the base directory of the project
- classdir: srcdir
- includes: "
-
Field Summary
Fields inherited from class org.apache.tools.ant.Task
target, taskName, taskType, wrapperFields inherited from class org.apache.tools.ant.ProjectComponent
description, location, project -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddFileset(org.apache.tools.ant.types.FileSet fileset) Called automatically by ant when an embedded fileset element is present.voidexecute()Execute the task.protected QdoxParanamerGeneratorProvide this as a method so that it can be overridden and custom QdoxParanamerGenerators can be returned in place of the default.voidsetClassdir(String classdir) Called automatically by ant when the classdir attribute is present.voidsetExcludes(String excludes) Called automatically by ant when the excludes attribute is present.voidsetIncludes(String includes) Called automatically by ant when the includes attribute is present.voidCalled automatically by ant when the srcdir attribute is present.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, setTaskTypeMethods inherited from class org.apache.tools.ant.ProjectComponent
clone, getDescription, getLocation, getProject, setDescription, setLocation, setProject
-
Constructor Details
-
ParanamerTask
public ParanamerTask()
-
-
Method Details
-
execute
public void execute() throws org.apache.tools.ant.BuildExceptionExecute the task.- Overrides:
executein classorg.apache.tools.ant.Task- Throws:
org.apache.tools.ant.BuildException
-
addFileset
public void addFileset(org.apache.tools.ant.types.FileSet fileset) Called automatically by ant when an embedded fileset element is present.- Parameters:
fileset- the fileset specification
-
setSrcdir
Called automatically by ant when the srcdir attribute is present.- Parameters:
srcdir- the content of the srcdir attribute.
-
setIncludes
Called automatically by ant when the includes attribute is present.- Parameters:
includes- the content of the includes attribute.
-
setExcludes
Called automatically by ant when the excludes attribute is present.- Parameters:
excludes- the content of the excludes attribute.
-
setClassdir
Called automatically by ant when the classdir attribute is present.- Parameters:
classdir- the content of the classdir attribute.
-
makeQdoxParanamerGenerator
Provide this as a method so that it can be overridden and custom QdoxParanamerGenerators can be returned in place of the default. This is used for testing purposes.- Returns:
- the qdox paranamer generated instance to use to generate the paranamer data.
-