Eclipse generates Javadoc Help documentation and basics

Source: Internet
Author: User
Tags deprecated documentation throw exception

Objective:

1. The generated API document is a file named index.html

2.javadoc only process document source files in classes, interfaces, methods, member variables, constructors, internal classes of comments, ignoring comments elsewhere

The 3.javadoc tool defaults to handling only classes, interfaces, methods, member variables, constructors, and document comments before the inner class, which are decorated with public or protected

4. Document comments start with two models (/**), End with a slash (* *) followed by an asterisk, and the middle part is a document annotation that is extracted into the API document

5. Commonly used Javadoc markers:

@author: Specify the author of the Java program

@version: Specifies the version of the source file

@deprecated: Deprecated methods

@param: Parameter description information for the method

@return: Description information for return value of method

@see: "See" To specify the contents of the cross Reference

@exception: type of throw exception

@throws: Thrown exception, and @exception synonymous


generate Javadoc documentation with eclipse:

1. Open Java code, write Javadoc comments (as much as possible)


2. Click the "Project" menu in Eclipse and select the "Generate JavaDoc" option


3.

(1) Select the project to generate Javadoc

(2) Select which level of content to generate Javadoc, default to public, and if you choose private, all content will be generated.

(3) Select the doc's build location, the default is the engineering directory, we do not recommend modification.

(5) Click the "Next" button

4

(1) Check the document title, and then fill in the header.

(2) Click the "Next" button

5.

(1) Choose the JDK version to use

(2) Click "Finish" button
6. Create a "Doc" directory under the project containing Javadoc documentation

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.