Eclipse automatically generates javadoc

Source: Internet
Author: User
Document directory
  • Package comment files
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>


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.