Package uk.ac.starlink.ttools.build
Class FullXmlDoclet
java.lang.Object
uk.ac.starlink.ttools.build.MemberDoclet
uk.ac.starlink.ttools.build.XmlDoclet
uk.ac.starlink.ttools.build.FullXmlDoclet
Doclet which documents public static members of classes in XML
for insertion into SUN-style XML user documents.
Optional doclet flags beyond the standard ones are:
- -headonly
- Write only the first sentence of the class headers, and not information about the methods.
- Since:
- 22 Apr 2005
- Author:
- Mark Taylor (Starlink)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidendClass()End output of documentation for the most recently started class.protected voidEnd output of the most recently started member.protected StringgetXmlId(ClassDoc clazz) Returns the value to use for the XML ID attached to the subsection describing a given class.static intoptionLength(String option) Define permitted command-line flags.voidOutputs a single line of output to the current output stream.protected voidoutDescription(String desc) Output a description item.protected voidoutExamples(String[] examples) Output examples of the current documentandum (presumably a method).protected voidoutParameters(Parameter[] params, String[] comments, boolean isVararg) Output parameters to the current documentandum (presumably a method).protected voidOutput return value for the current method.protected voidoutSees(SeeTag[] seeTags) Output any See tags from the current documentandum.protected booleanprocess()Works through the root document invoking the various protected methods to produce output.static booleanstart(RootDoc root) Begin processing document.protected voidstartClass(ClassDoc clazz) Begin output of documentation for a given class.protected voidstartMember(MemberDoc mem, String memType, String memName) Begin output of documentation for a given class member (field or method).protected booleanuseClass(ClassDoc clazz) Indicates whether a given class should be documented by this doclet or ignored.Methods inherited from class uk.ac.starlink.ttools.build.XmlDoclet
doctorText, flush, out, outItemMethods inherited from class uk.ac.starlink.ttools.build.MemberDoclet
firstSentence, isDocumentable, languageVersion, processClass, processPackage, pWrap, typeString, varargTypeString, warning
-
Constructor Details
-
FullXmlDoclet
Constructor.- Parameters:
root- root document- Throws:
IOException
-
-
Method Details
-
start
Begin processing document. This method is part of the Doclet public interface.- Throws:
IOException
-
optionLength
Define permitted command-line flags. This method is part of the Doclet public interface. -
getXmlId
Returns the value to use for the XML ID attached to the subsection describing a given class.- Parameters:
clazz- class doc- Returns:
- XML ID string
-
useClass
protected boolean useClass(ClassDoc clazz) Indicates whether a given class should be documented by this doclet or ignored. The default implementation returns true always, but it may be overridden by subclasses.- Parameters:
clazz- class doc- Returns:
- true to use class, false to ignore it
-
process
Description copied from class:MemberDocletWorks through the root document invoking the various protected methods to produce output.- Overrides:
processin classMemberDoclet- Throws:
IOException
-
startClass
Description copied from class:MemberDocletBegin output of documentation for a given class. Subsequent calls to outItem refer to this.- Overrides:
startClassin classXmlDoclet- Parameters:
clazz- class to document- Throws:
IOException
-
endClass
Description copied from class:MemberDocletEnd output of documentation for the most recently started class.- Overrides:
endClassin classXmlDoclet- Throws:
IOException
-
startMember
Description copied from class:MemberDocletBegin output of documentation for a given class member (field or method). Subsequent calls to outItem etc refer to this.- Overrides:
startMemberin classXmlDoclet- Parameters:
mem- class membermemType- some user-viewable (that is not necessarily using technical terms) description of what kind of member it ismemName- some user-viewable label for the member- Throws:
IOException
-
endMember
Description copied from class:MemberDocletEnd output of the most recently started member.- Overrides:
endMemberin classXmlDoclet- Throws:
IOException
-
outDescription
Description copied from class:MemberDocletOutput a description item.- Overrides:
outDescriptionin classXmlDoclet- Parameters:
desc- description string- Throws:
IOException
-
outParameters
protected void outParameters(Parameter[] params, String[] comments, boolean isVararg) throws IOException Description copied from class:MemberDocletOutput parameters to the current documentandum (presumably a method).- Overrides:
outParametersin classXmlDoclet- Parameters:
params- array of Parameter objectscomments- array of comment strings matching params; if there's no comment, the element may be nullisVararg- true if the method is known to have its final formal argument declared with variable length- Throws:
IOException
-
outReturn
Description copied from class:MemberDocletOutput return value for the current method.- Overrides:
outReturnin classXmlDoclet- Parameters:
rtype- type of return valuerdesc- text of return value description (may be null)- Throws:
IOException
-
outExamples
Description copied from class:MemberDocletOutput examples of the current documentandum (presumably a method).- Overrides:
outExamplesin classXmlDoclet- Parameters:
examples- array of strings each representing an example- Throws:
IOException
-
outSees
Description copied from class:MemberDocletOutput any See tags from the current documentandum. This only includes explicit @see tags, not @links.- Overrides:
outSeesin classXmlDoclet- Throws:
IOException- See Also:
-
contents
-
out
Outputs a single line of output to the current output stream.- Overrides:
outin classXmlDoclet- Parameters:
line- text for output- Throws:
IOException
-