Document directory
-
Javadoc
-
The JDK tool that generates API documentation from documentation comments.
-
Documentation comments
(Doc comments)
-
The special comments in the Java source code that are delimited by
/** ... */
Delimiters. These comments are processed by the javadoc tool to generate the API docs.
How to Write Java Doc comments
Http://www.oracle.com/technetwork/java/javase/documentation/index-137868.html
Select a project and choose Project> Generate javadoc.
(Eclipse has a jautodoc pulgin that can automatically generate comment for each file)
Package comment files
Each package can have its own documentation comment, contained in its
Own "Source" file, that the javadoc tool will merge into the package summary page
That it generates. You typically include in this comment any
Documentation that applies to the entire package.
To create a package comment file, you have a choice of two files to place
Your comments:
package-info.java
-Can contain a package declaration,
Package annotations, package comments and javadoc tags. This file
Is new in JDK 5.0, and is preferred over package.html.
package.html
-Can contain only package comments and
Javadoc tags, no package annotations.
A package may have a singlepackage.html
File or a single
package-info.java
File but not both. place either file in
The package directory in the source tree along with your.java
Files.
package-info.java
This file can contain in a package comment of the following structure --
The comment is placed before the package declaration:
File:java/applet/package-info.java
/**
* Provides the classes necessary to create an applet and the classes an applet uses
* to communicate with its applet context.
* <p>
* The applet framework involves two entities:
* the applet and the applet context. An applet is an embeddable window (see the
* {@link java.awt.Panel} class) with a few extra methods that the applet context
* can use to initialize, start, and stop the applet.
*
* @since 1.0
* @see java.awt
*/
package java.lang.applet;
|
Note that while the comment Separators/**
And/*
Must be present, the leading asterisks
On the intermediate lines can be omitted.
package.html
-
This file can contain in a package comment of the following structure --
The comment is placed in<body>
Element:
File:java/applet/package.html
<HTML>
<BODY>
Provides the classes necessary to create an applet and the classes an applet uses
to communicate with its applet context.
<p>
The applet framework involves two entities:
the applet and the applet context. An applet is an embeddable window (see the
{@link java.awt.Panel} class) with a few extra methods that the applet context
can use to initialize, start, and stop the applet.
@since 1.0
@see java.awt
</BODY>
</HTML>