所有javadoc标记都以@开头。每一个标记必须另起一行。
标记:
类或者接口前面的标记
@author author_name
除非你在运行javadoc时包含 -author 选项,否则忽略该标记。
@version
除非你在运行javadoc时包含 -version 选项,否则忽略该标记。
方法前面的标记
@param variable_name
如果方法有一个以上的参数,则为每一个参数提供@param标记。将这些标记组合在一起。
@return description
描述方法的返回值。
@exception fully_qualified_class_name description
@throws fully_qualified_class_name description
列出和描述可能抛出的异常。完全限定类名是到异常类的超文本链接。如果方法可能抛出一个以上的异常类型,则为每个异常类提供@exception或者@throws .将这些标记组合在一起。
示例:
/**
* <p>This class store the value of two integers.</p>
* <p>This class is written for the purpose of demonstrating Javadoc
* comments. Javadoc comments for classes can be broken into two
* parts: a description part and a tags part. This is the
* description part. The parts should be separated by one empty
* comment line.</p>
* <p>Also, there should be no lines between the end of the Javadoc
* comment and the beginning of the entity it describes.</p>
*
* @author Lily Hou
* @author Sean Bufano
* @version 1.0.0
*/
public class TwoInts {
private int first;
private int second;
/**
* Initializes both integers to <code>0</code>.
*/
public TwoInts() {
first = 0;
second = 0;
}
/**
* Initializes both integers to arguments.
*
* @param initialFirst value to which field <code>first</code>
* is initialized
* @param initialSecond value to which field <code>second</code>
* is initialized
*/
public TwoInts(int initialFirst, int initialSecond) {
first = initialFirst;
second = initialSecond;
}
/**
* Computes the sum of the two integers.
*
* @return the sum of the two integers
*/
public int sum() {
return first + second;
}
/**
* Increments the field <code>first</code> by the argument.
*
* @param value the value by which field <code>first</code> will
* be incremented
*/
public void addToFirst(int value) {
first += value;
}
}
Trackback: http://tb.blog.csdn.net/TrackBack.aspx?PostId=528489
分享到:
相关推荐
javadoc - Java API 文档生成器 从 Java 源文件生成 API 文档 HTML 页。
Maven插件,用于从JAX-RS和Javadoc注释生成Swagger 这个Maven插件正在为基于JAX-RS的Java服务器生成Swagger API文档。 JAX-RS批注中未包含的其他信息放置在Javadoc注释中。 例 此处提供了一个使用javadoc2swagger-...
适用于 Dash 和 Zeal 的 docset 格式的 JDK 11 javadoc API 参考中文版!
dwr 2.0 的java帮助文档 英文版的。我把它做成chm的,便于您阅读。
idea easy_javadoc插件
会从语言、编码、链接、自定义标记、设置版本的自动增加(并引申Eclipse下如何设置SVN中的svn:keywords属性)几个方面来个性你的Javadoc文档。 本人博客:http://www.blogjava.net/lishunli/,希望大家支持
Javadoc 8 标签该项目为提供了关于新的 Javadoc 标签@apiNote 、 @implSpec和@implNote的代码示例,这些标签首先在 Java 8 中使用。 这包括: 使用它们的接口 显示如何继承标签的类: 没有实现默认方法~> 该方法在类...
redis-service 的JavaDoc
Maven-javadoc-plugin
JMS API JAVADOC,详细解释方法的使用。
javadoc插件使用文档
Myeclipse导出Javadoc步骤
JavaDoc写法规范 JavaDoc写法规范 JavaDoc写法规范
4)Javadoc:javadoc1.8谷歌翻译(目前能找到的最好的翻译版本) 二、操作步骤: 1、点开项文件夹找到rt.jar。 2、右键点击属性选择javadoc位置。 3、选java类中的关键字按F1就可以看到中文帮助。 4、本文插件已含全部...
中文JAVADOC中文JAVADOC
Eclipse中自动生成Javadoc的方法,以及一些标签的含义
注释规范(javadoc)
1、Javadoc2chm工具
rabbitmq-javadoc rabbitmq-javadoc html
非常标准的javadoc注释文档,值得试用