@param
The @param tag can archive a single parameter of a method or constructor, or type parameters of an archive class, interface, and generic methods. When using the @param tag, we should use one of the tags for each parameter of the method. The first word in each paragraph will be regarded as a parameter name, while the rest will be regarded as a description of it:
@param max The maximum number of words to read.
When archiving type parameters, we should add < and > to both sides of the type parameter name:
@param体中国中国中国中国
However, type parameters usually do not require explicit documentation, as they are all very obvious.
@ see
@see tags can create cross references linked to other javadoc documents. We can name any identifiers after the tag, although we must fully qualify them. For example, it can usually be named with a simple name of a member of a class, but if the member is an overloaded method, we must specify the overloaded version of the method by enumerating the types of each parameter. We can use an unqualified name to specify the interface or class within the current package, but we must use a fully qualified name to specify the types in other packages. We can specify members of the type by using # before the member name. Here are all valid @ see tag formats:
@see #getName @see Attr @see com.magic.attr.Attr @see com.magic.attr.Deck#DECK-SIZE @see com.magic.attr.Attr#getName @see com.magic.attr.Attr#Attr(String) @see com.magic.attr.Attr#Attr(String) @see com.magic.attr.Attr#Attr(String, Object) @see com.magic.attr @see Attribute Specification @see "The Java Developer's Almanac"
The first form refers to a method called getName, which is located in the same class or interface as the document annotation itself, or in a certain surrounding class or surrounding interface. Such syntax can also be applied to constructors and fields. The second form refers to the class in the current package or the class in a certain guide package. The third form refers to a class using a fully qualified name.
The last 4 forms of @see refer to members, where the first two are about domains (DECK-SIZ day and method (getName). We can use the method name directly because only one getName method is defined in the Attr class. The latter two forms refer to the constructor of the Attr class, one of which accepts string quotes, and the other which accepts strings and objects. When the constructor or method has an overloaded version, we must specify the overloaded version quotes that we want to refer to.
The next @see form leads the reader to a specific package: com.magic.attro
The last two forms allow us to cite other documents. Among them, the previous one uses to define the link, and the latter uses quotes to enclose the document name. We can use both forms to direct the reader to other documents, such as the complete manual.
The @see form (all forms except the last two forms above) that name the language entity can be followed by a label. In the generated document, this label name will replace the entity's name. For example:
@ see #getNameAttribute Names
A link to the document of getName will be created, but the text it displays is "Attribute Names" instead of "getName". Usually we should use the real names of members, but the features shown here are occasionally useful.