How to order multiple tags in Java document comments

Source: Internet
Author: User

From: http://www.oracle.com/technetwork/java/javase/documentation/index-137868.html (How to Write Doc comments)

Ordering multiple tags

We employ the following Conventions when a tag appears more than once in
A documentation comment. If desired, groups of tags, such as multiple
@ See tags, can be separated from the other tags by a blank line with
Single asterisk.

Multiple @ author tags shocould be listed in chronological order, with the Creator of the class listed at the top.

Multiple @ Param tags shocould be listed in
Argument-declaration order. This makes it easier to exactly ally match
List to the Declaration.

Multiple @ throws tags (also known as @ exception) shocould be listed alphabetically by the exception names.


 

Multiple @ see tags shocould be ordered as follows, which is roughly the same order as their arguments are
Searched for by javadoc
,
Basically from nearest to farthest access, from least-qualified
Fully-qualified, the following list shows this progression. Notice
Methods and constructors are in "telescoping" Order, which means the "No
Arg "form first, then the" 1 Arg "form, then the" 2 Arg "form, and so
Forth. Where a second sorting key is needed, they cocould be listed either
Alphabetically or grouped logically.

   @see #field
@see #Constructor(Type, Type...)
@see #Constructor(Type id, Type id...)
@see #method(Type, Type,...)
@see #method(Type id, Type, id...)
@see Class
@see Class#field
@see Class#Constructor(Type, Type...)
@see Class#Constructor(Type id, Type id)
@see Class#method(Type, Type,...)
@see Class#method(Type id, Type id,...)
@see package.Class
@see package.Class#field
@see package.Class#Constructor(Type, Type...)
@see package.Class#Constructor(Type id, Type id)
@see package.Class#method(Type, Type,...)
@see package.Class#method(Type id, Type, id)
@see package

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.