Eclipse自动生成javadoc

javadoc
The JDK tool that generates API documentation from documentation comments.
Documentation comments (doc comments)
The special comments in the Java source code that are delimited by the /** ... */ delimiters. These comments are processed by the Javadoc tool to generate the API docs.
How to write Java doc comments
http://www.oracle.com/technetwork/java/javase/documentation/index-137868.html

选中某个project, 然后菜单 > project > generate javadoc

(Eclipse有个Jautodoc pulgin 可以为每个文件自动生成comment)

Package Comment Files

Each package can have its own documentation comment, contained in its own "source" file, that the Javadoc tool will merge into the package summary page that it generates. You typically include in this comment any documentation that applies to the entire package.

To create a package comment file, you have a choice of two files to place your comments:

  • package-info.java - Can contain a package declaration, package annotations, package comments and Javadoc tags. This file is new in JDK 5.0, and is preferred over package.html.
  • package.html - Can contain only package comments and Javadoc tags, no package annotations.

A package may have a single package.html file or a single package-info.java file but not both. Place either file in the package directory in the source tree along with your .java files.

 

package-info.java This file can contain a package comment of the following structure -- the comment is placed before the package declaration:

File: java/applet/package-info.java

     
     
/**

* 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;


Note that while the comment separators /** and /* must be present, the leading asterisks on the intermediate lines can be omitted. package.html - This file can contain a package comment of the following structure -- the comment is placed in the <body> element:

File: java/applet/package.html

 
 
<HTML>

<BODY>

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

</BODY>

</HTML>


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值