Java Reference
In-Depth Information
19.2. Tags
Doc comments can contain
tags
that hold particular kinds of information.
Tags come in two forms:
•
Block tags
define stand-alone text elements. All these tags start
with
@
, as in
@see
or
@deprecated
. These paragraphs are treated spe-
cially in the generated documentation, resulting in marked para-
graphs, links to other documentation, and other special treatment.
This section describes all tags except
@serial
,
@serialData
, and
@serialField
, which relate to object serialization and are described
in "
The Object Byte Streams
"
on page
549
.
•
In-line tags
can occur anywhere within the text of a documentation
comment and are used to apply special formatting, such as
{@code}
for use of code font, or to produce special text, such as creating a
hypertext link using
{@link}
. In-line tags all have the form
{@
tag-
name args
}
where the optional
args
value might provide text to be
formatted or the target of the link, for example.
Except for tagged paragraphs and in-line tags, text in a doc comment is
treated as input text for
HTML
. You can create paragraph breaks in the
documentation with the standard
<p>
tag, blocks of example code using
<pre>
, and so on.
Not all tags need be processed by the
javadoc
tool by default; consult
your tool documentation for details on what is needed to process which
tags.
19.2.1.
@see
The
@see
tag creates a cross-reference link to other javadoc document-
ation. You can name any identifier, although you must qualify it suffi-
ciently. You can, for example, usually name a member of a class with
its simple name. However, if the member is an overloaded method, you
must specify which overload of the method you mean by listing the types