Java's Javadoc command

Source: Internet
Author: User
Tags deprecated

"Use of the Javadoc command"
In the 1.java source file, the comment starts with/** and ends with */, which can contain normal files, HTML tags, and Javadoc tags. These will form the Javadoc documentation.
The 2.javadoc command can only handle comments in the Java source file that precede the class declaration, interface declaration, member method declaration, member variable declaration, and construction method declaration, ignoring the comment that is elsewhere. Annotations such as those before local variables are ignored by the Javadoc command even if they conform to the specification.
3. Common Javadoc Markers
@version Specifying version information
@since Specifies the earliest occurrence in that version
@author the specified author
@see generate links to reference other Javadoc documents
@link generate links to reference other Javadoc documents, which differs from the @see tag in that the @link tag can be embedded in a comment statement to generate a link for a specific word in a comment statement.
@deprecated used to indicate the class being annotated, the variable or method is deprecated and may be discarded in a future release.
@param parameters that describe the method
@return The return value of the description method
@throws describes the exception thrown by the method, indicating the condition that throws the exception
The 4.javadoc command can handle both packages and Java source files.
Javadoc [option] [packagenames] [SourceFiles]
Main options for the Javadoc command:
-public generate Javadoc documents only for public access-level classes and members of classes
-proteceted generates Javadoc documents only for public and protected Access-level classes and members of classes.
(default option)
-package generated only for public,protected and default access level classes and members of the class
Javadoc documentation
-private generates Javadoc documents for public,protected, default and private access level classes, and members of classes
-version Parsing @version Tags
-author Parsing @author Tags
-splitindex the index into one index file for each letter
-sourcepath <pathlist> specifying the path to the Java source file
-classpath <pathlist> designation Classpath
-D <directory> Specify the output directory of the Javadoc document
Javadoc the use of several options for the command:
-public,-protected,-package and-private These 4 options are used to specify Javadoc documents that output classes and members of those access levels. Where protected is the default option.
The-version and-author options specify that the Javadoc document contains the content indicated by the @version and @author tags. These two options are not the default options. By default, the Javadoc command ignores the @version and @author tags in comments, so the resulting Javadoc document does not contain version and author information.

Java's Javadoc command

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.