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
-
public class FullXmlDoclet extends XmlDoclet
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 class headers, not information about the methods themselves.
- Since:
- 22 Apr 2005
- Author:
- Mark Taylor (Starlink)
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedFullXmlDoclet(com.sun.javadoc.RootDoc root)Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidendClass()End output of documentation for the most recently started class.protected voidendMember()End output of the most recently started member.protected java.lang.StringgetXmlId(com.sun.javadoc.ClassDoc clazz)Returns the value to use for the XML ID attached to the subsection describing a given class.static intoptionLength(java.lang.String option)Define permitted command-line flags.voidout(java.lang.String line)Outputs a single line of output to the current output stream.protected voidoutDescription(java.lang.String desc)Output a description item.protected voidoutExamples(java.lang.String[] examples)Output examples of the current documentandum (presumably a method).protected voidoutParameters(com.sun.javadoc.Parameter[] params, java.lang.String[] comments, boolean isVararg)Output parameters to the current documentandum (presumably a method).protected voidoutReturn(com.sun.javadoc.Type rtype, java.lang.String rdesc)Output return value for the current method.protected voidoutSees(com.sun.javadoc.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(com.sun.javadoc.RootDoc root)Begin processing document.protected voidstartClass(com.sun.javadoc.ClassDoc clazz)Begin output of documentation for a given class.protected voidstartMember(com.sun.javadoc.MemberDoc mem, java.lang.String memType, java.lang.String memName)Begin output of documentation for a given class member (field or method).protected booleanuseClass(com.sun.javadoc.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, outItem
-
Methods inherited from class uk.ac.starlink.ttools.build.MemberDoclet
isDocumentable, languageVersion, processClass, processPackage, pWrap, typeString, varargTypeString, warning
-
-
-
-
Method Detail
-
start
public static boolean start(com.sun.javadoc.RootDoc root) throws java.io.IOExceptionBegin processing document. This method is part of the Doclet public interface.- Throws:
java.io.IOException
-
optionLength
public static int optionLength(java.lang.String option)
Define permitted command-line flags. This method is part of the Doclet public interface.
-
getXmlId
protected java.lang.String getXmlId(com.sun.javadoc.ClassDoc clazz)
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(com.sun.javadoc.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
protected boolean process() throws java.io.IOExceptionDescription copied from class:MemberDocletWorks through the root document invoking the various protected methods to produce output.- Overrides:
processin classMemberDoclet- Throws:
java.io.IOException
-
startClass
protected void startClass(com.sun.javadoc.ClassDoc clazz) throws java.io.IOExceptionDescription 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:
java.io.IOException
-
endClass
protected void endClass() throws java.io.IOExceptionDescription copied from class:MemberDocletEnd output of documentation for the most recently started class.
-
startMember
protected void startMember(com.sun.javadoc.MemberDoc mem, java.lang.String memType, java.lang.String memName) throws java.io.IOExceptionDescription 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:
java.io.IOException
-
endMember
protected void endMember() throws java.io.IOExceptionDescription copied from class:MemberDocletEnd output of the most recently started member.
-
outDescription
protected void outDescription(java.lang.String desc) throws java.io.IOExceptionDescription copied from class:MemberDocletOutput a description item.- Overrides:
outDescriptionin classXmlDoclet- Parameters:
desc- description string- Throws:
java.io.IOException
-
outParameters
protected void outParameters(com.sun.javadoc.Parameter[] params, java.lang.String[] comments, boolean isVararg) throws java.io.IOExceptionDescription 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:
java.io.IOException
-
outReturn
protected void outReturn(com.sun.javadoc.Type rtype, java.lang.String rdesc) throws java.io.IOExceptionDescription copied from class:MemberDocletOutput return value for the current method.
-
outExamples
protected void outExamples(java.lang.String[] examples) throws java.io.IOExceptionDescription 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:
java.io.IOException
-
outSees
protected void outSees(com.sun.javadoc.SeeTag[] seeTags) throws java.io.IOExceptionDescription copied from class:MemberDocletOutput any See tags from the current documentandum. This only includes explicit @see tags, not @links.
-
-