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*/ 编 ...
随机推荐
- bzoj 4036 [HAOI2015]按位或——min-max容斥+FMT
题目:https://www.lydsy.com/JudgeOnline/problem.php?id=4036 题解:https://www.cnblogs.com/Zinn/p/10260126. ...
- thinkphp配置rewrite模式访问时不生效 出现No input file specified解决方法
使用thinkphp配置rewire模式的路径访问网站时, 直接复制官网的.htaccess文件的代码复制过去 1 2 3 4 5 6 <IfModule mod_rewrite.c> ...
- ASI和TS流有什么区别
TS流是信源码流,最高码率为44.209 Mbit/s,它是经过信源编码后的压缩码流,为了使欲传输的信源信息在传输速率一定的条件下更快更多地传输,还要把数据进行压缩,也就是通过信源编码去掉信息中多余的 ...
- api proxy设置 后端服务器代理
location ^~ /api/{ ssi on; ssi_silent_errors off; proxy_redirect off; proxy_set_header Host $host; p ...
- PHP数组键值使用单引号和双引号和无符号的区别
PHP数组键值使用单引号和双引号和无符号的区别 方法/步骤 1 第一种:$array['key']此单引号键值模式可以直接被解析为一个数组即$array 第二种:$array["key&qu ...
- 各种装饰器demo及优化
#!/usr/bin/python3# -*- coding: utf-8 -*-# @Time : 2018/5/28 14:06# @File : lianxi.py ## impor ...
- 分布式锁实践(二)-ZooKeeper实现总结
写在最前面 前几周写了篇 利用Redis实现分布式锁 ,今天简单总结下ZooKeeper实现分布式锁的过程.其实生产上我只用过Redis或者数据库的方式,之前还真没了解过ZooKeeper怎么实现分布 ...
- mybatis一对多关联查询+pagehelper->分页错误
mybatis一对多关联查询+pagehelper->分页错误. 现象: 网上其他人遇到的类似问题:https://segmentfault.com/q/1010000009692585 解决: ...
- AngularJS学习笔记(3)——通过Ajax获取JSON数据
通过Ajax获取JSON数据 以我之前写的与用户交互的动态清单列表为例,使用JSON前todo.html代码如下: <!DOCTYPE html> <html ng-app=&quo ...
- leetcode563
/** * Definition for a binary tree node. * public class TreeNode { * public int val; * public TreeNo ...