5

Some API docs contain information at package level. For example java.io contains 3 package-level sections here http://docs.oracle.com/javase/7/docs/api/java/io/package-summary.html

The sections are: "Package java.io Description", "Package Specification" and "Related Documentation".

Where should I put these sections content in my own project so that javadoc processes it in the same way?

Suzan Cioc
  • 29,281
  • 63
  • 213
  • 385

3 Answers3

6

create a file called package-info.java in each package

inside do the following

/**
 * Javadoc
 */
package my.cool.package123;
peshkira
  • 6,069
  • 1
  • 33
  • 46
2

You put those comments in a package comment file (emphasis mine):

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 generally preferred over package.html .
  • package.html - Can contain only package comments and Javadoc tags, no package annotations.
Community
  • 1
  • 1
Joachim Sauer
  • 302,674
  • 57
  • 556
  • 614
1

You have to put a file called package-info.java into the folder that contains your package.

Pao
  • 843
  • 5
  • 17