Package uk.ac.starlink.ttools.build
Class XmlDoclet
java.lang.Object
uk.ac.starlink.ttools.build.MemberDoclet
uk.ac.starlink.ttools.build.XmlDoclet
- Direct Known Subclasses:
FullXmlDoclet
Doclet which documents public static members of classes in SUN-type XML.
This abstract superclass provides basic XML-type doclet functionality.
Optional doclet flags beyond the standard ones are:
- -o file
- Specify output file
- Since:
- 6 Sep 2004
- Author:
- Mark Taylor (Starlink)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringdoctorText(String text) Attempts to turn HTML text into XML.protected voidendClass()End output of documentation for the most recently started class.protected voidEnd output of the most recently started member.voidflush()static intoptionLength(String option) Define permitted command-line flags.voidOutputs a single line of output to the current output stream.voidOutputs some lines of text to the current output stream.protected voidoutDescription(String descrip) Output a description item.protected voidoutExamples(String[] examples) Output examples of the current documentandum (presumably a method).protected voidOutput an item to the current documentandum (class/member).protected voidoutParameters(Parameter[] param, 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 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).Methods inherited from class uk.ac.starlink.ttools.build.MemberDoclet
firstSentence, isDocumentable, languageVersion, process, processClass, processPackage, pWrap, typeString, varargTypeString, warning
-
Constructor Details
-
XmlDoclet
- Throws:
IOException
-
-
Method Details
-
optionLength
Define permitted command-line flags. This method is part of the Doclet public interface. -
startClass
Description copied from class:MemberDocletBegin output of documentation for a given class. Subsequent calls to outItem refer to this.- Specified by:
startClassin classMemberDoclet- Parameters:
clazz- class to document- Throws:
IOException
-
endClass
Description copied from class:MemberDocletEnd output of documentation for the most recently started class.- Specified by:
endClassin classMemberDoclet- 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.- Specified by:
startMemberin classMemberDoclet- 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.- Specified by:
endMemberin classMemberDoclet- Throws:
IOException
-
outDescription
Description copied from class:MemberDocletOutput a description item.- Specified by:
outDescriptionin classMemberDoclet- Parameters:
descrip- description string- Throws:
IOException
-
outItem
Description copied from class:MemberDocletOutput an item to the current documentandum (class/member).- Specified by:
outItemin classMemberDoclet- Parameters:
name- item titleval- item content (HTML text)
-
outParameters
protected void outParameters(Parameter[] param, String[] comments, boolean isVararg) throws IOException Description copied from class:MemberDocletOutput parameters to the current documentandum (presumably a method).- Specified by:
outParametersin classMemberDoclet- Parameters:
param- 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.- Specified by:
outReturnin classMemberDoclet- 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).- Specified by:
outExamplesin classMemberDoclet- 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.- Specified by:
outSeesin classMemberDoclet- Throws:
IOException- See Also:
-
contents
-
out
Outputs some lines of text to the current output stream. Implemented in terms ofout(java.lang.String).- Parameters:
lines- text for output- Throws:
IOException
-
out
Outputs a single line of output to the current output stream.- Parameters:
line- text for output- Throws:
IOException
-
flush
- Throws:
IOException
-
doctorText
Attempts to turn HTML text into XML. It's pretty ad-hoc, and many things can go wrong with it - using this relies on the various document tests picking up anything that goes wrong.- Parameters:
text- HTML-type text- Returns:
- XML-type text
-