Brief discussion on the function of @param annotation and @see annotation in Java __java

Source: Internet
Author: User
brief discussion on the function of @param annotation and @see annotation in Java

Author: Java Small bo font: [Increase decrease] Type: Reprint time: 2015-12-21 I want to comment this article mainly introduces the function of @param annotation and @see annotation in Java, the annotation function is similar to the annotation in the usual code, the friend who need can refer to the following @ param

The @ param tag can archive a single parameter of a method or constructor, or an archive class, interface, and the type parameters of a generic method. When using the @ param tag, we should use a label for each parameter of the method. The first word of each paragraph is treated as a parameter name, and the remainder is treated as a description of it:?

1 @param max The maximum number of words to read.

When archiving type parameters, we should add < to both sides of the type parameter name:?

1 @param an e element type of this List

However, type parameters usually do not require an explicit document, because they are very significant.

@
The @ can tag creates cross-references that link to other Javadoc documents. We can name any identifiers after the tag, although we have to qualify them adequately. For example, you can usually name a member of a class by using its simple name, but if that member is an overloaded method, we must specify the overloaded version of the method by enumerating the types of the arguments. We can use unqualified names to specify the interfaces or classes within the current package, but you must use the fully qualified name to specify the type in the other package. We can specify a member of a type by using # before the member name. The following are all valid @-to-tag formats:?

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 @see #getName @see Attr @see com.magic.attr.Attr

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.