|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.ac.starlink.ttools.build.MemberDoclet
public abstract class MemberDoclet
Abstract superclass for doclets which document the static public members of classes which are to be made available at runtime in TOPCAT using JEL. This class deals with going through the root document as presented by the (generic) Doclet application and presenting the useful bits (mainly: static public methods and fields) for output. Concrete subclasses must implement methods to do the actual output.
Constructor Summary | |
---|---|
protected |
MemberDoclet(RootDoc root)
Constructor. |
Method Summary | |
---|---|
protected abstract void |
endClass()
End output of documentation for the most recently started class. |
protected abstract void |
endMember()
End output of the most recently started member. |
protected abstract void |
outDescription(String descrip)
Output a description item. |
protected abstract void |
outExamples(String[] examples)
Output examples of the current documentandum (presumably a method). |
protected abstract void |
outItem(String name,
String val)
Output an item to the current documentandum (class/member). |
protected abstract void |
outParameters(Parameter[] params,
String[] comments)
Output parameters to the current documentandum (presumably a method). |
protected abstract void |
outReturn(Type rtype,
String rdesc)
Output return value for the current method. |
protected boolean |
process()
Works through the root document invoking the various protected methods to produce output. |
protected void |
processClass(ClassDoc clazz)
Generates documentation for a given class. |
protected void |
processPackage(PackageDoc pack)
Generates documentation for a given package. |
static String |
pWrap(String text)
Ensures that a string is a sequence of <p> elements (though it's not foolproof). |
protected abstract void |
startClass(ClassDoc clazz)
Begin output of documentation for a given class. |
protected abstract void |
startMember(MemberDoc mem,
String memType,
String memName)
Begin output of documentation for a given clas member (field or method). |
static String |
typeString(Type type)
Returns a string suitable for user consumption which describes a Type. |
static void |
warning(String msg)
Log a warning. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected MemberDoclet(RootDoc root)
Method Detail |
---|
protected abstract void startClass(ClassDoc clazz) throws IOException
clazz
- class to document
IOException
protected abstract void endClass() throws IOException
IOException
protected abstract void startMember(MemberDoc mem, String memType, String memName) throws IOException
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
IOException
protected abstract void endMember() throws IOException
IOException
protected abstract void outItem(String name, String val) throws IOException
name
- item titleval
- item content (HTML text)
IOException
protected abstract void outParameters(Parameter[] params, String[] comments) throws IOException
params
- array of Parameter objectscomments
- array of comment strings matching params;
if there's no comment, the element may be null
IOException
protected abstract void outReturn(Type rtype, String rdesc) throws IOException
rtype
- type of return valuerdesc
- text of return value description (may be null)
IOException
protected abstract void outExamples(String[] examples) throws IOException
examples
- array of strings each representing an example
IOException
protected abstract void outDescription(String descrip) throws IOException
descrip
- description string
IOException
protected boolean process() throws IOException
IOException
protected void processPackage(PackageDoc pack) throws IOException
pack
- package
IOException
protected void processClass(ClassDoc clazz) throws IOException
clazz
- class
IOException
public static String typeString(Type type)
type
- type
public static String pWrap(String text)
text
- basic text
public static void warning(String msg)
msg
- message
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |