@author | defines the overview, package or class author |
@deprecated | adds a comment indicating that this API should no longer be used |
{@docRoot} | inserts the relative path to the generated document’s root directory from any generated page |
@exception | synonym for @throws |
{@inheritDoc} | copies documentation from the "nearest" inheritable class or implementable interface
this can be used for the main description, @return, @param and @throws |
{@link package.class#member label} | inserts a link with a text label that points to the documentation for the specified package, class or member name of a class |
{@linkplain package.class#member label} | same as @link except that the link is displayed using the plain text fond instead of the code font |
@param | description of a parameter |
@return | return type and permissible range of values |
@see "string" | add a "See Also" text |
@see <a href="URL#value">label</a> | add a "See Also" link |
@see package.class#member label | adds a "See Also" link to a package, class or member name of a class
label is optional |
@serial | used in the doc comment for a default serializable field |
@serialData data-description | documents the types and order of data in the serialised form |
@serialField field-name field-type field-description | documents an ObjectStreamField component of a Serializable class’s serialPersistentFields member |
@since since-text | adds a "Since" heading with the specified since-text to the generated documentation |
@throws class-name description | adds a "Throws" subheading to the generated documentation, with the class-name and description text |
{@value package.class#field} | replaced by the value of a static field |
@version version-text | replaced by the value of the -version option when this one is used |
Javadoc comments can be attached to:
- class
- interface
- method
- constructor
- field
- package
- overview
A Javadoc comment is composed of a main description followed by a tag section, both written in HTML. To start a line with
@
and not have it be interpreted, use @
.
Tags can also be used inline by putting them between curly braces (they are called "in-line tags" in opposition of the usual tags called "block tags"):
/**
|