Java Reference
In-Depth Information
/**
* This method returns a string describing DocTest.
** @return a string description of DocTest
*/
public String getDescription()
{
...
}
When Javadoc creates the documentation for the class, it includes the descrip-
tion “This method returns a string describing DocTest.” as the description for the
method getDescription() and adds a return label in bold with the description “a
string description of DocTest” after it.
The leading asterisk characters on each line are not necessary. If you omit the
leading asterisk on a line, however, all leading white space is removed. Without
leading asterisks, the indents are lost in the generated documents. Here are some
common tags and their uses:
@deprecated
Indicates that this section of the API is deprecated
@author
Indicates the author name (requires the author command-line flag)
@param
Used to describe a method parameter
@return
Used to describe a return value
@throws or
@exception
Synonymous tags used to list exceptions thrown
@version
Place your versions number here
The default doclet (called standard ) by default produces HTML documentation.
Most people do not go beyond usage of the standard doclet, but it is possible to over-
ride the standard doclet with a custom doclet. In fact, several other doclets have been
written. Sun has a list of experimental and third-party doclets at its Web site.
 
Search WWH ::




Custom Search