A doc comment consists of characters between the characters /** that begin the comment and the characters */ that end it. Leading asterisks are allowed on each line and are described below. Text in a comment can continue to multiple lines.
Block and in-line tags
A tag is a special keyword within a doc comment that Javadoc Tool can process. There are two kinds of tags:
(i) Block tags
They can be placed only in the tag section. The block tag form is @tag.
The block tag can be accessed directly from the root document such as $doc.param and $doc.author.
The $doc.tags will provide a collection of all the tags appearing in this Javadoc.
(ii) Inline tags
They can be placed anywhere in the main description or in the block tags. The inline tag form is {@tag}.
The table below lists Current Supported Tags
Tag | JDK | Report Wizard Support |
---|---|---|
@author | 1.0 | Yes |
{@code} | 1.5 | Render as <code>text</code> |
{@docRoot} | 1.3 | Not supported |
@deprecated | 1.0 | Yes |
@exception | 1.0 | Yes |
{@inheritDoc} | 1.4 | Not supported |
{@link} | 1.2 | Yes, with conditions (External link, model support, and class/method link will be ignored) |
{@linkplain} | 1.4 | Yes, see {@link link} |
{@literal} | 1.5 | Yes |
@param | 1.0 | Yes |
@return | 1.0 | Yes |
@see | 1.0 | Yes, with conditions (External link, model support, and class/method link will be return as plain text) |
@serial | 1.2 | Yes |
@serialData | 1.2 | Yes |
@serialField | 1.2 | Yes |
@since | 1.1 | Yes |
@throws | 1.2 | Yes |
{@value} | 1.4 | Not Supported |
@version | 1.0 | Yes |