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>