Use of javadoc and eclipse generation

Source: Internet
Author: User

1. Eclipse document annotation generation method:

1. Project --> right-click the menu export --> javadoc under JAVA --> next:
<1> javadoc command: Specifies the javadoc.exe to be called by the producer. eclipse will find it without modification;
<2> use standard doclet: it is the directory to be generated. You can customize a folder as a storage directory [otherwise a lot];
<3> next --> by default
<4> [note] at this time if the project uses UTF-8 encoding, extra javadoc options need to enter the set parameter:-encoding UTF-8-charset UTF-8 otherwise the Generated Chinese comments are garbled.
<5> finish.
In the project's doc directory, there is the javadoc document.

 

--------------------------------------------- Cool SPLIT line ------------------------------------------------

 

2. javadoc usage instructions:

 

How to generate the javadoc help document

1. "text comment" = is also called archive comment.

"/***/" ARCHIVE comments are special comments. Before class or class member declarations, javadoc extracts them to generate HTML documents. Archive comment: 1. Before the class/interface/method/field lifecycle.

 

2. "document mark"

// Commands starting with "@"; 1. Class document mark-including version information/author. (1) @ version Version: Extracts version information from the generated HTML. Corresponding to "javadoc-version" (2) @ author information can include: name/email. Corresponding to "javadoc-Author" -------------------------------------- 2. Mark the method document ---- parameter/return value/exception. (1) @ Param parameter description (2) @ return indicates the meaning of the returned value. (3) @ exception full class name indicates the exception class name defined by "full class name. (4) @ deprecated is not recommended and may be discarded in the future.

 

3. Only "Public/protected" is used to process annotation documents.

The comments "private" and "default" are ignored and no output is visible.

Available-Private tags include private.

--------------------------------------------- Cool SPLIT line ------------------------------------------------

3. Document comment shortcut

In eclipse, when the mouse is in the class and the method is defined, press Alt + Shift + J to quickly add document comments.

Set the default format: File> export> javadoc>

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.