问题:
看开源项目发现这个package-info.java文件有些特殊,从名字上面也可以猜出这个类是与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 generally preferred over package.html.package.html
- Can contain only package comments and
Javadoc tags, no package annotations.
参考:
http://docs.oracle.com/javase/7/docs/technotes/tools/solaris/javadoc.html#packagecomment
http://www.intertech.com/Blog/whats-package-info-java-for/
http://blog.sina.com.cn/s/blog_93dc666c0101gzlr.html
http://stackoverflow.com/questions/3644726/javadoc-package-html-or-package-info-java
http://book.51cto.com/art/201202/317538.htm
时间: 2024-10-18 17:55:59