包文件

Version >= Java SE 5

可以使用名為 package-info.java 的檔案在 Javadocs 中建立包級文件。此檔案必須格式如下。前導空格和星號可選,通常出現在每一行中,以便格式化

/**
 * Package documentation goes here; any documentation before the first period will 
 * be used as a summary.
 *
 * It is common practice to leave a blank line between the summary and the rest
 * of the documentation; use this space to describe the package in as much detail
 * as is appropriate.
 * 
 * Inline tags such as {@code code here}, {@link reference.to.other.Documentation},
 * and {@literal text here} can be used in this documentation.
 */
package com.example.foo;

// The rest of the file must be empty.

在上面的例子中,你必須將這個檔案 package-info.java 放在 Java 包 com.example.foo 的資料夾中。