net.cscott.sinjdoc

Interface Doc

public interface Doc extends Comparable<Doc>

The Doc class is the abstract base class representing all java language constructs (classes, packages, methods, etc) which have comments and have been processed by this run of SinjDoc. All Doc items are ReferenceUnique, that is, they are == comparable.

Version: $Id: Doc.java,v 1.8 2003/07/31 23:05:26 cananian Exp $

Author: C. Scott Ananian (cscott@cscott.net)

See Also: com.sun.javadoc.Doc

Method Summary
StringcommentText()
Return the text of the comment for this doc item, with all tags (including inline tags) removed.
intcompareTo(Doc d)
Compares this Doc with the specified Doc for order.
List<Tag>firstSentenceTags()
Return the first sentence of the comment as tags.
StringgetRawCommentText()
Return the full unprocessed text of the comment.
List<Tag>inlineTags()
Return the documentation comment as tags.
booleanisClass()
Returns true if this doc item represents a non-interface class.
booleanisConstructor()
Returns true if this doc item represents a constructor.
booleanisError()
Returns true if this doc item represents an error class.
booleanisException()
Returns true if this doc item represents an exception class.
booleanisField()
Returns true if this doc item represents a field.
booleanisIncluded()
Returns true if javadoc will be generated from this item.
booleanisInterface()
Returns true if this doc item represents an interface.
booleanisMethod()
Returns true if this doc item represents a non-constructor method.
booleanisOrdinaryClass()
Returns true if this doc item represents a non-interface class which is not an exception or error class.
Stringname()
Returns the non-qualified name of this Doc item.
SourcePositionposition()
Returns the source position of the documented entity.
List<Tag>tags()
Return all tags in this doc item.
List<Tag>tags(String tagname)
Return tags of the specified kind in this doc item.

Method Detail

commentText

public String commentText()
Return the text of the comment for this doc item, with all tags (including inline tags) removed.

compareTo

public int compareTo(Doc d)
Compares this Doc with the specified Doc for order.

firstSentenceTags

public List<Tag> firstSentenceTags()
Return the first sentence of the comment as tags. This includes inline tags embedded in the first sentence, but not regular tags (which would not constitute the first sentence). Each section of plain text is represented as a Tag of kind "Text". An example of an inline tags is the SeeTag of kind "link". The sentence end will be determined by java.text.BreakIterator.getSentenceInstance(Locale).

Returns: a list of Tags representing the first sentence of the comment.

getRawCommentText

public String getRawCommentText()
Return the full unprocessed text of the comment. Tags are included as text.

inlineTags

public List<Tag> inlineTags()
Return the documentation comment as tags. Each section of plain text is represented as a Tag of kind "Text", and inline tags are also represented as Tag objects. The list of Tags does not include regular tags, only "text" and inline tags.

isClass

public boolean isClass()
Returns true if this doc item represents a non-interface class.

isConstructor

public boolean isConstructor()
Returns true if this doc item represents a constructor.

isError

public boolean isError()
Returns true if this doc item represents an error class.

isException

public boolean isException()
Returns true if this doc item represents an exception class.

isField

public boolean isField()
Returns true if this doc item represents a field.

isIncluded

public boolean isIncluded()
Returns true if javadoc will be generated from this item.

isInterface

public boolean isInterface()
Returns true if this doc item represents an interface.

isMethod

public boolean isMethod()
Returns true if this doc item represents a non-constructor method.

isOrdinaryClass

public boolean isOrdinaryClass()
Returns true if this doc item represents a non-interface class which is not an exception or error class.

name

public String name()
Returns the non-qualified name of this Doc item.

position

public SourcePosition position()
Returns the source position of the documented entity. Will never return null.

tags

public List<Tag> tags()
Return all tags in this doc item.

tags

public List<Tag> tags(String tagname)
Return tags of the specified kind in this doc item. For example if tagname has value "serial", all tags in this item of the form "@serial" will be returned.
Copyright © 2003 C. Scott Ananian