Java Reference
In-Depth Information
javadoc org.juneau.beans
To generate Javadoc for more than one package at a time, separate the package
names with spaces as follows:
javadoc org.juneau.beans org.juneau.entity
Another option is to specify the path to the source files using the -sourcepath
flag. For example:
javadoc -sourcepath /java/src
By default, the Javadoc tool will generate HTML and place it into the same
package as the code being documented. That result can become a cluttered nightmare if
you like to have source files separate from documentation. You can instead set up a
destination for the generated documentation by passing the -d flag to the Javadoc
tool.
1-9. Organizing Code with Packages
Problem
Your application consists of a set of Java classes, interfaces, and other types. You want
to organize these source files to make them easier to maintain and avoid potential class-
naming conflicts.
Solution
Create Java packages and place source files within them much like a filing system.
Java packages can be used to organize logical groups of source files within an applica-
tion. Packages can help to organize code, reduce naming conflicts among different
classes and other Java type files, and provide access control. To create a package,
simply create a directory within the root of your application source folder and name it.
Packages are usually nested within each other and conform to a standard naming con-
vention. For the purposes of this recipe, assume that the organization is named Jun-
eau and that the organization makes widgets. To organize all the code for the widget
Search WWH ::




Custom Search