javadoc tags
Where Tags Can Be Used
The following sections describe where the tags can be used. Note that these tags can be used in all doc comments: @see
, @since
, @deprecated
, {@link}
, {@linkplain}
, and {@docroot}
.
Overview Documentation Tags
Overview tags are tags that can appear in the documentation comment for the overview page (which resides in the source file typically named overview.html
). Like in any other documentation comments, these tags must appear after the main description.
NOTE - The {@link}
tag has a bug in overview documents in version 1.2 – the text appears properly but has no link. The {@docRoot}
tag does not currently work in overview documents.
Overview Tags |
---|
@see |
@since |
@author |
@version |
{@link} |
{@linkplain} |
{@docRoot} |
Package Documentation Tags
Package tags are tags that can appear in the documentation comment for a package (which resides in the source file named package.html
or package-info.java
). The @serial
tag can only be used here with the include
orexclude
argument.
Package Tags |
---|
@see |
@since |
@serial |
@author |
@version |
{@link} |
{@linkplain} |
{@docRoot} |
Class and Interface Documentation Tags
The following are tags that can appear in the documentation comment for a class or interface. The @serial
tag can only be used here with the include
or exclude
argument.
Class/Interface Tags |
---|
@see |
@since |
@deprecated |
@serial |
@author |
@version |
{@link} |
{@linkplain} |
{@docRoot} |
An example of a class comment:
/**
* A class representing a window on the screen.
* For example:
* <pre>
* Window win = new Window(parent);
* win.show();
* </pre>
*
* @author Sami Shaio
* @version 1.15, 13 Dec 2006
* @see java.awt.BaseWindow
* @see java.awt.Button
*/
class Window extends BaseWindow {
...
}
Field Documentation Tags
The following are the tags that can appear in the documentation comment for a field.
Field Tags |
---|
@see |
@since |
@deprecated |
@serial |
@serialField |
{@link} |
{@linkplain} |
{@docRoot} |
{@value} |
An example of a field comment:
/**
* The X-coordinate of the component.
*
* @see #getLocation()
*/
int x = 1263732;
Constructor and Method Documentation Tags
The following are the tags that can appear in the documentation comment for a constructor or method, except for @return
, which cannot appear in a constructor, and {@inheritDoc}
, which has certain restrictions. The @serialData
tag can only be used in the doc comment for certain serialization methods.
Method/Constructor Tags |
---|
@see |
@since |
@deprecated |
@param |
@return |
@throws and @exception |
@serialData |
{@link} |
{@linkplain} |
{@inheritDoc} |
{@docRoot} |
An example of a method doc comment:
/**
* Returns the character at the specified index. An index
* ranges from <code>0</code> to <code>length() - 1</code>.
*
* @param index the index of the desired character.
* @return the desired character.
* @exception StringIndexOutOfRangeException
* if the index is not in the range <code>0</code>
* to <code>length()-1</code>.
* @see java.lang.Character#charValue()
*/
public char charAt(int index) {
...
}
javadoc tags的更多相关文章
- How to Write Doc Comments for the Javadoc Tool
http://www.oracle.com/technetwork/java/javase/documentation/index-137868.html This document describe ...
- idea自定义 tags 删除
idea custom tags 添加后 如何去除 如何去除 custom tags 随便@一些字符串,这时候alt+enter弹出 Add xxx to custom tags, 这时候按有方向键进 ...
- Effective Java 44 Write doc comments for all exposed API elements
Principle You must precede every exported class, interface, constructor, method, and field declarati ...
- 【转】20个Java 代码生成器
From: http://www.cnblogs.com/skyme/archive/2011/12/22/2297592.html 1.1 CodeSmith 一款人气很旺国外的基于模板的dotne ...
- Android代码规范
Android代码规范——文章来源<IT蓝豹>http://itlanbao.com/preview.aspx#1,0 [-]一Import的次序二缩进Indentation总则示例代码规 ...
- 20个代码生成框架 (.NET JAVA)
1.1 CodeSmith 一款人气很旺国外的基于模板的dotnet代码生成器 官方网站:http://www.codesmithtools.com 官方论坛:http://forum.codesmi ...
- SettingsEclipse&MyEclipse
eclipse优化 迁移时间--2017年5月20日09:39:16 CreateTime--2016年11月18日11:27:02 Author:Marydon ModifyTime--2017 ...
- IDEA-基本设置
目录: 1.设置内存 2.设置编码格式 3.设置换行符 4.设置新建Class文档说明 5.添加自定义注释 6.设置自己的maven 工欲善其事,必先利其器,设置好基础的设置才能事半功倍!少踩坑!以下 ...
- Java的文件注释
以下内容引用自http://wiki.jikexueyuan.com/project/java/documentation.html: Java语言支持三种注释形式: 注释 描述 /*text*/ 编 ...
随机推荐
- asm335x系列adc和触摸屏驱动(转)
An analog-to-digital converter (abbreviated ADC) is a device that uses sampling to convert a continu ...
- HttpHelp 请求帮助类
using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Net ...
- 转 --自然语言工具包(NLTK)小结
原作者:http://www.cnblogs.com/I-Tegulia/category/706685.html 1.自然语言工具包(NLTK) NLTK 创建于2001 年,最初是宾州大学计算机与 ...
- unity的sprite添加点击事件
直接说方法 添加一个2dxxx的碰撞器 添加一个OnMouseDown的回调函数,这个函数看script reference就可以
- 使用anaconda安装tensorflow (windows10环境)
版权声明:勤学 修德 明辨 笃实 - CSDN周雄伟 https://blog.csdn.net/ebzxw/article/details/80701613 已有环境:python3.7.1 ana ...
- Java 8 Lambda表达式之方法引用 ::双冒号操作符
双冒号运算符就是java中的方法引用,方法引用的格式是类名::方法名. 这里只是方法名,方法名的后面没有括号“()”.--------> 这样的式子并不代表一定会调用这个方法.这种式子一般是用作 ...
- nginx学习1
访问abc.xxx.com就跳转到www.xxx.com/abc.html server { listen 80; server_name abc.xxx.com; rewrite ^.*$ ww ...
- Unity3D的坑系列:动态加载dll
我现在参与的项目是做MMO手游,目标平台是Android和iOS,iOS平台不能动态加载dll(什么原因找乔布斯去),可以直接忽略,而在Android平台是可以动态加载dll的,有了这个就可以实现代码 ...
- SpringBoot 之 普通类获取Spring容器中的bean
[十]SpringBoot 之 普通类获取Spring容器中的bean 我们知道如果我们要在一个类使用spring提供的bean对象,我们需要把这个类注入到spring容器中,交给spring容器 ...
- TMS Grid
TMS Grid http://edn.embarcadero.com/article/42553