ALTE DOCUMENTE
|
|||
You can run the Javadoc tool on entire packages, individual source files, or both. In the first case, you pass in as an argument to javadoc a series of package names. In the second case you pass in a series of source ".java" filenames. Examples are given 12212h712m at the end of this document.
Javadoc can only be run on source files and packages. Once you have run Javadoc and want to view the generated HTML, the topmost page is named packages.html (in Javadoc 1.1) or index.html (in Javadoc 1.2 and later).
NOTE - When you pass in package names to the Javadoc tool, it currently processes all ".java" classes in the specified package directories, even if the ".java" files are code examples or other classes that are not actually members of the specified packages. It does not parse each ".java" file for a package declaration. Sun may add this parsing in a future release.
The Javadoc tool is included in the Java Development Kits. The only way to obtain the Javadoc tool is by downloading the relevant JDK or SDK.
The Javadoc tool produces one complete document set each time it is run; it cannot do incremental builds -- that is, it cannot modify or directly incorporate results from previous runs of the Javadoc tool. However, it can link to results from other runs.
As implemented, the Javadoc tool requires and relies on the java compiler to do its job. The Javadoc tool calls part of javac to compile the declarations, ignoring the member implementation. It builds a rich internal representation of the classes, including the class hierarchy and using its relationships, then generates the HTML from that. The Javadoc tool also picks up specially formatted, user-supplied documentation (often called doc comments) in the source code.
In fact, the Javadoc tool will run on ".java" source files that are pure stub files with no method bodies. This means you can write documentation comments and run the Javadoc tool in the earliest stages of design while creating the API, before writing the implementation.
|