xdoclet

Class SubTask

public abstract class SubTask extends DocletSupport implements Serializable

An abstract base class for all sub-tasks. Common code and the contract is defined here.

Because of the way Ant is designed all setter methods automatically are settable config parameters. Note that by default init() method inherits default setting from the containing task via DocletContext. Setter methods in sub-task gives the user finer control over config parameters of the sub-task.

Version: $Revision: 1.75 $

Author: Ara Abrahamian (ara_e@email.com)

UNKNOWN: June 16, 2001

Method Summary
voidaddConfigParam(ConfigParameter configParam)
Specifies a configuration parameter for the subtask.
voidcopyAttributesFrom(TemplateSubTask src)
Describe what the method does
abstract voidexecute()
Called to start execution of the sub-task.
ListgetConfigParams()
Gets the ConfigParams attribute of the SubTask object
MapgetConfigParamsAsMap()
protected DocletContextgetContext()
A utility method that deleges the call to DocletContext.getSingleInstance().
FilegetDestDir()
Gets the DestDir attribute of the SubTask object
FilegetMergeDir()
Gets the MergeDir attribute of the SubTask object
StringgetSubTaskName()
Gets the SubTaskName attribute of the SubTask object
protected XJavaDocgetXJavaDoc()
voidinit(XJavaDoc xJavaDoc)
Initializes SubTask.
voidsetDestDir(File destDir)
Sets the directory where the generated file(s) will be written.
voidsetMergeDir(File mergeDir)
Specifies the location of the merge directory.
voidsetSubTaskName(String subTaskName)
Sets an optional name for the subtask that will be seen in XDoclet's debug messages.
voidvalidateOptions()
Called to validate configuration parameters.

Method Detail

addConfigParam

public void addConfigParam(ConfigParameter configParam)
Specifies a configuration parameter for the subtask.

Parameters: configParam Describe the method parameter

copyAttributesFrom

public void copyAttributesFrom(TemplateSubTask src)
Describe what the method does

Parameters: src Describe what the parameter does

execute

public abstract void execute()
Called to start execution of the sub-task.

Throws: XDocletException Description of Exception

getConfigParams

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

Returns: The ConfigParams value

getConfigParamsAsMap

public Map getConfigParamsAsMap()

getContext

protected DocletContext getContext()
A utility method that deleges the call to DocletContext.getSingleInstance().

Returns: the singleton context object

getDestDir

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

Returns: The DestDir value

getMergeDir

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

Returns: The MergeDir value

getSubTaskName

public final String getSubTaskName()
Gets the SubTaskName attribute of the SubTask object

Returns: The SubTaskName value

getXJavaDoc

protected XJavaDoc getXJavaDoc()

init

public void init(XJavaDoc xJavaDoc)
Initializes SubTask. It inherits values of the config parameters if not explicitly defined for this sub-task.

Parameters: xJavaDoc

Throws: XDocletException Description of Exception

See Also: execute

setDestDir

public void setDestDir(File destDir)
Sets the directory where the generated file(s) will be written.

Parameters: destDir The new DestDir value

setMergeDir

public void setMergeDir(File mergeDir)
Specifies the location of the merge directory. This is where XDoclet will look for merge files.

Parameters: mergeDir The new MergeDir value

setSubTaskName

public void setSubTaskName(String subTaskName)
Sets an optional name for the subtask that will be seen in XDoclet's debug messages.

Parameters: subTaskName

validateOptions

public void validateOptions()
Called to validate configuration parameters.

Throws: XDocletException Description of Exception