FileDocCategorySizeDatePackage
Doc.javaAPI DocJava SE 6 API7211Tue Jun 10 00:22:00 BST 2008com.sun.javadoc

Doc

public interface Doc implements Comparable
Represents Java language constructs (package, class, constructor, method, field) which have comments and have been processed by this run of javadoc. All Doc objects are unique, that is, they are == comparable.
since
1.2
author
Robert Field
author
Scott Seligman (generics, enums, annotations)

Fields Summary
Constructors Summary
Methods Summary
public java.lang.StringcommentText()
Return the text of the comment for this doc item. Tags have been removed.

public intcompareTo(java.lang.Object obj)
Compares this doc object with the specified object for order. Returns a negative integer, zero, or a positive integer as this doc object is less than, equal to, or greater than the given object.

This method satisfies the {@link java.lang.Comparable} interface.

param
obj the Object to be compared.
return
a negative integer, zero, or a positive integer as this Object is less than, equal to, or greater than the given Object.
exception
ClassCastException the specified Object's type prevents it from being compared to this Object.

public com.sun.javadoc.Tag[]firstSentenceTags()
Return the first sentence of the comment as an array of tags. Includes inline tags (i.e. {@link reference} tags) but not block tags. Each section of plain text is represented as a {@link Tag} of {@linkplain Tag#kind() kind} "Text". Inline tags are represented as a {@link SeeTag} of kind "@see" and name "@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 block 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 {@link BreakIterator#getSentenceInstance(Locale)}.

return
an array of {@link Tag}s representing the first sentence of the comment

public java.lang.StringgetRawCommentText()
Return the full unprocessed text of the comment. Tags are included as text. Used mainly for store and retrieve operations like internalization.

public com.sun.javadoc.Tag[]inlineTags()
Return comment as an array of tags. Includes inline tags (i.e. {@link reference} tags) but not block tags. Each section of plain text is represented as a {@link Tag} of {@linkplain Tag#kind() kind} "Text". Inline tags are represented as a {@link SeeTag} of kind "@see" and name "@link".

return
an array of {@link Tag}s representing the comment

public booleanisAnnotationType()
Is this Doc item an annotation type?

return
true if it represents an annotation type
since
1.5

public booleanisAnnotationTypeElement()
Is this Doc item an annotation type element?

return
true if it represents an annotation type element
since
1.5

public booleanisClass()
Is this Doc item a class (and not an interface or annotation type)? This includes ordinary classes, enums, errors and exceptions.

return
true if it represents a class

public booleanisConstructor()
Is this Doc item a constructor?

return
true if it represents a constructor

public booleanisEnum()
Is this Doc item an enum type?

return
true if it represents an enum type
since
1.5

public booleanisEnumConstant()
Is this Doc item an enum constant?

return
true if it represents an enum constant
since
1.5

public booleanisError()
Is this Doc item an error class?

return
true if it represents a error

public booleanisException()
Is this Doc item an exception class?

return
true if it represents an exception

public booleanisField()
Is this Doc item a field (but not an enum constant)?

return
true if it represents a field

public booleanisIncluded()
Return true if this Doc item is included in the result set.

public booleanisInterface()
Is this Doc item an interface (but not an annotation type)?

return
true if it represents an interface

public booleanisMethod()
Is this Doc item a method (but not a constructor or annotation type element)?

return
true if it represents a method

public booleanisOrdinaryClass()
Is this Doc item an ordinary class? (i.e. not an interface, annotation type, enum, exception, or error)?

return
true if it represents an ordinary class

public java.lang.Stringname()
Returns the non-qualified name of this Doc item.

return
the name

public com.sun.javadoc.SourcePositionposition()
Return the source position of the first line of the corresponding declaration, or null if no position is available. A default constructor returns null because it has no location in the source file.

since
1.4

public com.sun.javadoc.SeeTag[]seeTags()
Return the see also tags in this Doc item.

return
an array of SeeTag containing all @see tags.

public voidsetRawCommentText(java.lang.String rawDocumentation)
Set the full unprocessed text of the comment. Tags are included as text. Used mainly for store and retrieve operations like internalization.

public com.sun.javadoc.Tag[]tags()
Return all tags in this Doc item.

return
an array of {@link Tag} objects containing all tags on this Doc item.

public com.sun.javadoc.Tag[]tags(java.lang.String tagname)
Return tags of the specified {@linkplain Tag#kind() kind} in this Doc item. For example, if 'tagname' has value "@serial", all tags in this Doc item of kind "@serial" will be returned.

param
tagname name of the tag kind to search for.
return
an array of Tag containing all tags whose 'kind()' matches 'tagname'.