xdoclet

Class DocletTask

public class DocletTask extends XJavadocTask implements DynamicConfigurator

A base class for all Tasks. It can also be used directly, useful for the case where you want to execute a template file but you don't want to bother writing a new task.

Author: Ara Abrahamian (ara_e@email.com) Aslak Helleso?=y

UNKNOWN: June 19, 2001 name = "xdoclet" display-name = "XDoclet Standard Task" name = "encoding" description = "Specify the source file encoding name, such as Windows-31J, EUC-JP, * UTF-8. In default, system default encoding is used." name = "docencoding" description = "Specify encoding name for template engine. The generated file * encoding may be this value. In default, system default encoding is used."

Field Summary
static StringXDOCLET_VERSION
Constructor Summary
DocletTask()
Method Summary
voidaddConfigParam(ConfigParameter configParam)
Allows to set configuration parameters that will be included in the element as attribute value pair.
voidaddFileset(FileSet set)
Ant's <fileset> definition.
voidaddPackageSubstitution(PackageTagsHandler.PackageSubstitution ps)
Substitutes the package of the generated files.
voidaddSubTask(SubTask subtask)
Generic subtask.
voidaddTemplate(TemplateSubTask subtask)
Generic subtask for processing a user-supplied template.
voidaddXmlTemplate(XmlSubTask subtask)
Generic subtask for processing a user-supplied template, to generate an XML document.
protected voidcheckClass(String className)
Throws BuildException if a specific class is not on the CP.
ObjectcreateDynamicElement(String name)
StringgetAddedTags()
ListgetConfigParams()
Gets the ConfigParams attribute of the DocletTask object
protected HashMapgetConfigParams(List subtasks)
Gets the ConfigParams attribute of the DocletTask object
MapgetConfigParamsAsMap()
FilegetDestDir()
Gets the DestDir attribute of the DocletTask object
StringgetExcludedTags()
Gets the ExcludedTags attribute of the DocletTask object
FilegetMergeDir()
Gets the MergeDir attribute of the DocletTask object
ListgetPackageSubstitutions()
Gets the PackageSubstitutions attribute of the EjbDocletTask object
static StringgetSubTaskName(Class subTaskClass)
protected ListgetSubTasks()
Gets the SubTasks attribute of the DocletTask object
booleanisForce()
Gets the Force attribute of the DocletTask object.
booleanisVerbose()
Gets the Verbose attribute of the DocletTask object.
voidsetAddedTags(String addedTags)
Add some JavaDoc tags (or comments) to the generated classes.
voidsetDestDir(File dir)
Destination directory for output files
voidsetDynamicAttribute(String name, String value)
voidsetExcludedTags(String tags)
Specify tags that should not be automatically written to output files.
voidsetExcludePackageNames(String src)
Sets the ExcludePackageNames attribute of the DocletTask object
voidsetForce(boolean force)
Specify if the generation of files should be forced.
voidsetMergeDir(File dir)
Directory where subtasks will look for files to be merged with generated files.
voidsetPackageNames(String src)
Sets the PackageNames attribute of the DocletTask object
voidsetPackageSubstitutions(List packageSubstitutions)
Sets the PackageSubstitutions attribute of the EjbDocletTask object
voidsetVerbose(boolean verbose)
Sets the Verbose attribute of the DocletTask object.
protected voidstart()
protected voidvalidateOptions()
Called by superclass before start() is called
protected voidvalidateSubTasks()
Describe what the method does

Field Detail

XDOCLET_VERSION

public static final String XDOCLET_VERSION

Constructor Detail

DocletTask

public DocletTask()

Method Detail

addConfigParam

public void addConfigParam(ConfigParameter configParam)
Allows to set configuration parameters that will be included in the element as attribute value pair.

Parameters: configParam Describe the method parameter

addFileset

public void addFileset(FileSet set)
Ant's <fileset> definition. To define the files to parse.

Parameters: set a fileset to add

addPackageSubstitution

public void addPackageSubstitution(PackageTagsHandler.PackageSubstitution ps)
Substitutes the package of the generated files.

Parameters: ps The feature to be added to the Fileset attribute

addSubTask

public void addSubTask(SubTask subtask)
Generic subtask.

Parameters: subtask The subtask to be added

UNKNOWN:

addTemplate

public void addTemplate(TemplateSubTask subtask)
Generic subtask for processing a user-supplied template.

Parameters: subtask Describe the method parameter

Throws: BuildException

UNKNOWN:

addXmlTemplate

public void addXmlTemplate(XmlSubTask subtask)
Generic subtask for processing a user-supplied template, to generate an XML document.

Parameters: subtask Describe the method parameter

UNKNOWN:

checkClass

protected void checkClass(String className)
Throws BuildException if a specific class is not on the CP. Should be called from subclasses' validateOptions() to verify that classpath is OK.

Parameters: className

createDynamicElement

public Object createDynamicElement(String name)

Parameters: name

Returns:

Throws: BuildException

getAddedTags

public String getAddedTags()

getConfigParams

public List getConfigParams()
Gets the ConfigParams attribute of the DocletTask object

Returns: The ConfigParams value

getConfigParams

protected HashMap getConfigParams(List subtasks)
Gets the ConfigParams attribute of the DocletTask object

Parameters: subtasks Describe what the parameter does

Returns: The ConfigParams value

getConfigParamsAsMap

public Map getConfigParamsAsMap()

getDestDir

public File getDestDir()
Gets the DestDir attribute of the DocletTask object

Returns: The DestDir value

getExcludedTags

public String getExcludedTags()
Gets the ExcludedTags attribute of the DocletTask object

Returns: The ExcludedTags value

getMergeDir

public File getMergeDir()
Gets the MergeDir attribute of the DocletTask object

Returns: The MergeDir value

getPackageSubstitutions

public List getPackageSubstitutions()
Gets the PackageSubstitutions attribute of the EjbDocletTask object

Returns: The PackageSubstitutions value

getSubTaskName

public static String getSubTaskName(Class subTaskClass)

getSubTasks

protected final List getSubTasks()
Gets the SubTasks attribute of the DocletTask object

Returns: The SubTasks value

isForce

public boolean isForce()
Gets the Force attribute of the DocletTask object.

Returns: The Force value

isVerbose

public boolean isVerbose()
Gets the Verbose attribute of the DocletTask object.

Returns: The Verbose value

setAddedTags

public void setAddedTags(String addedTags)
Add some JavaDoc tags (or comments) to the generated classes. A special case @ xdoclet-generated. If this is included, ejbdoclet will not consider the file if it is by error in the fileset of the ejbdoclet task.

Parameters: addedTags

setDestDir

public void setDestDir(File dir)
Destination directory for output files

Parameters: dir The new DestDir value

UNKNOWN: Onlyifit's notspecifiedfor asubtask.

setDynamicAttribute

public void setDynamicAttribute(String name, String value)

Parameters: name value

setExcludedTags

public void setExcludedTags(String tags)

Deprecated:

Specify tags that should not be automatically written to output files. The normal behaviour is to include all @ tags from the source file to the output files. This may cause trouble if you use cvs-like tag like $Revision: 1.5 $ that will be overwritten at each build and causes a difference for CVS even if the code himself is not changed. Example: excludedtags="@ version" For excluded tags, ejbdoclet will generate an hardcoded tag. Example: @ version XDOCLET 1.0

Parameters: tags The new ExcludedTags value

setExcludePackageNames

public void setExcludePackageNames(String src)

Deprecated:

Sets the ExcludePackageNames attribute of the DocletTask object

Parameters: src The new ExcludePackageNames value

UNKNOWN:

setForce

public void setForce(boolean force)
Specify if the generation of files should be forced. In normal cases, the timestamp of generated file is checked against the timestamps of the class (and its super classes) we generate from. When this timestamp checking should be bypassed (for example after the installtion of a new xdoclet version) then the user should force the regeneration. The easiest way is to run the Ant build file with a parameter "-Dxdoclet.force=true" and add the option "force=${xdoclet.force}" to the doclet call.

Parameters: force The new Force value

setMergeDir

public void setMergeDir(File dir)
Directory where subtasks will look for files to be merged with generated files.

Parameters: dir The new MergeDir value

UNKNOWN: No,butshould besetif youwantto usethemerge feature.

setPackageNames

public void setPackageNames(String src)

Deprecated:

Sets the PackageNames attribute of the DocletTask object

Parameters: src The new PackageNames value

UNKNOWN:

setPackageSubstitutions

public void setPackageSubstitutions(List packageSubstitutions)
Sets the PackageSubstitutions attribute of the EjbDocletTask object

Parameters: packageSubstitutions The new PackageSubstitutions value

UNKNOWN:

setVerbose

public void setVerbose(boolean verbose)
Sets the Verbose attribute of the DocletTask object.

Parameters: verbose The new Verbose value

start

protected void start()

Throws: BuildException

validateOptions

protected void validateOptions()
Called by superclass before start() is called

Throws: BuildException Describe the exception

validateSubTasks

protected void validateSubTasks()
Describe what the method does

Throws: BuildException Describe the exception