javadoc

 javadoc工具可以为以下条目生成注释文档:
• Packages
• Public classes and interfaces
• Public and protected methods
• Public and protected fields
注释为包含在/** 和 */之间,可以为任意格式的文本,当然也可以包含html的标签,如使用<em></em>以示强调等,但是应该避免使用标题标签如<h1>和划线标签如<hr>等,因为这些标签会影响文档的格式。
The first sentence of the free-form text should be a summary statement. The javadoc utility
automatically generates summary pages that extract these sentences

NOTE: If your comments contain links to other files such as images (for example, diagrams
or images of user interface components), place those files into a subdirectory of the
directory containing the source file named doc-files. The javadoc utility will copy the docfiles
directories and their contents from the source directory to the documentation directory.
You need to use the doc-files directory in your link, such as <img src="doc-files/
uml.png" alt="UML diagram"/>.

Class Comments
The class comment must be placed after any import statements, directly before the class
definition.

Method Comments
Each method comment must immediately precede the method that it describes. In addition
to the general-purpose tags, you can use the following tags:
• @param variable description
This tag adds an entry to the “parameters” section of the current method. The
description can span multiple lines and can use HTML tags. All @param tags for one
method must be kept together.
• @return description
This tag adds a “returns” section to the current method. The description can span
multiple lines and can use HTML tags.
• @throws class description
This tag adds a note that this method may throw an exception. Exceptions are the
topic of Chapter 11.

Field Comments
You only need to document public fields—generally that means static constants. For
example:
/**
* The "Hearts" card suit
*/
public static final int HEARTS = 1;
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值