|
mjc | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.multijava.mjdoc.mjdoc_142.MjTagParser
This class is a helper class to parse javadoc comments into the appropriate set of tags. A javadoc comment consists of some decriptive text followed by a tag section. The descriptive text is represented by a sequence of inline tags (typically Text and link tags). The tag section is a sequence of tags, each of which may have its own descriptive text (consisting of a sequence of Text and link and other inline tags).
This class is constructed with raw unprocessed text (consisting of the entire javadoc comment minus the optional white space and sequence of '*' characters that is ignored at the beginning of each line). The constructor does the parsing, so after successful construction, all the accessor methods provide various views into the structure of the javadoc comment.
| Field Summary | |
protected String |
commentText
The description portion of the javadoc comment (but ordinarily use the parsed version as contained in inlineTags). |
protected com.sun.javadoc.Tag[] |
firstSentenceTags
The parsed descriptive text of the first sentence of the javadoc comment, represented as a sequence of Text and inline tags. |
protected com.sun.javadoc.Tag[] |
inlineTags
The parsed descriptive text of the javadoc comment, represented as a sequence of Text and inline tags. |
protected com.sun.javadoc.Doc |
owner
The Doc object to which the tag being parsed belongs. |
protected String |
rawComment
A holder for the raw javadoc comment. |
protected com.sun.javadoc.SourcePosition |
sourcePosition
The SourcePosition for the text being parsed; the current architecture does not preserve source position within a javadoc comment. |
protected com.sun.javadoc.Tag[] |
tags
The tag portion of the javadoc comment, represented as a sequence of tags. |
| Constructor Summary | |
MjTagParser(com.sun.javadoc.Doc owner)
A constructor for an empty javadoc comment. |
|
MjTagParser(com.sun.javadoc.Doc owner,
String s,
com.sun.javadoc.SourcePosition pos)
This constructor parses the input string into a descriptive portion (retrieved as a sequence of inline tags via the inlineTags() method), and a sequence of tags (retrieved via tags() ). |
|
| Method Summary | |
String |
commentText()
An accessor providing the unparsed text of the descriptive section of the javadoc comment. |
protected String |
firstSentence(String comment)
Returns the summary sentence of the comment text. |
com.sun.javadoc.Tag[] |
firstSentenceTags()
An accessor providing the summary sentence of the javadoc comment as a sequence of Text and inline tags. |
String |
getRawCommentText()
An accessor providing the unparsed text of the full javadoc comment, as supplied to the constructor. |
com.sun.javadoc.Tag[] |
inlineTags()
An accessor providing the parsed version of the descriptive section of the javadoc comment, as a sequence of Text and inline tags. |
protected void |
parse()
The helper method that does the parsing of the raw comment text. |
com.sun.javadoc.SeeTag[] |
seeTags()
An accessor providing the subset of the tag section of the javadoc comment that is the '@see' tags. |
protected int |
skipToFirstTag(char[] c)
|
protected int |
skipToTag(char[] c,
int j)
A helper function that finds the end of a tag or the initial descriptive portion of a javadoc comment. |
com.sun.javadoc.Tag[] |
tags()
An accessor providing the tags making up the tag section of the javadoc comment. |
com.sun.javadoc.Tag[] |
tags(String tagkind)
An accessor providing the tags making up the tag section of the javadoc comment. |
com.sun.javadoc.Tag[] |
tags(String tagkind,
com.sun.javadoc.Tag[] type)
An helper method providing the tags making up the tag section of the javadoc comment that are of the given 'kind'. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected String rawComment
protected String commentText
protected com.sun.javadoc.SourcePosition sourcePosition
protected com.sun.javadoc.Tag[] firstSentenceTags
protected com.sun.javadoc.Tag[] inlineTags
protected com.sun.javadoc.Tag[] tags
protected com.sun.javadoc.Doc owner
| Constructor Detail |
public MjTagParser(com.sun.javadoc.Doc owner,
String s,
com.sun.javadoc.SourcePosition pos)
public MjTagParser(com.sun.javadoc.Doc owner)
| Method Detail |
protected void parse()
protected int skipToFirstTag(char[] c)
protected int skipToTag(char[] c,
int j)
c - a char array that contains the text of the javadoc commentj - the index representing the end of the previous tag or descriptive section (or 0)
protected String firstSentence(String comment)
public String commentText()
public com.sun.javadoc.Tag[] firstSentenceTags()
public String getRawCommentText()
public com.sun.javadoc.Tag[] inlineTags()
public com.sun.javadoc.SeeTag[] seeTags()
public com.sun.javadoc.Tag[] tags()
public com.sun.javadoc.Tag[] tags(String tagkind)
public com.sun.javadoc.Tag[] tags(String tagkind,
com.sun.javadoc.Tag[] type)
|
mjc | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||