Java Reference
In-Depth Information
FIGURE B.4
Java documenta-
tion for the
AppInfo2 pro-
gram.
The javadoc tool also can be used to document an entire package by specifying the
package name as a command-line argument. HTML files will be created for each .java
file in the package, along with an HTML file indexing the package.
If you would like the Java documentation to be produced in a different folder than the
default, use the -d option followed by a space and the folder name.
The following command creates Java documentation for AppInfo2 in a folder called
C:\JavaDocs\ :
javadoc -author -version -d C:\JavaDocs\ AppInfo2.java
The following list details the other tags you can use in Java documentation comments:
@deprecated text —This tag provides a note that indicates the class, method,
object, or variable has been deprecated. This causes the javac compiler to issue a
deprecation warning when the feature is used in a program that's being compiled.
n
@exception class description —Used with methods that throw exceptions, this
tag documents the exception's class name and its description.
n
@param name description —Used with methods, this tag documents the name of
an argument and a description of the values the argument can hold.
n
@see class —This tag indicates the name of another class, which will be turned
into a hyperlink to the Java documentation of that class. This can be used without
restriction in comments.
n
Search WWH ::




Custom Search