Java support different JavaDoc tags for documentation. Refer below table for details.
Tag | Available from | Use |
---|---|---|
@author | 1.0 | To mention author name of the class |
@deprecated | 1.0 | To notify that a given API is no longer supported and shouldn’t be used anymore |
@exception | 1.0 | To add Throws subheading to the generated documentation, wit classname & description |
@param | 1.0 | Parameter with the specified parameter-name followed by the specified description to Parameters section |
@return | 1.0 | Used in method level comments to describe value it returns |
@see | 1.0 | Adds a “See Also” heading with a link or text entry that points to reference |
@throws | 1.0 | Used to describe exceptions which a method throws from it |
@since | 1.1 | Adds a “Since” heading to mention from which release this change is available |
{@link} | 1.2 | Inserts an in-line link with the visible text label that points to the documentation for the specified package, class, or member name of a referenced class |
@serial | 1.2 | Used in the doc comment for a default serializable field |
@serialData | 1.2 | Documents the data written by the writeObject( ) or writeExternal( ) methods |
@serialField | 1.2 | Documents an ObjectStreamField component |
{@docRoot} | 1.3 | Relative path to generated document’s root directory from any generated page |
{@inheritDoc} | 1.4 | Inherits a comment from the nearest inheritable class or implementable interface |
{@linkplain} | 1.4 | Similar to {@link}, except label is displayed in plain text than code font |
{@value} | 1.4 | Used to displays the value of constants |
{@code} | 1.5 | To display code snippet inside comment block |
{@literal} | 1.5 | It is used to denote literal text |