Javadoc Comment Property Editor

See Also

Using the Javadoc Comment dialog box, you can add or edit a documentation comment in your source code. Open the Javadoc Comment dialog box by right-clicking a class or any of its subnodes in the Filesystems window, choosing Properties, and clicking the ellipsis button (...) in the Javadoc Comment property. A Javadoc comment consists of two parts: text and tags.

Javadoc Comment Text

The first sentence of the comment should be a summary description of the declared entity. The text may include HTML elements, such as <B> and <I>, for formatting the description. Heading elements, such as <H1> and <H2>, are reserved for use by the Javadoc tool. You can use the command buttons at the bottom of the Javadoc Comment dialog box to include the HTML elements <B>, <I>, <U>, <CODE>, and <PRE> and the Javadoc {@link} in the description. For example:

/**
* Returns the Class of this <I>Object</I>. 
* Java has a runtime representation for 
* classes--a descriptor of type Class-- 
* which the method getClass() returns for 
* any Object.
*/

You do not need to type the characters /** and */ or the leading asterisks. These characters are automatically included when you click OK and the IDE adds the comment to the source code.

Tags

A Javadoc tag starts with the character @ followed by a special keyword. Tags are case sensitive. A Javadoc tag enables you to automatically generate information for the API documentation. For example, @author name adds an author entry with the specified name to the generated documentation. A tag must appear at the beginning of a line. Otherwise, the tag is treated as normal text. By convention, tags with the same name are grouped together. The following comment includes four Javadoc tags:

/**
* A class representing a screen window.
* For example:
*    Window win = new Window(parent);
*    win.show();
*
* @author  Lynne Haley
* @version 1.3 00/08/08
* @see     java.awt.BaseWindow
* @see     java.awt.Button */

For more information on how to write Javadoc comments, see:

http://java.sun.com/products/jdk/javadoc/writingdoccomments/index.html

For detailed information about Javadoc tags, see:

http://java.sun.com/j2se/1.4.2/docs/tooldocs/solaris/javadoc.html. 
See Also
Entering Javadoc Comments in Source Code

Legal Notices