How to write Java documentation ?

Included in Sun’s Java Development Kit (JDK) is a program called javadoc that processes Java code files
and produces external documentation, in the form of HTML files, for your Java programs.
Tag Used for Purpose
@author name Interfaces,
Classes,
Interfaces
Indicates the author(s) of a given piece of code.
One tag per author should be used.
@deprecated Interfaces,
Classes,
Member
Functions
Indicates that the API for the class… has been
deprecated and therefore should not be used any
more.
@exception name description Member
Functions
Describes the exceptions that a member function
throws. You should use one tag per exception and
give the full class name for the exception.
@param name description Member
Functions
Used to describe a parameter passed to a member
function, including its type/class and its usage.
Use one tag per parameter.
@return description Member
Functions
Describes the return value, if any, of a member
function. You should indicate the type/class and
the potential use(s) of the return value.
@since Interfaces,
Classes, Member
Functions
Indicates how long the item has existed, i.e. since
JDK 1.1
@see ClassName Classes,
Interfaces,
Member
Functions, Fields
Generates a hypertext link in the documentation to
the specified class. You can, and probably should,
use a fully qualified class name.
@see ClassName#member
functionName
Classes,
Interfaces,
Member
Functions, Fields
Generates a hypertext link in the documentation to
the specified member function. You can, and
probably should, use a fully qualified class name.
@version text Classes,
Interfaces
Indicates the version information for a given piece
of code.

No comments:

Post a Comment