Java Reference
In-Depth Information
@exception or @throws
Only valid in the comment for a method or constructor. This tag is
followed by the name of an exception class (a descendant of
java.lang.Exception ) and optionally by additional explanatory text.
The intent is to list the exceptions that the method throws.
@param
Only valid in the comment for a method or constructor. This tag should
be followed by the name of a parameter to the method followed by descrip-
tive text. This is used to document method and constructor parameters.
@return
Only valid in the comment for a method. 7 This tag is followed by
descriptive text meant to document the return value of the method.
@see
Populates a “See Also” section in the documentation that will provide
hyperlinks to related content. There is a general format for linking to any
URL, but the most common use is to refer to other elements in the same
Java program. See below for the general format of such links.
In addition to these standard at-tags, there are other at-tags that may be
embedded in any comment text—either the comment itself or in text that is
an argument to a standard at-tag.
Such tags are placed within curly braces, for example {@example} , within
a Javadoc comment. The one we use the most is the @link tag, which allows
you to make a reference to another package, class, method, or class member.
The general format is the same as that for the @see tag:
package_name . class_name # member_or_method_name
Any of these elements is optional.
The embedded at-tags include:
@docRoot
This tag may be used when embedding HTML anchor or image tags
( A or IMG tags) in a Javadoc comment to supply the root part of the
7. But not a constructor in this case, because constructors cannot return a value.
Search WWH ::




Custom Search