xdoclet.modules.doc
Class AntdocSubTask

java.lang.Object
  extended by xdoclet.DocletSupport
      extended by xdoclet.SubTask
          extended by xdoclet.TemplateSubTask
              extended by xdoclet.modules.doc.AntdocSubTask
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
MavenpluginSubTask

public class AntdocSubTask
extends TemplateSubTask

Generates ant docs. Introspects classes and looks for nested elements. Generates one single file for each element. All generated element docs also links nested elements' docs.

Version:
$Revision: 1.17 $
Author:
Aslak Helles?y
See Also:
Serialized Form
ant.element
display-name = "Ant documentation" name = "antdocs" parent = "xdoclet.DocletTask"
created
21. juli 2002
To do:
use DocletTask as parent instead. should be enough.

Nested Class Summary
 class AntdocSubTask.Element
          This class corresponds to an XML element in an Ant build file.
 class AntdocSubTask.SubElement
           
 
Nested classes/interfaces inherited from class xdoclet.TemplateSubTask
TemplateSubTask.ExtentTypes, TemplateSubTask.OfType
 
Field Summary
protected  java.util.Map classToAntElementMap
          Usually, one class corresponds to only one XML element, but in some rare cases it might correspond to more.
 
Fields inherited from class xdoclet.DocletSupport
currentClassTag, currentFieldTag, currentMethodTag
 
Constructor Summary
AntdocSubTask()
           
 
Method Summary
protected  void generateForClass(xjavadoc.XClass clazz)
          Processed template for clazz and generates output file for clazz.
 java.lang.String getDestinationFile()
          Gets the DestinationFile attribute of the TemplateSubTask object
 void init(xjavadoc.XJavaDoc xJavaDoc)
          Describe what the method does
protected  boolean matchesGenerationRules(xjavadoc.XClass clazz)
          Returns true if output not already generated for clazz, and is of the specified type and has the specified class tag; false otherwise.
protected  boolean processInnerClasses()
          Subclasses should override this method and return true if they want startProcessPerClass() to process inner classes too.
 void validateOptions()
          Called to validate configuration parameters.
 
Methods inherited from class xdoclet.TemplateSubTask
addOfType, addOfType, addPackageSubstitution, copyAttributesFrom, engineFinished, engineStarted, execute, getAcceptAbstractClasses, getAcceptInterfaces, getEngine, getExtent, getGeneratedFileName, getGenerationManager, getHavingClassTag, getOfType, getPackageSubstitutions, getSubTaskClassName, getTemplateURL, isPackageSubstitutionInheritanceSupported, isPrefixWithPackageStructure, javaFile, setAcceptAbstractClasses, setAcceptInterfaces, setDestinationFile, setEngine, setExtent, setExtentValue, setGenerationManager, setHavingClassTag, setOfType, setPackageSubstitutionInheritanceSupported, setPackageSubstitutions, setPrefixWithPackageStructure, setSubTaskClassName, setTemplateFile, setTemplateURL, startEngine, startProcess, startProcessForAll, startProcessPerClass
 
Methods inherited from class xdoclet.SubTask
addConfigParam, getConfigParams, getConfigParamsAsMap, getContext, getDestDir, getMergeDir, getSubTaskName, getXJavaDoc, setDestDir, setMergeDir, setSubTaskName
 
Methods inherited from class xdoclet.DocletSupport
getCurrentClass, getCurrentClassTag, getCurrentConstructor, getCurrentField, getCurrentFieldTag, getCurrentMethod, getCurrentMethodTag, getCurrentPackage, getCurrentTag, isDocletGenerated, popCurrentClass, pushCurrentClass, setCurrentClass, setCurrentClassTag, setCurrentConstructor, setCurrentField, setCurrentFieldTag, setCurrentMethod, setCurrentMethodTag, setCurrentPackage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

classToAntElementMap

protected final java.util.Map classToAntElementMap
Usually, one class corresponds to only one XML element, but in some rare cases it might correspond to more. This is if the same class is used in e.g. several create methods: Gee createFoo(), Gee createBar()

The Gee class corresponds to <foo> AND <bar>. This map's values are Sets containing AntElements.

Constructor Detail

AntdocSubTask

public AntdocSubTask()
Method Detail

getDestinationFile

public java.lang.String getDestinationFile()
Description copied from class: TemplateSubTask
Gets the DestinationFile attribute of the TemplateSubTask object

Overrides:
getDestinationFile in class TemplateSubTask
Returns:
The DestinationFile value

init

public void init(xjavadoc.XJavaDoc xJavaDoc)
          throws XDocletException
Description copied from class: TemplateSubTask
Describe what the method does

Overrides:
init in class TemplateSubTask
Throws:
XDocletException - Describe the exception
See Also:
SubTask.execute()

validateOptions

public void validateOptions()
                     throws XDocletException
Description copied from class: TemplateSubTask
Called to validate configuration parameters.

Overrides:
validateOptions in class TemplateSubTask
Throws:
XDocletException - Description of Exception

processInnerClasses

protected boolean processInnerClasses()
Description copied from class: TemplateSubTask
Subclasses should override this method and return true if they want startProcessPerClass() to process inner classes too.

Overrides:
processInnerClasses in class TemplateSubTask
Returns:

generateForClass

protected void generateForClass(xjavadoc.XClass clazz)
                         throws XDocletException
Description copied from class: TemplateSubTask
Processed template for clazz and generates output file for clazz.

Overrides:
generateForClass in class TemplateSubTask
Parameters:
clazz - Description of Parameter
Throws:
XDocletException - Description of Exception

matchesGenerationRules

protected boolean matchesGenerationRules(xjavadoc.XClass clazz)
                                  throws XDocletException
Description copied from class: TemplateSubTask
Returns true if output not already generated for clazz, and is of the specified type and has the specified class tag; false otherwise. If returned false, no output file is generated for clazz.

Overrides:
matchesGenerationRules in class TemplateSubTask
Parameters:
clazz - Description of Parameter
Returns:
Description of the Returned Value
Throws:
XDocletException - Description of Exception

http://xdoclet.sourceforge.net/