Java Reference
In-Depth Information
The @param and @throws tags are used with methods and constructors, whereas @return is
just used with methods. Examples are
@param limit The maximum value allowed.
@return A random number in the range 1 to limit (inclusive).
@throws IllegalLimitException If limit is less than 1.
The @see tag has several different forms and may be used in any documentation comment. It
provides a way to cross-reference a comment to another class, method, or other form of docu-
mentation. A See Also section is added to the item being commented. Here are some typical
@see "The Java Language Specification, by Joy et al"
@see <a href=“”>Th e BlueJ web site</a>
@see #isAlive
@see java.util.ArrayList#add
The first simply embeds a text string with no hyperlink; the second embeds a hyperlink to the
specified document; the third links to the documentation for the isAlive method in the same
class; the fourth links to the documentation for the add method in the ArrayList class of the
java.util package.
BlueJ support for javadoc
If a project has been commented using the javadoc style, then BlueJ provides support for
generating the complete HTML documentation. In the main window, select the Tools/Project
Documentation menu item, and the documentation will be generated (if necessary) and dis-
played within a browser window.
Within the BlueJ editor, the source-code view of a class can be switched to the documentation view
by changing the Source Code option to Documentation at the right of the window (Figure I.1) or
by using Toggle Documentation View from the editor's Tools menu. This provides a quick preview
of the documentation, but will not contain references to documentation of superclasses or used
Figure I.1
The Source Code and
Documentation view
More details are available at:
Search WWH ::

Custom Search