|
Doclet API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Represents a documentation tag, e.g. @since, @author, @version. Given a tag (e.g. "@since 1.2"), holds tag name (e.g. "@since") and tag text (e.g. "1.2"). Tags with structure or which require special processing are handled by subclasses (ParamTag, SeeTag, and ThrowsTag.
SeeTag
,
ParamTag
,
ThrowsTag
,
Doc.tags()
Method Summary | |
Tag[] |
firstSentenceTags()
Return the first sentence of the comment as tags. |
Tag[] |
inlineTags()
For documentation comment with embedded @link tags, return the array of Tags consisting of SeeTag(s) and text containing Tag(s). |
String |
kind()
Return the kind of this tag. |
String |
name()
Return the name of this tag. |
SourcePosition |
position()
Return the source position of this tag. |
String |
text()
Return the text of this tag, that is, portion beyond tag name. |
String |
toString()
convert this object to a string. |
Method Detail |
public String name()
public String kind()
public String text()
public String toString()
public Tag[] inlineTags()
{@link Doc commentlabel}
",
where inside the inner braces, the first "Doc" carries exctly the same
syntax as a SeeTag and the second "commentlabel" is label for the Html
Link, will return an array of Tag(s) with first element as Tag with
comment text "This is an example of inline tags for a documentation
comment" and second element as SeeTag with referenced class as "Doc"
and the label for the Html Link as "commentlabel".
public Tag[] firstSentenceTags()
Tag
of kind "Text".
Inline tags are represented as a SeeTag
of kind "link".
If the locale is English language, the first sentence is
determined by the rules described in the Java Language
Specification (first version): "This sentence ends
at the first period that is followed by a blank, tab, or
line terminator or at the first tagline.", in
addition a line will be terminated by paragraph and
section terminating HTML tags: <p> </p> <h1>
<h2> <h3> <h4> <h5> <h6>
<hr> <pre> or </pre>.
If the locale is not English, the sentence end will be
determined by
java.text.BreakIterator.getSentenceInstance(Locale)
.
Tag
s representing the
first sentence of the commentpublic SourcePosition position()
|
Doclet API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |