如何在Javadoc中添加包级别的注释? [英] How to add package level comments in Javadoc?

查看:428
本文介绍了如何在Javadoc中添加包级别的注释?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Check-Style,FindBugs和PMD来验证我的Java代码。我已经修复了这些工具捕获的几乎所有的错误。

I am using Check-Style, FindBugs, and PMD to validate my Java code. I have fixed almost all the bugs caught by these tools.

我无法理解如何编写包注释,这是由checkstyle捕获的错误。我已经经历了Check-Style的文档,但是我不明白。

I am not able to understand how to write "package comment" which is a bug caught by checkstyle. I have gone through the documentation of Check-Style, but I don't understand it.

有人可以帮我在Java中写一个包级别的注释吗?

Could someone help me in writing a package level comment in Java?

推荐答案

包级别的javadoc注释放在名为 package-info.java的文件中在package目录下。它包含注释和包声明:

Package-level javadoc comments are placed in a file named package-info.java inside the package directory. It contains the comment and a package declaration:

/**
 * Provides the classes necessary to create an applet and the classes an applet uses 
 * to communicate with its applet context. 
 * <p>
 * The applet framework involves two entities: 
 * the applet and the applet context. An applet is an embeddable window (see the 
 * {@link java.awt.Panel} class) with a few extra methods that the applet context 
 * can use to initialize, start, and stop the applet.
 *
 * @since 1.0
 * @see java.awt
 */
package java.lang.applet;

这里记录:套装评论文件

这篇关于如何在Javadoc中添加包级别的注释?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆