\fP -.fi -.nf -\f3 * The applet framework involves two entities:\fP -.fi -.nf -\f3 * the applet and the applet context\&.\fP -.fi -.nf -\f3 * An applet is an embeddable window (see the\fP -.fi -.nf -\f3 * {@link java\&.awt\&.Panel} class) with a few extra\fP -.fi -.nf -\f3 * methods that the applet context can use to \fP -.fi -.nf -\f3 * initialize, start, and stop the applet\&.\fP -.fi -.nf -\f3 *\fP -.fi -.nf -\f3 * @since 1\&.0\fP -.fi -.nf -\f3 * @see java\&.awt\fP -.fi -.nf -\f3 */\fP -.fi -.nf -\f3package java\&.lang\&.applet;\fP -.fi -.nf -\f3\fP -.fi -.sp - -.PP -The package\&.html File - -The \f3package\&.html\fR file can contain a package comment of the following structure\&. The comment is placed in the \f3
\fR element\&. -.PP -File: \f3java/applet/package\&.html\fR -.sp -.nf -\f3\fP -.fi -.nf -\f3\fP -.fi -.nf -\f3Provides the classes necessary to create an applet and the \fP -.fi -.nf -\f3classes an applet uses to communicate with its applet context\&.\fP -.fi -.nf -\f3\fP -.fi -.nf -\f3The applet framework involves two entities: the applet\fP -.fi -.nf -\f3and the applet context\&. An applet is an embeddable\fP -.fi -.nf -\f3window (see the {@link java\&.awt\&.Panel} class) with a\fP -.fi -.nf -\f3few extra methods that the applet context can use to\fP -.fi -.nf -\f3initialize, start, and stop the applet\&. \fP -.fi -.nf -\f3\fP -.fi -.nf -\f3@since 1\&.0 \fP -.fi -.nf -\f3@see java\&.awt\fP -.fi -.nf -\f3\fP -.fi -.nf -\f3\fP -.fi -.nf -\f3\fP -.fi -.sp -The \f3package\&.html\fR file is a typical HTML file and does not include a package declaration\&. The content of the package comment file is written in HTML with one exception\&. The documentation comment should not include the comment separators \f3/**\fR and \f3*/\fR or leading asterisks\&. When writing the comment, make the first sentence a summary about the package, and do not put a title or any other text between the \f3
\fR tag and the first sentence\&. You can include package tags\&. All block tags must appear after the main description\&. If you add an \f3@see\fR tag in a package comment file, then it must have a fully qualified name\&. -.PP -Processing the Comment File - -When the \f3javadoc\fR command runs, it searches for the package comment file\&. If the package comment file is found, then the \f3javadoc\fR command does the following: -.TP 0.2i -\(bu -Copies the comment for processing\&. For package\&.html, the \f3javadoc\fR command copies all content between the \f3\fR and \f3\fR HTML tags\&. You can include a \f3\fR section to put a \f3
\fP
-.fi
-.nf
-\f3 */\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-.SS TEST\ AND\ TEMPLATE\ FILES
-You can store test and template files in the source tree in the same directory with or in a subdirectory of the directory where the source files reside\&. To prevent test and template files from being processed, run the \f3javadoc\fR command and explicitly pass in individual source file names\&.
-.PP
-Test files are valid, compilable source files\&. Template files are not valid, compatible source files, but they often have the \f3\&.java\fR suffix\&.
-.PP
-Test Files
-
-If you want your test files to belong to either an unnamed package or to a package other than the package that the source files are in, then put the test files in a subdirectory underneath the source files and give the directory an invalid name\&. If you put the test files in the same directory with the source and call the \f3javadoc\fR command with a command-line argument that indicates its package name, then the test files cause warnings or errors\&. If the files are in a subdirectory with an invalid name, then the test file directory is skipped and no errors or warnings are issued\&. For example, to add test files for source files in com\&.package1, put them in a subdirectory in an invalid package name\&. The following directory name is invalid because it contains a hyphen:
-.sp
-.nf
-\f3com/package1/test\-files/\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-If your test files contain documentation comments, then you can set up a separate run of the \f3javadoc\fR command to produce test file documentation by passing in their test source file names with wild cards, such as \f3com/package1/test-files/*\&.java\fR\&.
-.PP
-Template Files
-
-If you want a template file to be in the source directory, but not generate errors when you execute the \f3javadoc\fR command, then give it an invalid file name such as \f3Buffer-Template\&.java\fR to prevent it from being processed\&. The \f3javadoc\fR command only processes source files with names, when stripped of the \f3\&.java\fR suffix, that are valid class names\&.
-.SH GENERATED\ FILES
-By default, the \f3javadoc\fR command uses a standard doclet that generates HTML-formatted documentation\&. The standard doclet generates basic content, cross-reference, and support pages described here\&. Each HTML page corresponds to a separate file\&. The \f3javadoc\fR command generates two types of files\&. The first type is named after classes and interfaces\&. The second type contain hyphens (such as package-summary\&.html) to prevent conflicts with the first type of file\&.
-.SS BASIC\ CONTENT\ PAGES
-.TP 0.2i
-\(bu
-One class or interface page (classname\&.html) for each class or interface being documented\&.
-.TP 0.2i
-\(bu
-One package page (package-summary\&.html) for each package being documented\&. The \f3javadoc\fR command includes any HTML text provided in a file with the name package\&.html or package-info\&.java in the package directory of the source tree\&.
-.TP 0.2i
-\(bu
-One overview page (overview-summary\&.html) for the entire set of packages\&. The overview page is the front page of the generated document\&. The \f3javadoc\fR command includes any HTML text provided in a file specified by the \f3-overview\fR option\&. The Overview page is created only when you pass two or more package names into the \f3javadoc\fR command\&. See HTML Frames and Options\&.
-.SS CROSS-REFERENCE\ PAGES
-.TP 0.2i
-\(bu
-One class hierarchy page for the entire set of packages (overview-tree\&.html)\&. To view the hierarchy page, click \fIOverview\fR in the navigation bar and click \fITree\fR\&.
-.TP 0.2i
-\(bu
-One class hierarchy page for each package (package-tree\&.html) To view the hierarchy page, go to a particular package, class, or interface page, and click \fITree\fR to display the hierarchy for that package\&.
-.TP 0.2i
-\(bu
-One use page for each package (package-use\&.html) and a separate use page for each class and interface (class-use/classname\&.html)\&. The use page describes what packages, classes, methods, constructors and fields use any part of the specified class, interface, or package\&. For example, given a class or interface A, its use page includes subclasses of A, fields declared as A, methods that return A, and methods and constructors with parameters of type A\&. To view the use page, go to the package, class, or interface and click the \fIUse\fR link in the navigation bar\&.
-.TP 0.2i
-\(bu
-A deprecated API page (deprecated-list\&.html) that lists all deprecated APIs and their suggested replacements\&. Avoid deprecated APIs because they can be removed in future implementations\&.
-.TP 0.2i
-\(bu
-A constant field values page (constant-values\&.html) for the values of static fields\&.
-.TP 0.2i
-\(bu
-A serialized form page (serialized-form\&.html) that provides information about serializable and externalizable classes with field and method descriptions\&. The information on this page is of interest to reimplementors, and not to developers who want to use the API\&. To access the serialized form page, go to any serialized class and click \fISerialized Form\fR in the See Also section of the class comment\&. The standard doclet generates a serialized form page that lists any class (public or non-public) that implements Serializable with its \f3readObject\fR and \f3writeObject\fR methods, the fields that are serialized, and the documentation comments from the \f3@serial\fR, \f3@serialField\fR, and \f3@serialData\fR tags\&. Public serializable classes can be excluded by marking them (or their package) with \f3@serial\fR exclude, and package-private serializable classes can be included by marking them (or their package) with an \f3@serial\fR include\&. As of Release 1\&.4, you can generate the complete serialized form for public and private classes by running the \f3javadoc\fR command without specifying the \f3-private\fR option\&. See Options\&.
-.TP 0.2i
-\(bu
-An index page (\f3index-*\&.html\fR) of all class, interface, constructor, field and method names, in alphabetical order\&. The index page is internationalized for Unicode and can be generated as a single file or as a separate file for each starting character (such as A\(enZ for English)\&.
-.SS SUPPORT\ PAGES
-.TP 0.2i
-\(bu
-A help page (help-doc\&.html) that describes the navigation bar and the previous pages\&. Use \f3-helpfile\fR to override the default help file with your own custom help file\&.
-.TP 0.2i
-\(bu
-One index\&.html file that creates the HTML frames for display\&. Load this file to display the front page with frames\&. The index\&.html file contains no text content\&.
-.TP 0.2i
-\(bu
-Several frame files (\f3*-frame\&.html\fR) that contains lists of packages, classes, and interfaces\&. The frame files display the HTML frames\&.
-.TP 0.2i
-\(bu
-A package list file (package-list) that is used by the \f3-link\fR and \f3-linkoffline\fR options\&. The package list file is a text file that is not reachable through links\&.
-.TP 0.2i
-\(bu
-A style sheet file (stylesheet\&.css) that controls a limited amount of color, font family, font size, font style, and positioning information on the generated pages\&.
-.TP 0.2i
-\(bu
-A doc-files directory that holds image, example, source code, or other files that you want copied to the destination directory\&. These files are not processed by the \f3javadoc\fR command\&. This directory is not processed unless it exists in the source tree\&.
-.PP
-See Options\&.
-.SS HTML\ FRAMES
-The \f3javadoc\fR command generates the minimum number of frames (two or three) necessary based on the values passed to the command\&. It omits the list of packages when you pass a single package name or source files that belong to a single package as an argument to the \f3javadoc\fR command\&. Instead, the \f3javadoc\fR command creates one frame in the left-hand column that displays the list of classes\&. When you pass two or more package names, the \f3javadoc\fR command creates a third frame that lists all packages and an overview page (overview-summary\&.html)\&. To bypass frames, click the \fINo Frames\fR link or enter the page set from the overview-summary\&.html page\&.
-.SS GENERATED\ FILE\ STRUCTURE
-The generated class and interface files are organized in the same directory hierarchy that Java source files and class files are organized\&. This structure is one directory per subpackage\&.
-.PP
-For example, the document generated for the \f3java\&.applet\&.Applet\fR class would be located at java/applet/Applet\&.html\&.
-.PP
-The file structure for the \f3java\&.applet\fR package follows, assuming that the destination directory is named \f3apidocs\fR\&. All files that contain the word \fIframe\fR appear in the upper-left or lower-left frames, as noted\&. All other HTML files appear in the right-hand frame\&.
-.PP
-Directories are bold\&. The asterisks (*) indicate the files and directories that are omitted when the arguments to the \f3javadoc\fR command are source file names rather than package names\&. When arguments are source file names, an empty package list is created\&. The doc-files directory is not created in the destination unless it exists in the source tree\&. See Generated Files\&.
-.TP 0.2i
-\(bu
-\fIapidocs\fR: Top-level directory
-.RS
-.TP 0.2i
-\(bu
-index\&.html: Initial Page that sets up HTML frames
-.TP 0.2i
-\(bu
-*overview-summary\&.html: Package list with summaries
-.TP 0.2i
-\(bu
-overview-tree\&.html: Class hierarchy for all packages
-.TP 0.2i
-\(bu
-deprecated-list\&.html: Deprecated APIs for all packages
-.TP 0.2i
-\(bu
-constant-values\&.html: Static field values for all packages
-.TP 0.2i
-\(bu
-serialized-form\&.html: Serialized forms for all packages
-.TP 0.2i
-\(bu
-*overview-frame\&.html: All packages for display in upper-left frame
-.TP 0.2i
-\(bu
-allclasses-frame\&.html: All classes for display in lower-left frame
-.TP 0.2i
-\(bu
-help-doc\&.html: Help about Javadoc page organization
-.TP 0.2i
-\(bu
-index-all\&.html: Default index created without \f3-splitindex\fR option
-.TP 0.2i
-\(bu
-\fIindex-files\fR: Directory created with \f3-splitindex\fR option
-.RS
-.TP 0.2i
-\(bu
-index-\fR tag with its indentation preserved\&. Spaces are interpreted by browsers more uniformly than tabs\&. Indentation is relative to the left margin (rather than the separator \f3/**\fR or \f3\fR tag)\&. -.PP -First Sentence - -The first sentence of each documentation comment should be a summary sentence that contains a concise but complete description of the declared entity\&. This sentence ends at the first period that is followed by a blank, tab, or line terminator, or at the first block tag\&. The \f3javadoc\fR command copies this first sentence to the member summary at the top of the HTML page\&. -.PP -Multiple-Field Declarations - -The Java platform lets you declare multiple fields in a single statement, but this statement can have only one documentation comment that is copied for all fields\&. If you want individual documentation comments for each field, then declare each field in a separate statement\&. For example, the following documentation comment does not make sense written as a single declaration and would be better handled as two declarations: -.sp -.nf -\f3/** \fP -.fi -.nf -\f3 * The horizontal and vertical distances of point (x,y)\fP -.fi -.nf -\f3 */\fP -.fi -.nf -\f3public int x, y; // Avoid this \fP -.fi -.nf -\f3\fP -.fi -.sp -The \f3javadoc\fR command generates the following documentation from the previous code: -.sp -.nf -\f3public int x\fP -.fi -.nf -\f3\fP -.fi -.sp -The horizontal and vertical distances of point (x, y)\&. -.sp -.nf -\f3public int y\fP -.fi -.nf -\f3\fP -.fi -.sp -The horizontal and vertical distances of point (x, y)\&. -.PP -Use of Header Tags - -When writing documentation comments for members, it is best not to use HTML heading tags such as \f3\fR and \f3
\fR, because the \f3javadoc\fR command creates an entire structured document, and these structural tags might interfere with the formatting of the generated document\&. However, you can use these headings in class and package comments to provide your own structure\&. -.SS METHOD\ COMMENT\ INHERITANCE -The \f3javadoc\fR command allows method comment inheritance in classes and interfaces to fill in missing text or to explicitly inherit method comments\&. Constructors, fields, and nested classes do not inherit documentation comments\&. -.PP -\fINote:\fR The source file for an inherited method must be on the path specified by the \f3-sourcepath\fR option for the documentation comment to be available to copy\&. Neither the class nor its package needs to be passed in on the command line\&. This contrasts with Release 1\&.3\&.\fIn\fR and earlier releases, where the class had to be a documented class\&. -.PP -Fill in Missing Text - -When a main description, or \f3@return\fR, \f3@param\fR, or \f3@throws\fR tag is missing from a method comment, the \f3javadoc\fR command copies the corresponding main description or tag comment from the method it overrides or implements (if any)\&. See Method Comment Inheritance\&. -.PP -When an \f3@param\fR tag for a particular parameter is missing, the comment for that parameter is copied from the method further up the inheritance hierarchy\&. When an \f3@throws\fR tag for a particular exception is missing, the \f3@throws\fR tag is copied only when that exception is declared\&. -.PP -This behavior contrasts with Release 1\&.3 and earlier, where the presence of any main description or tag would prevent all comments from being inherited\&. -.PP -See Javadoc Tags and Options\&. -.PP -Explicit Inheritance - -Insert the \f3{@inheritDoc}\fR inline tag in a method main description or \f3@return\fR, \f3@param\fR, or \f3@throws\fR tag comment\&. The corresponding inherited main description or tag comment is copied into that spot\&. -.SS CLASS\ AND\ INTERFACE\ INHERITANCE -Comment inheritance occurs in all possible cases of inheritance from classes and interfaces: -.TP 0.2i -\(bu -When a method in a class overrides a method in a superclass -.TP 0.2i -\(bu -When a method in an interface overrides a method in a superinterface -.TP 0.2i -\(bu -When a method in a class implements a method in an interface -.PP -In the first two cases, the \f3javadoc\fR command generates the subheading \fIOverrides\fR in the documentation for the overriding method\&. A link to the method being overridden is included, whether or not the comment is inherited\&. -.PP -In the third case, when a method in a specified class implements a method in an interface, the \f3javadoc\fR command generates the subheading \fISpecified by\fR in the documentation for the overriding method\&. A link to the method being implemented is included, whether or not the comment is inherited\&. -.SS METHOD\ COMMENTS\ ALGORITHM -If a method does not have a documentation comment, or has an \f3{@inheritDoc}\fR tag, then the \f3javadoc\fR command uses the following algorithm to search for an applicable comment\&. The algorithm is designed to find the most specific applicable documentation comment, and to give preference to interfaces over superclasses: -.TP 0.4i -1\&. -Look in each directly implemented (or extended) interface in the order they appear following the word \f3implements\fR (or \f3extends\fR) in the method declaration\&. Use the first documentation comment found for this method\&. -.TP 0.4i -2\&. -If Step 1 failed to find a documentation comment, then recursively apply this entire algorithm to each directly implemented (or extended) interface in the same order they were examined in Step 1\&. -.TP 0.4i -3\&. -When Step 2 fails to find a documentation comment and this is a class other than the \f3Object\fR class, but not an interface: -.RS -.TP 0.4i -1\&. -If the superclass has a documentation comment for this method, then use it\&. -.TP 0.4i -2\&. -If Step 3a failed to find a documentation comment, then recursively apply this entire algorithm to the superclass\&. -.RE - -.SH JAVADOC\ TAGS -The \f3javadoc\fR command parses special tags when they are embedded within a Java documentation comment\&. The \f3javadoc\fR tags let you autogenerate a complete, well-formatted API from your source code\&. The tags start with an at sign (\f3@\fR) and are case-sensitive\&. They must be typed with the uppercase and lowercase letters as shown\&. A tag must start at the beginning of a line (after any leading spaces and an optional asterisk), or it is treated as text\&. By convention, tags with the same name are grouped together\&. For example, put all \f3@see\fR tags together\&. For more information, see Where Tags Can Be Used\&. -.PP -Tags have the following types: -.TP 0.2i -\(bu -Bock tags: Place block tags only in the tag section that follows the description\&. Block tags have the form: \fI@tag\fR\&. -.TP 0.2i -\(bu -Inline tags: Place inline tags anywhere in the main description or in the comments for block tags\&. Inline tags are enclosed within braces: \fI{@tag}\fR\&. -.PP -For custom tags, see -tag tagname:Xaoptcmf:"taghead"\&. See also Where Tags Can Be Used\&. -.SS TAG\ DESCRIPTIONS -.TP -@author \fIname-text\fR -Introduced in JDK 1\&.0 - -Adds an Author entry with the specified name text to the generated documents when the \f3-author\fR option is used\&. A documentation comment can contain multiple \f3@author\fR tags\&. You can specify one name per \f3@author\fR tag or multiple names per tag\&. In the former case, the \f3javadoc\fR command inserts a comma (,) and space between names\&. In the latter case, the entire text is copied to the generated document without being parsed\&. Therefore, you can use multiple names per line if you want a localized name separator other than a comma\&. See @author in How to Write Doc Comments for the Javadoc Tool at http://www\&.oracle\&.com/technetwork/java/javase/documentation/index-137868\&.html#@author -.TP -{@code \fItext\fR} -Introduced in JDK 1\&.5 - -Equivalent to \f3
{@literal}\fR\&. - -Displays text in code font without interpreting the text as HTML markup or nested Javadoc tags\&. This enables you to use regular angle brackets (< and >) instead of the HTML entities (\f3<\fR and \f3>\fR) in documentation comments, such as in parameter types (\f3