We often use the third-party jar, JDK, etc. have their own source code comment documents, the Java code developed by the best also has a good annotated document, easy to understand and maintain.
1. Document syntax
|
Grammar |
Example |
Description |
|
{@link address } |
{@link Java.nio.charset.CharsetDecoder} |
Click to jump to the comment document for the corresponding class |
|
{@link address # method or property alias } |
{@link charsequence#length () length} |
Because the annotation class is under the same package as the Charsequence, the package name can be ignored, and if the linked method is its own method, the class name can also be ignored |
|
{@linkplain address alias } |
{@linkplain Java.nio.charset.Charset
CharSet |
Click CharSetto go to the corresponding class's comment document |
|
<br> |
|
Line break |
|
<p> |
|
Segmentation |
|
{@code code } |
{@code true} |
Represents Java code true |
Also refer to Http://baike.baidu.com/item/javadoc?fr=aladdin
2.
Java Annotation documentation uses