img
Tag
Meaning
@serial
Documents a default serializable field.
@serialData
Documents the data written by the writeObject( ) or writeExternal( ) methods.
@serialField
Documents an ObjectStreamField component.
@since
States the release when a specific change was introduced.
@throws
Same as @exception.
{@value}
Displays the value of a constant, which must be a static field.
@version
Specifies the version of a class.
Document tags that begin with an "at" sign (@) are called stand-alone tags, and they must
be used on their own line. Tags that begin with a brace, such as {@code}, are called in-line tags,
and they can be used within a larger description. You may also use other, standard HTML tags
in a documentation comment. However, some tags, such as headings, should not be used
because they disrupt the look of the HTML file produced by javadoc.
You can use documentation comments to document classes, interfaces, fields, constructors,
and methods. In all cases, the documentation comment must immediately precede the item
being documented. When you are documenting a variable, the documentation tags you can use
are @see, @serial, @serialField, {@value}, and @deprecated. For classes and interfaces, you
can use @see, @author, @deprecated, @param, and @version. Methods can be documented
with @see, @return, @param, @deprecated, @throws, @serialData, {@inheritDoc}, and
@exception. A {@link}, {@docRoot}, {@code}, {@literal}, @since, or {@linkplain} tag can be
used anywhere. Each tag is examined next.
@author
The @author tag documents the author of a class or interface. It has the following syntax:
@author description
Here, description will usually be the name of the a uthor. You will need to specify the -author
option when executing javadoc in order for the @author field to be included in the HTML
documentation.
{@code}
The {@code} tag enables you to embed text, such as a snippet of code, into a comment. That
text is then displayed as is in code font, without any further processing, such as HTML
rendering. It has the following syntax:
{@code code-snippet}
@deprecated
The @deprecated tag specifies that a class, interface, or a member is deprecated. It is
recommended that you include @see or {@link} tags to inform the programmer about
available alternatives. The syntax is the following:
@deprecated description
Here, description is the message that describes the deprecation. The @deprecated tag can be
used in documentation for variables, methods, classes, and interfaces.
Search WWH :
Custom Search
Previous Page
Java SE 6 Topic Index
Next Page
Java SE 6 Bookmarks
Home