michaelm | 5ac8c15 | 2012-03-06 20:34:38 +0000 | [diff] [blame] | 1 | ." Copyright (c) 1994, 2011, Oracle and/or its affiliates. All rights reserved. |
| 2 | ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
| 3 | ." |
| 4 | ." This code is free software; you can redistribute it and/or modify it |
| 5 | ." under the terms of the GNU General Public License version 2 only, as |
| 6 | ." published by the Free Software Foundation. |
| 7 | ." |
| 8 | ." This code is distributed in the hope that it will be useful, but WITHOUT |
| 9 | ." ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
| 10 | ." FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
| 11 | ." version 2 for more details (a copy is included in the LICENSE file that |
| 12 | ." accompanied this code). |
| 13 | ." |
| 14 | ." You should have received a copy of the GNU General Public License version |
| 15 | ." 2 along with this work; if not, write to the Free Software Foundation, |
| 16 | ." Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
| 17 | ." |
| 18 | ." Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
| 19 | ." or visit www.oracle.com if you need additional information or have any |
| 20 | ." questions. |
| 21 | ." |
| 22 | .TH javadoc 1 "10 May 2011" |
| 23 | .SH "Name" |
| 24 | javadoc \- The Java API Documentation Generator |
| 25 | .LP |
| 26 | Generates HTML pages of API documentation from Java source files. This document contains Javadoc examples for Solaris. |
| 27 | .SH "SYNOPSIS" |
| 28 | .LP |
| 29 | \f4javadoc\fP\f2\ [\ \fP\f2options\fP\f2\ ]\ [\ packagenames\ ]\ [\ sourcefilenames\ ]\ [\ \-subpackages\fP\ \f2pkg1:pkg2:...\fP\f2\ ]\ [\ \fP\f2@argfiles\fP\f2\ ]\fP |
| 30 | .LP |
| 31 | Arguments can be in any order. See processing of Source Files for details on how the Javadoc tool determines which "\f2.java\fP" files to process. |
| 32 | .RS 3 |
| 33 | .TP 3 |
| 34 | options |
| 35 | Command\-line options, as specified in this document. To see a typical use of javadoc options, see Real\-World Example. |
| 36 | .TP 3 |
| 37 | packagenames |
| 38 | A series of names of packages, separated by spaces, such as \f2java.lang\ java.lang.reflect\ java.awt\fP. You must separately specify each package you want to document. Wildcards are not allowed; use \-subpackages for recursion. The Javadoc tool uses \f2\-sourcepath\fP to look for these package names. See Example \- Documenting One or More Packages |
| 39 | .TP 3 |
| 40 | sourcefilenames |
| 41 | A series of source file names, separated by spaces, each of which can begin with a path and contain a wildcard such as asterisk (*). The Javadoc tool will process every file whose name ends with ".java", and whose name, when stripped of that suffix, is actually a legal class name (see the Java Language Specification). Therefore, you can name files with dashes (such as \f2X\-Buffer\fP), or other illegal characters, to prevent them from being documented. This is useful for test files and template files The path that precedes the source file name determines where javadoc will look for the file. (The Javadoc tool does \f2not\fP use \f2\-sourcepath\fP to look for these source file names.) Relative paths are relative to the current directory, so passing in \f2Button.java\fP is identical to \f2./Button.java\fP. A source file name with an absolute path and a wildcard, for example, is \f2/home/src/java/awt/Graphics*.java\fP. See Example\ \-\ Documenting One or More Classes. You can also mix packagenames and sourcefilenames, as in Example\ \-\ Documenting Both Packages and Classes |
| 42 | .TP 3 |
| 43 | \-subpackages pkg1:pkg2:... |
| 44 | Generates documentation from source files in the specified packages and recursively in their subpackages. An alternative to supplying packagenames or sourcefilenames. |
| 45 | .TP 3 |
| 46 | @argfiles |
| 47 | One or more files that contain a list of Javadoc options, packagenames and sourcefilenames in any order. Wildcards (*) and \f2\-J\fP options are not allowed in these files. |
| 48 | .RE |
| 49 | .SH "DESCRIPTION" |
| 50 | .LP |
| 51 | The \f3Javadoc\fP tool parses the declarations and documentation comments in a set of Java source files and produces a corresponding set of HTML pages describing (by default) the public and protected classes, nested classes (but not anonymous inner classes), interfaces, constructors, methods, and fields. You can use it to generate the API (Application Programming Interface) documentation or the implementation documentation for a set of source files. |
| 52 | .LP |
| 53 | You can run the Javadoc tool on entire packages, individual source files, or both. When documenting entire packages, you can either use \f2\-subpackages\fP for traversing recursively down from a top\-level directory, or pass in an explicit list of package names. When documenting individual source files, you pass in a list of source (\f2.java\fP) filenames. Examples are given at the end of this document. How Javadoc processes source files is covered next. |
| 54 | .SS |
| 55 | Processing of source files |
| 56 | .LP |
| 57 | The Javadoc tool processes files that end in "\f2.java\fP" plus other files described under Source Files. If you run the Javadoc tool by explicitly passing in individual source filenames, you can determine exactly which "\f2.java\fP" files are processed. However, that is not how most developers want to work, as it is simpler to pass in package names. The Javadoc tool can be run three ways without explicitly specifying the source filenames. You can (1) pass in package names, (2) use \f2\-subpackages\fP, and (3) use wildcards with source filenames (\f2*.java\fP). In these cases, the Javadoc tool processes a "\f2.java\fP" file only if it fulfills all of the following requirements: |
| 58 | .RS 3 |
| 59 | .TP 2 |
| 60 | o |
| 61 | Its name, after stripping off the "\f2.java\fP" suffix, is actually a legal class name (see the Java Language Specification for legal characters) |
| 62 | .TP 2 |
| 63 | o |
| 64 | Its directory path relative to the root of the source tree is actually a legal package name (after converting its separators to dots) |
| 65 | .TP 2 |
| 66 | o |
| 67 | Its package statement contains the legal package name (specified in the previous bullet) |
| 68 | .RE |
| 69 | .LP |
| 70 | \f3Processing of links\fP \- During a run, the Javadoc tool automatically adds cross\-reference links to package, class and member names that are being documented as part of that run. Links appear in several places: |
| 71 | .RS 3 |
| 72 | .TP 2 |
| 73 | o |
| 74 | Declarations (return types, argument types, field types) |
| 75 | .TP 2 |
| 76 | o |
| 77 | "See Also" sections generated from \f2@see\fP tags |
| 78 | .TP 2 |
| 79 | o |
| 80 | In\-line text generated from \f2{@link}\fP tags |
| 81 | .TP 2 |
| 82 | o |
| 83 | Exception names generated from \f2@throws\fP tags |
| 84 | .TP 2 |
| 85 | o |
| 86 | "Specified by" links to members in interfaces and "Overrides" links to members in classes |
| 87 | .TP 2 |
| 88 | o |
| 89 | Summary tables listing packages, classes and members |
| 90 | .TP 2 |
| 91 | o |
| 92 | Package and class inheritance trees |
| 93 | .TP 2 |
| 94 | o |
| 95 | The index |
| 96 | .RE |
| 97 | .LP |
| 98 | You can add hyperlinks to existing text for classes not included on the command line (but generated separately) by way of the \f2\-link\fP and \f2\-linkoffline\fP options. |
| 99 | .LP |
| 100 | \f3Other processing details\fP \- The Javadoc tool produces one complete document each time it is run; it cannot do incremental builds \-\- that is, it cannot modify or \f2directly\fP incorporate results from previous runs of the Javadoc tool. However, it can link to results from other runs, as just mentioned. |
| 101 | .LP |
| 102 | As implemented, the Javadoc tool requires and relies on the java compiler to do its job. The Javadoc tool calls part of \f2javac\fP to compile the declarations, ignoring the member implementation. It builds a rich internal representation of the classes, including the class hierarchy, and "use" relationships, then generates the HTML from that. The Javadoc tool also picks up user\-supplied documentation from documentation comments in the source code. |
| 103 | .LP |
| 104 | In fact, the Javadoc tool will run on \f2.java\fP 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. |
| 105 | .LP |
| 106 | Relying on the compiler ensures that the HTML output corresponds exactly with the actual implementation, which may rely on implicit, rather than explicit, source code. For example, the Javadoc tool documents default constructors (see Java Language Specification) that are present in the \f2.class\fP files but not in the source code. |
| 107 | .LP |
| 108 | In many cases, the Javadoc tool allows you to generate documentation for source files whose code is incomplete or erroneous. This is a benefit that enables you to generate documentation before all debugging and troubleshooting is done. For example, according to the \f2Java Language Specification\fP, a class that contains an abstract method should itself be declared abstract. The Javadoc tool does not check for this, and would proceed without a warning, whereas the javac compiler stops on this error. The Javadoc tool does do some primitive checking of doc comments. Use the DocCheck doclet to check the doc comments more thoroughly. |
| 109 | .LP |
| 110 | When the Javadoc tool builds its internal structure for the documentation, it loads all referenced classes. Because of this, the Javadoc tool must be able to find all referenced classes, whether bootstrap classes, extensions, or user classes. For more about this, see |
| 111 | .na |
| 112 | \f2How Classes Are Found\fP @ |
| 113 | .fi |
| 114 | http://download.oracle.com/javase/7/docs/technotes/tools/findingclasses.html. Generally speaking, classes you create must either be loaded as an extension or in the Javadoc tool's class path. |
| 115 | .SS |
| 116 | Javadoc Doclets |
| 117 | .LP |
| 118 | You can customize the content and format of the Javadoc tool's output by using doclets. The Javadoc tool has a default "built\-in" doclet, called the standard doclet, that generates HTML\-formatted API documentation. You can modify or subclass the standard doclet, or write your own doclet to generate HTML, XML, MIF, RTF or whatever output format you'd like. Information about doclets and their use is at the following locations: |
| 119 | .RS 3 |
| 120 | .TP 2 |
| 121 | o |
| 122 | .na |
| 123 | \f2Javadoc Doclets\fP @ |
| 124 | .fi |
| 125 | http://download.oracle.com/javase/7/docs/technotes/guides/javadoc/index.html |
| 126 | .TP 2 |
| 127 | o |
| 128 | The \f2\-doclet\fP command\-line option |
| 129 | .RE |
| 130 | .LP |
| 131 | When a custom doclet is not specified with the \f2\-doclet\fP command line option, the Javadoc tool will use the default standard doclet. The javadoc tool has several command line options that are available regardless of which doclet is being used. The standard doclet adds a supplementary set of command line options. Both sets of options are described below in the options section. |
| 132 | .SS |
| 133 | Related Documentation and Doclets |
| 134 | .RS 3 |
| 135 | .TP 2 |
| 136 | o |
| 137 | .na |
| 138 | \f2Javadoc Enhancements\fP @ |
| 139 | .fi |
| 140 | http://download.oracle.com/javase/7/docs/technotes/guides/javadoc/index.html for details about improvements added in Javadoc. |
| 141 | .TP 2 |
| 142 | o |
| 143 | .na |
| 144 | \f2Javadoc FAQ\fP @ |
| 145 | .fi |
| 146 | http://java.sun.com/j2se/javadoc/faq/index.html for answers to common questions, information about Javadoc\-related tools, and workarounds for bugs. |
| 147 | .TP 2 |
| 148 | o |
| 149 | .na |
| 150 | \f2How to Write Doc Comments for Javadoc\fP @ |
| 151 | .fi |
| 152 | http://www.oracle.com/technetwork/java/javase/documentation/index\-137868.html for more information about Sun conventions for writing documentation comments. |
| 153 | .TP 2 |
| 154 | o |
| 155 | .na |
| 156 | \f2Requirements for Writing API Specifications\fP @ |
| 157 | .fi |
| 158 | http://java.sun.com/j2se/javadoc/writingapispecs/index.html \- Standard requirements used when writing the Java SE Platform Specification. It can be useful whether you are writing API specifications in source file documentation comments or in other formats. It covers requirements for packages, classes, interfaces, fields and methods to satisfy testable assertions. |
| 159 | .TP 2 |
| 160 | o |
| 161 | .na |
| 162 | \f2Documentation Comment Specification\fP @ |
| 163 | .fi |
| 164 | http://java.sun.com/docs/books/jls/first_edition/html/18.doc.html \- The original specification on documentation comments, Chapter 18, Documentation Comments, in the \f2Java Language Specification\fP, First Edition, by James Gosling, Bill Joy, and Guy Steele. (This chapter was removed from the second edition.) |
| 165 | .TP 2 |
| 166 | o |
| 167 | .na |
| 168 | \f2DocCheck Doclet\fP @ |
| 169 | .fi |
| 170 | http://www.oracle.com/technetwork/java/javase/documentation/index\-141437.html \- Checks doc comments in source files and generates a report listing the errors and irregularities it finds. It is part of the Doc Check Utilities. |
| 171 | .TP 2 |
| 172 | o |
| 173 | .na |
| 174 | \f2MIF Doclet\fP @ |
| 175 | .fi |
| 176 | http://java.sun.com/j2se/javadoc/mifdoclet/ \- Can automate the generation of API documentation in MIF, FrameMaker and PDF formats. MIF is Adobe FrameMaker's interchange format. |
| 177 | .RE |
| 178 | .SS |
| 179 | Terminology |
| 180 | .LP |
| 181 | The terms \f2documentation comment\fP, \f2doc comment\fP, \f2main description\fP, \f2tag\fP, \f2block tag\fP, and \f2in\-line tag\fP are described at Documentation Comments. These other terms have specific meanings within the context of the Javadoc tool: |
| 182 | .RS 3 |
| 183 | .TP 3 |
| 184 | generated document |
| 185 | The document generated by the javadoc tool from the doc comments in Java source code. The default generated document is in HTML and is created by the standard doclet. |
| 186 | .LP |
| 187 | .TP 3 |
| 188 | name |
| 189 | A name of a program element written in the Java Language \-\- that is, the name of a package, class, interface, field, constructor or method. A name can be fully\-qualified, such as \f2java.lang.String.equals(java.lang.Object)\fP, or partially\-qualified, such as \f2equals(Object)\fP. |
| 190 | .LP |
| 191 | .TP 3 |
| 192 | documented classes |
| 193 | The classes and interfaces for which detailed documentation is generated during a javadoc run. To be documented, the source files must be available, their source filenames or package names must be passed into the javadoc command, and they must not be filtered out by their access modifier (public, protected, package\-private or private). We also refer to these as the classes included in the javadoc output, or the \f2included classes\fP. |
| 194 | .LP |
| 195 | .TP 3 |
| 196 | included classes |
| 197 | Classes and interfaces whose details are documented during a run of the Javadoc tool. Same as \f2documented classes\fP. |
| 198 | .LP |
| 199 | .TP 3 |
| 200 | excluded classes |
| 201 | Classes and interfaces whose details are \f2not\fP documented during a run of the Javadoc tool. |
| 202 | .LP |
| 203 | .TP 3 |
| 204 | referenced classes |
| 205 | The classes and interfaces that are explicitly referred to in the definition (implementation) or doc comments of the documented classes and interfaces. Examples of references include return type, parameter type, cast type, extended class, implemented interface, imported classes, classes used in method bodies, @see, {@link}, {@linkplain}, and {@inheritDoc} tags. (Notice this definition has changed since |
| 206 | .na |
| 207 | \f21.3\fP @ |
| 208 | .fi |
| 209 | http://download.oracle.com/javase/1.3/docs/tooldocs/solaris/javadoc.html#referencedclasses.) When the Javadoc tool is run, it should load into memory all of the referenced classes in javadoc's bootclasspath and classpath. (The Javadoc tool prints a "Class not found" warning for referenced classes not found.) The Javadoc tool can derive enough information from the .class files to determine their existence and the fully\-qualified names of their members. |
| 210 | .LP |
| 211 | .TP 3 |
| 212 | external referenced classes |
| 213 | The referenced classes whose documentation is not being generated during a javadoc run. In other words, these classes are not passed into the Javadoc tool on the command line. Links in the generated documentation to those classes are said to be \f2external references\fP or \f2external links\fP. For example, if you run the Javadoc tool on only the \f2java.awt\fP package, then any class in \f2java.lang\fP, such as \f2Object\fP, is an external referenced class. External referenced classes can be linked to using the \f2\-link\fP and \f2\-linkoffline\fP options. An important property of an external referenced class is that its source comments are normally not available to the Javadoc run. In this case, these comments cannot be inherited. |
| 214 | .RE |
| 215 | .SH "SOURCE FILES" |
| 216 | .LP |
| 217 | The Javadoc tool will generate output originating from four different types of "source" files: Java language source files for classes (\f2.java\fP), package comment files, overview comment files, and miscellaneous unprocessed files. This section also covers test files and template files that can also be in the source tree, but which you want to be sure not to document. |
| 218 | .SS |
| 219 | Class Source Code Files |
| 220 | .LP |
| 221 | Each class or interface and its members can have their own documentation comments, contained in a \f2.java\fP file. For more details about these doc comments, see Documentation Comments. |
| 222 | .SS |
| 223 | Package Comment Files |
| 224 | .LP |
| 225 | 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. |
| 226 | .LP |
| 227 | To create a package comment file, you have a choice of two files to place your comments: |
| 228 | .RS 3 |
| 229 | .TP 2 |
| 230 | o |
| 231 | \f2package\-info.java\fP \- Can contain a package declaration, package annotations, package comments and Javadoc tags. This file is generally preferred over package.html. |
| 232 | .TP 2 |
| 233 | o |
| 234 | \f2package.html\fP \- Can contain only package comments and Javadoc tags, no package annotations. |
| 235 | .RE |
| 236 | .LP |
| 237 | A package may have a single \f2package.html\fP file or a single \f2package\-info.java\fP file but not both. Place either file in the package directory in the source tree along with your \f2.java\fP files. |
| 238 | .LP |
| 239 | \f4package\-info.java\fP \- This file can contain a package comment of the following structure \-\- the comment is placed before the package declaration: |
| 240 | .LP |
| 241 | File: \f2java/applet/package\-info.java\fP |
| 242 | .nf |
| 243 | \f3 |
| 244 | .fl |
| 245 | /** |
| 246 | .fl |
| 247 | * Provides the classes necessary to create an |
| 248 | .fl |
| 249 | * applet and the classes an applet uses |
| 250 | .fl |
| 251 | * to communicate with its applet context. |
| 252 | .fl |
| 253 | * <p> |
| 254 | .fl |
| 255 | * The applet framework involves two entities: |
| 256 | .fl |
| 257 | * the applet and the applet context. |
| 258 | .fl |
| 259 | * An applet is an embeddable window (see the |
| 260 | .fl |
| 261 | * {@link java.awt.Panel} class) with a few extra |
| 262 | .fl |
| 263 | * methods that the applet context can use to |
| 264 | .fl |
| 265 | * initialize, start, and stop the applet. |
| 266 | .fl |
| 267 | * |
| 268 | .fl |
| 269 | * @since 1.0 |
| 270 | .fl |
| 271 | * @see java.awt |
| 272 | .fl |
| 273 | */ |
| 274 | .fl |
| 275 | package java.lang.applet; |
| 276 | .fl |
| 277 | \fP |
| 278 | .fi |
| 279 | .LP |
| 280 | Note that while the comment separators \f2/**\fP and \f2/*\fP must be present, the leading asterisks on the intermediate lines can be omitted. |
| 281 | .LP |
| 282 | \f4package.html\fP \- This file can contain a package comment of the following structure \-\- the comment is placed in the \f2<body>\fP element: |
| 283 | .LP |
| 284 | File: \f2java/applet/package.html\fP |
| 285 | .nf |
| 286 | \f3 |
| 287 | .fl |
| 288 | <HTML> |
| 289 | .fl |
| 290 | <BODY> |
| 291 | .fl |
| 292 | Provides the classes necessary to create an applet and the |
| 293 | .fl |
| 294 | classes an applet uses to communicate with its applet context. |
| 295 | .fl |
| 296 | <p> |
| 297 | .fl |
| 298 | The applet framework involves two entities: the applet |
| 299 | .fl |
| 300 | and the applet context. An applet is an embeddable |
| 301 | .fl |
| 302 | window (see the {@link java.awt.Panel} class) with a |
| 303 | .fl |
| 304 | few extra methods that the applet context can use to |
| 305 | .fl |
| 306 | initialize, start, and stop the applet. |
| 307 | .fl |
| 308 | |
| 309 | .fl |
| 310 | @since 1.0 |
| 311 | .fl |
| 312 | @see java.awt |
| 313 | .fl |
| 314 | </BODY> |
| 315 | .fl |
| 316 | </HTML> |
| 317 | .fl |
| 318 | \fP |
| 319 | .fi |
| 320 | .LP |
| 321 | Notice this is just a normal HTML file and does not include a package declaration. The content of the package comment file is written in HTML, like all other comments, with one exception: The documentation comment should not include the comment separators \f2/**\fP and \f2*/\fP or leading asterisks. When writing the comment, you should make the first sentence a summary about the package, and not put a title or any other text between \f2<body>\fP and the first sentence. You can include package tags; as with any documentation comment, all block tags must appear after the main description. If you add a \f2@see\fP tag in a package comment file, it must have a fully\-qualified name. For more details, see the |
| 322 | .na |
| 323 | \f2example of \fP\f2package.html\fP @ |
| 324 | .fi |
| 325 | http://www.oracle.com/technetwork/java/javase/documentation/index\-137868.html#packagecomments. |
| 326 | .LP |
| 327 | \f3Processing of package comment file\fP \- When the Javadoc tool runs, it will automatically look for the package comment file; if found, the Javadoc tool does the following: |
| 328 | .RS 3 |
| 329 | .TP 2 |
| 330 | o |
| 331 | Copies the comment for processing. (For \f2package.html\fP, copies all content between \f2<body>\fP and \f2</body>\fP HTML tags. You can include a \f2<head>\fP section to put a \f2<title>\fP, source file copyright statement, or other information, but none of these will appear in the generated documentation.) |
| 332 | .TP 2 |
| 333 | o |
| 334 | Processes any package tags that are present. |
| 335 | .TP 2 |
| 336 | o |
| 337 | Inserts the processed text at the bottom of the package summary page it generates, as shown in |
| 338 | .na |
| 339 | \f2Package Summary\fP @ |
| 340 | .fi |
| 341 | http://download.oracle.com/javase/7/docs/api/java/applet/package\-summary.html. |
| 342 | .TP 2 |
| 343 | o |
| 344 | Copies the first sentence of the package comment to the top of the package summary page. It also adds the package name and this first sentence to the list of packages on the overview page, as shown in |
| 345 | .na |
| 346 | \f2Overview Summary\fP @ |
| 347 | .fi |
| 348 | http://download.oracle.com/javase/7/docs/api/overview\-summary.html. The end\-of\-sentence is determined by the same rules used for the end of the first sentence of class and member main descriptions. |
| 349 | .RE |
| 350 | .SS |
| 351 | Overview Comment File |
| 352 | .LP |
| 353 | Each application or set of packages that you are documenting can have its own overview documentation comment, kept in its own "source" file, that the Javadoc tool will merge into the overview page that it generates. You typically include in this comment any documentation that applies to the entire application or set of packages. |
| 354 | .LP |
| 355 | To create an overview comment file, you can name the file anything you want, typically \f4overview.html\fP and place it anywhere, typically at the top level of the source tree. For example, if the source files for the \f2java.applet\fP package are contained in \f2/home/user/src/java/applet\fP directory, you could create an overview comment file at \f2/home/user/src/overview.html\fP. |
| 356 | .LP |
| 357 | Notice you can have multiple overview comment files for the same set of source files, in case you want to run javadoc multiple times on different sets of packages. For example, you could run javadoc once with \-private for internal documentation and again without that option for public documentation. In this case, you could describe the documentation as public or internal in the first sentence of each overview comment file. |
| 358 | .LP |
| 359 | The content of the overview comment file is one big documentation comment, written in HTML, like the package comment file described previously. See that description for details. To re\-iterate, when writing the comment, you should make the first sentence a summary about the application or set of packages, and not put a title or any other text between \f2<body>\fP and the first sentence. You can include overview tags; as with any documentation comment, all tags except in\-line tags, such as \f2{@link}\fP, must appear after the main description. If you add a \f2@see\fP tag, it must have a fully\-qualified name. |
| 360 | .LP |
| 361 | When you run the Javadoc tool, you specify the overview comment file name with the \-overview option. The file is then processed similar to that of a package comment file. |
| 362 | .RS 3 |
| 363 | .TP 2 |
| 364 | o |
| 365 | Copies all content between \f2<body>\fP and \f2</body>\fP tags for processing. |
| 366 | .TP 2 |
| 367 | o |
| 368 | Processes any overview tags that are present. |
| 369 | .TP 2 |
| 370 | o |
| 371 | Inserts the processed text at the bottom of the overview page it generates, as shown in |
| 372 | .na |
| 373 | \f2Overview Summary\fP @ |
| 374 | .fi |
| 375 | http://download.oracle.com/javase/7/docs/api/overview\-summary.html. |
| 376 | .TP 2 |
| 377 | o |
| 378 | Copies the first sentence of the overview comment to the top of the overview summary page. |
| 379 | .RE |
| 380 | .SS |
| 381 | Miscellaneous Unprocessed Files |
| 382 | .LP |
| 383 | You can also include in your source any miscellaneous files that you want the Javadoc tool to copy to the destination directory. These typically includes graphic files, example Java source (.java) and class (.class) files, and self\-standing HTML files whose content would overwhelm the documentation comment of a normal Java source file. |
| 384 | .LP |
| 385 | To include unprocessed files, put them in a directory called \f4doc\-files\fP which can be a subdirectory of any package directory that contains source files. You can have one such subdirectory for each package. You might include images, example code, source files, .class files, applets and HTML files. For example, if you want to include the image of a button \f2button.gif\fP in the \f2java.awt.Button\fP class documentation, you place that file in the \f2/home/user/src/java/awt/doc\-files/\fP directory. Notice the \f2doc\-files\fP directory should not be located at \f2/home/user/src/java/doc\-files\fP because \f2java\fP is not a package \-\- that is, it does not directly contain any source files. |
| 386 | .LP |
| 387 | All links to these unprocessed files must be hard\-coded, because the Javadoc tool does not look at the files \-\- it simply copies the directory and all its contents to the destination. For example, the link in the \f2Button.java\fP doc comment might look like: |
| 388 | .nf |
| 389 | \f3 |
| 390 | .fl |
| 391 | /** |
| 392 | .fl |
| 393 | * This button looks like this: |
| 394 | .fl |
| 395 | * <img src="doc\-files/Button.gif"> |
| 396 | .fl |
| 397 | */ |
| 398 | .fl |
| 399 | \fP |
| 400 | .fi |
| 401 | .SS |
| 402 | Test Files and Template Files |
| 403 | .LP |
| 404 | Some developers have indicated they want to store test files and templates files in the source tree near their corresponding source files. That is, they would like to put them in the same directory, or a subdirectory, of those source files. |
| 405 | .LP |
| 406 | If you run the Javadoc tool by explicitly passing in individual source filenames, you can deliberately omit test and templates files and prevent them from being processed. However, if you are passing in package names or wildcards, you need to follow certain rules to ensure these test files and templates files are not processed. |
| 407 | .LP |
| 408 | Test files differ from template files in that the former are legal, compilable source files, while the latter are not, but may end with ".java". |
| 409 | .LP |
| 410 | \f3Test files\fP \- Often developers want to put compilable, runnable test files for a given package in the \f2same\fP directory as the source files for that package. But they want the test files to belong to a package other than the source file package, such as the unnamed package (so the test files have no package statement or a different package statement from the source). In this scenario, when the source is being documented by specifying its package name specified on the command line, the test files will cause warnings or errors. You need to put such test files in a subdirectory. For example, if you want to add test files for source files in \f2com.package1\fP, put them in a subdirectory that would be an invalid package name (because it contains a hyphen): |
| 411 | .nf |
| 412 | \f3 |
| 413 | .fl |
| 414 | com/package1/test\-files/ |
| 415 | .fl |
| 416 | \fP |
| 417 | .fi |
| 418 | .LP |
| 419 | The test directory will be skipped by the Javadoc tool with no warnings. |
| 420 | .LP |
| 421 | If your test files contain doc comments, you can set up a separate run of the Javadoc tool to produce documentation of the test files by passing in their test source filenames with wildcards, such as \f2com/package1/test\-files/*.java\fP. |
| 422 | .LP |
| 423 | \f3Templates for source files\fP \- Template files have names that often end in ".java" and are not compilable. If you have a template for a source file that you want to keep in the source directory, you can name it with a dash (such as \f2Buffer\-Template.java\fP), or any other illegal Java character, to prevent it from being processed. This relies on the fact that the Javadoc tool will only process source files whose name, when stripped of the ".java" suffix, is actually a legal class name (see information about Identifiers in the Java Language Specification). |
| 424 | .SH "GENERATED FILES" |
| 425 | .LP |
| 426 | By default, javadoc uses a standard doclet that generates HTML\-formatted documentation. This doclet generates the following kinds of files (where each HTML "page" corresponds to a separate file). Note that javadoc generates files with two types of names: those named after classes/interfaces, and those that are not (such as \f2package\-summary.html\fP). Files in the latter group contain hyphens to prevent filename conflicts with those in the former group. |
| 427 | .LP |
| 428 | \f3Basic Content Pages\fP |
| 429 | .RS 3 |
| 430 | .TP 2 |
| 431 | o |
| 432 | One \f3class or interface page\fP (\f2classname\fP\f2.html\fP) for each class or interface it is documenting. |
| 433 | .TP 2 |
| 434 | o |
| 435 | One \f3package page\fP (\f2package\-summary.html\fP) for each package it is documenting. The Javadoc tool will include any HTML text provided in a file named \f2package.html\fP or \f2package\-info.java\fP in the package directory of the source tree. |
| 436 | .TP 2 |
| 437 | o |
| 438 | One \f3overview page\fP (\f2overview\-summary.html\fP) for the entire set of packages. This is the front page of the generated document. The Javadoc tool will include any HTML text provided in a file specified with the \f2\-overview\fP option. Note that this file is created only if you pass into javadoc two or more package names. For further explanation, see HTML Frames.) |
| 439 | .RE |
| 440 | .LP |
| 441 | \f3Cross\-Reference Pages\fP |
| 442 | .RS 3 |
| 443 | .TP 2 |
| 444 | o |
| 445 | One \f3class hierarchy page for the entire set of packages\fP (\f2overview\-tree.html\fP). To view this, click on "Overview" in the navigation bar, then click on "Tree". |
| 446 | .TP 2 |
| 447 | o |
| 448 | One \f3class hierarchy page for each package\fP (\f2package\-tree.html\fP) To view this, go to a particular package, class or interface page; click "Tree" to display the hierarchy for that package. |
| 449 | .TP 2 |
| 450 | o |
| 451 | One \f3"use" page\fP for each package (\f2package\-use.html\fP) and a separate one for each class and interface (\f2class\-use/\fP\f2classname\fP\f2.html\fP). This page describes what packages, classes, methods, constructors and fields use any part of the given class, interface or package. 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. You can access this page by first going to the package, class or interface, then clicking on the "Use" link in the navigation bar. |
| 452 | .TP 2 |
| 453 | o |
| 454 | A \f3deprecated API page\fP (\f2deprecated\-list.html\fP) listing all deprecated names. (A deprecated name is not recommended for use, generally due to improvements, and a replacement name is usually given. Deprecated APIs may be removed in future implementations.) |
| 455 | .TP 2 |
| 456 | o |
| 457 | A \f3constant field values page\fP (\f2constant\-values.html\fP) for the values of static fields. |
| 458 | .TP 2 |
| 459 | o |
| 460 | A \f3serialized form page\fP (\f2serialized\-form.html\fP) for information about serializable and externalizable classes. Each such class has a description of its serialization fields and methods. This information is of interest to re\-implementors, not to developers using the API. While there is no link in the navigation bar, you can get to this information by going to any serialized class and clicking "Serialized Form" in the "See also" section of the class comment. The standard doclet automatically generates a serialized form page: any class (public or non\-public) that implements Serializable is included, along with \f2readObject\fP and \f2writeObject\fP methods, the fields that are serialized, and the doc comments from the \f2@serial\fP, \f2@serialField\fP, and \f2@serialData\fP tags. Public serializable classes can be excluded by marking them (or their package) with \f2@serial exclude\fP, and package\-private serializable classes can be included by marking them (or their package) with \f2@serial include\fP. As of 1.4, you can generate the complete serialized form for public and private classes by running javadoc \f2without\fP specifying the \f2\-private\fP option. |
| 461 | .TP 2 |
| 462 | o |
| 463 | An \f3index\fP (\f2index\-*.html\fP) of all class, interface, constructor, field and method names, alphabetically arranged. This is internationalized for Unicode and can be generated as a single file or as a separate file for each starting character (such as A\-Z for English). |
| 464 | .RE |
| 465 | .LP |
| 466 | \f3Support Files\fP |
| 467 | .RS 3 |
| 468 | .TP 2 |
| 469 | o |
| 470 | A \f3help page\fP (\f2help\-doc.html\fP) that describes the navigation bar and the above pages. You can provide your own custom help file to override the default using \f2\-helpfile\fP. |
| 471 | .TP 2 |
| 472 | o |
| 473 | One \f3index.html file\fP which creates the HTML frames for display. This is the file you load to display the front page with frames. This file itself contains no text content. |
| 474 | .TP 2 |
| 475 | o |
| 476 | Several \f3frame files\fP (\f2*\-frame.html\fP) containing lists of packages, classes and interfaces, used when HTML frames are being displayed. |
| 477 | .TP 2 |
| 478 | o |
| 479 | A \f3package list\fP file (\f2package\-list\fP), used by the \f2\-link\fP and \f2\-linkoffline\fP options. This is a text file, not HTML, and is not reachable through any links. |
| 480 | .TP 2 |
| 481 | o |
| 482 | A \f3style sheet\fP file (\f2stylesheet.css\fP) that controls a limited amount of color, font family, font size, font style and positioning on the generated pages. |
| 483 | .TP 2 |
| 484 | o |
| 485 | A \f3doc\-files\fP directory that holds any image, example, source code or other files that you want copied to the destination directory. These files are not processed by the Javadoc tool in any manner \-\- that is, any javadoc tags in them will be ignored. This directory is not generated unless it exists in the source tree. |
| 486 | .RE |
| 487 | .LP |
| 488 | \f3HTML Frames\fP |
| 489 | .LP |
| 490 | The Javadoc tool will generate either two or three HTML frames, as shown in the figure below. It creates the minimum necessary number of frames by omitting the list of packages if there is only one package (or no packages). That is, when you pass a single package name or source files (*.java) belonging to a single package as arguments into the javadoc command, it will create only one frame (C) in the left\-hand column \-\- the list of classes. When you pass into javadoc two or more package names, it creates a third frame (P) listing all packages, as well as an overview page (Detail). This overview page has the filename \f2overview\-summary.html\fP. Thus, this file is created only if you pass in two or more package names. You can bypass frames by clicking on the "No Frames" link or entering at overview\-summary.html. |
| 491 | .LP |
| 492 | If you are unfamiliar with HTML frames, you should be aware that frames can have \f2focus\fP for printing and scrolling. To give a frame focus, click on it. Then on many browsers the arrow keys and page keys will scroll that frame, and the print menu command will print it. |
| 493 | .LP |
| 494 | Load one of the following two files as the starting page depending on whether you want HTML frames or not: |
| 495 | .RS 3 |
| 496 | .TP 2 |
| 497 | o |
| 498 | \f2index.html\fP (for frames) |
| 499 | .TP 2 |
| 500 | o |
| 501 | \f2overview\-summary.html\fP (for no frames) |
| 502 | .RE |
| 503 | .LP |
| 504 | \f3Generated File Structure\fP |
| 505 | .LP |
| 506 | 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. |
| 507 | .LP |
| 508 | For example, the document generated for the class \f2java.applet.Applet\fP class would be located at \f2java/applet/Applet.html\fP. The file structure for the java.applet package follows, given that the destination directory is named \f2apidocs\fP. All files that contain the word "frame" appear in the upper\-left or lower\-left frames, as noted. All other HTML files appear in the right\-hand frame. |
| 509 | .LP |
| 510 | NOTE \- Directories are shown in \f3bold\fP. The asterisks (\f2*\fP) indicate the files and directories that are \f2omitted\fP when the arguments to javadoc are source filenames (*.java) rather than package names. Also when arguments are source filenames, \f2package\-list\fP is created but is empty. The doc\-files directory will not be created in the destination unless it exists in the source tree. |
| 511 | .nf |
| 512 | \f3 |
| 513 | .fl |
| 514 | |
| 515 | .fl |
| 516 | \fP\f3apidocs\fP Top directory |
| 517 | .fl |
| 518 | index.html Initial page that sets up HTML frames |
| 519 | .fl |
| 520 | * overview\-summary.html Lists all packages with first sentence summaries |
| 521 | .fl |
| 522 | overview\-tree.html Lists class hierarchy for all packages |
| 523 | .fl |
| 524 | deprecated\-list.html Lists deprecated API for all packages |
| 525 | .fl |
| 526 | constant\-values.html Lists values of static fields for all packages |
| 527 | .fl |
| 528 | serialized\-form.html Lists serialized form for all packages |
| 529 | .fl |
| 530 | * overview\-frame.html Lists all packages, used in upper\-left frame |
| 531 | .fl |
| 532 | allclasses\-frame.html Lists all classes for all packages, used in lower\-left frame |
| 533 | .fl |
| 534 | help\-doc.html Lists user help for how these pages are organized |
| 535 | .fl |
| 536 | index\-all.html Default index created without \-splitindex option |
| 537 | .fl |
| 538 | \f3index\-files\fP Directory created with \-splitindex option |
| 539 | .fl |
| 540 | index\-<number>.html Index files created with \-splitindex option |
| 541 | .fl |
| 542 | package\-list Lists package names, used only for resolving external refs |
| 543 | .fl |
| 544 | stylesheet.css HTML style sheet for defining fonts, colors and positions |
| 545 | .fl |
| 546 | \f3java\fP Package directory |
| 547 | .fl |
| 548 | \f3applet\fP Subpackage directory |
| 549 | .fl |
| 550 | Applet.html Page for Applet class |
| 551 | .fl |
| 552 | AppletContext.html Page for AppletContext interface |
| 553 | .fl |
| 554 | AppletStub.html Page for AppletStub interface |
| 555 | .fl |
| 556 | AudioClip.html Page for AudioClip interface |
| 557 | .fl |
| 558 | * package\-summary.html Lists classes with first sentence summaries for this package |
| 559 | .fl |
| 560 | * package\-frame.html Lists classes in this package, used in lower left\-hand frame |
| 561 | .fl |
| 562 | * package\-tree.html Lists class hierarchy for this package |
| 563 | .fl |
| 564 | package\-use Lists where this package is used |
| 565 | .fl |
| 566 | \f3doc\-files\fP Directory holding image and example files |
| 567 | .fl |
| 568 | \f3class\-use\fP Directory holding pages API is used |
| 569 | .fl |
| 570 | Applet.html Page for uses of Applet class |
| 571 | .fl |
| 572 | AppletContext.html Page for uses of AppletContext interface |
| 573 | .fl |
| 574 | AppletStub.html Page for uses of AppletStub interface |
| 575 | .fl |
| 576 | AudioClip.html Page for uses of AudioClip interface |
| 577 | .fl |
| 578 | \f3src\-html\fP Source code directory |
| 579 | .fl |
| 580 | \f3java\fP Package directory |
| 581 | .fl |
| 582 | \f3applet\fP Subpackage directory |
| 583 | .fl |
| 584 | Applet.html Page for Applet source code |
| 585 | .fl |
| 586 | AppletContext.html Page for AppletContext source code |
| 587 | .fl |
| 588 | AppletStub.html Page for AppletStub source code |
| 589 | .fl |
| 590 | AudioClip.html Page for AudioClip source code |
| 591 | .fl |
| 592 | .fi |
| 593 | .SS |
| 594 | Generated API Declarations |
| 595 | .LP |
| 596 | The Javadoc tool generates a declaration at the start of each class, interface, field, constructor, and method description for that API item. For example, the declaration for the \f2Boolean\fP class is: |
| 597 | .LP |
| 598 | \f2public final class Boolean\fP |
| 599 | .br |
| 600 | \f2extends Object\fP |
| 601 | .br |
| 602 | \f2implements Serializable\fP |
| 603 | .LP |
| 604 | and the declaration for the \f2Boolean.valueOf\fPmethod is: |
| 605 | .LP |
| 606 | \f2public static Boolean valueOf(String s)\fP |
| 607 | .LP |
| 608 | The Javadoc tool can include the modifiers \f2public\fP, \f2protected\fP, \f2private\fP, \f2abstract\fP, \f2final\fP, \f2static\fP, \f2transient\fP, and \f2volatile\fP, but not \f2synchronized\fP or \f2native\fP. These last two modifiers are considered implementation detail and not part of the API specification. |
| 609 | .LP |
| 610 | Rather than relying on the keyword \f2synchronized\fP, APIs should document their concurrency semantics in the comment's main description, as in "a single \f2Enumeration\fP cannot be used by multiple threads concurrently". The document should not describe how to achieve these semantics. As another example, while \f2Hashtable\fP should be thread\-safe, there's no reason to specify that we achieve this by synchronizing all of its exported methods. We should reserve the right to synchronize internally at the bucket level, thus offering higher concurrency. |
| 611 | .SH "DOCUMENTATION COMMENTS" |
| 612 | .LP |
| 613 | The original "Documentation Comment Specification" can be found under related documentation. |
| 614 | .SS |
| 615 | Commenting the Source Code |
| 616 | .LP |
| 617 | You can include \f2documentation comments\fP ("doc comments") in the source code, ahead of declarations for any class, interface, method, constructor, or field. You can also create doc comments for each package and another one for the overview, though their syntax is slightly different. Doc comments are also known informally as "Javadoc comments" (but this term violates its trademark usage). A doc comment consists of the characters between the characters \f2/**\fP that begin the comment and the characters \f2*/\fP that end it. Leading asterisks are allowed on each line and are described further below. The text in a comment can continue onto multiple lines. |
| 618 | .nf |
| 619 | \f3 |
| 620 | .fl |
| 621 | /** |
| 622 | .fl |
| 623 | * This is the typical format of a simple documentation comment |
| 624 | .fl |
| 625 | * that spans two lines. |
| 626 | .fl |
| 627 | */ |
| 628 | .fl |
| 629 | \fP |
| 630 | .fi |
| 631 | .LP |
| 632 | To save space you can put a comment on one line: |
| 633 | .nf |
| 634 | \f3 |
| 635 | .fl |
| 636 | /** This comment takes up only one line. */ |
| 637 | .fl |
| 638 | \fP |
| 639 | .fi |
| 640 | .LP |
| 641 | \f3Placement of comments\fP \- Documentation comments are recognized only when placed immediately before class, interface, constructor, method, or field declarations \-\- see the class example, method example, and field example. Documentation comments placed in the body of a method are ignored. Only one documentation comment per declaration statement is recognized by the Javadoc tool. |
| 642 | .LP |
| 643 | A common mistake is to put an \f2import\fP statement between the class comment and the class declaration. Avoid this, as the Javadoc tool will ignore the class comment. |
| 644 | .nf |
| 645 | \f3 |
| 646 | .fl |
| 647 | /** |
| 648 | .fl |
| 649 | * This is the class comment for the class Whatever. |
| 650 | .fl |
| 651 | */ |
| 652 | .fl |
| 653 | |
| 654 | .fl |
| 655 | import com.sun; // MISTAKE \- Important not to put import statement here |
| 656 | .fl |
| 657 | |
| 658 | .fl |
| 659 | public class Whatever { |
| 660 | .fl |
| 661 | } |
| 662 | .fl |
| 663 | \fP |
| 664 | .fi |
| 665 | .LP |
| 666 | \f3A doc comment is composed of a \fP\f4main description\fP\f3 followed by a \fP\f4tag section\fP \- The \f2main description\fP begins after the starting delimiter \f2/**\fP and continues until the tag section. The \f2tag section\fP starts with the first block tag, which is defined by the first \f2@\fP character that begins a line (ignoring leading asterisks, white space, and leading separator \f2/**\fP). It is possible to have a comment with only a tag section and no main description. The main description cannot continue after the tag section begins. The argument to a tag can span multiple lines. There can be any number of tags \-\- some types of tags can be repeated while others cannot. For example, this \f2@see\fP starts the tag section: |
| 667 | .nf |
| 668 | \f3 |
| 669 | .fl |
| 670 | /** |
| 671 | .fl |
| 672 | * This sentence would hold the main description for this doc comment. |
| 673 | .fl |
| 674 | * @see java.lang.Object |
| 675 | .fl |
| 676 | */ |
| 677 | .fl |
| 678 | \fP |
| 679 | .fi |
| 680 | .LP |
| 681 | \f3Block tags and in\-line tags\fP \- A \f2tag\fP is a special keyword within a doc comment that the Javadoc tool can process. There are two kinds of tags: block tags, which appear as \f2@tag\fP (also known as "standalone tags"), and in\-line tags, which appear within curly braces, as \f2{@tag}\fP. To be interpreted, a block tag must appear at the beginning of a line, ignoring leading asterisks, white space, and separator (\f2/**\fP). This means you can use the \f2@\fP character elsewhere in the text and it will not be interpreted as the start of a tag. If you want to start a line with the \f2@\fP character and not have it be interpreted, use the HTML entity \f2@\fP. Each block tag has associated text, which includes any text following the tag up to, but not including, either the next tag, or the end of the doc comment. This associated text can span multiple lines. An in\-line tag is allowed and interpreted anywhere that text is allowed. The following example contains the block tag \f2@deprecated\fP and in\-line tag \f2{@link}\fP. |
| 682 | .nf |
| 683 | \f3 |
| 684 | .fl |
| 685 | /** |
| 686 | .fl |
| 687 | * @deprecated As of JDK 1.1, replaced by {@link #setBounds(int,int,int,int)} |
| 688 | .fl |
| 689 | */ |
| 690 | .fl |
| 691 | \fP |
| 692 | .fi |
| 693 | .LP |
| 694 | \f3Comments are written in HTML\fP \- The text must be written in HTML, in that they should use HTML entities and can use HTML tags. You can use whichever version of HTML your browser supports; we have written the standard doclet to generate HTML 3.2\-compliant code elsewhere (outside of the documentation comments) with the inclusion of cascading style sheets and frames. (We preface each generated file with "HTML 4.0" because of the frame sets.) |
| 695 | .LP |
| 696 | For example, entities for the less\-than (\f2<\fP) and greater\-than (\f2>\fP) symbols should be written \f2<\fP and \f2>\fP. Likewise, the ampersand (\f2&\fP) should be written \f2&\fP. The bold HTML tag \f2<b>\fP is shown in the following example. |
| 697 | .LP |
| 698 | Here is a doc comment: |
| 699 | .nf |
| 700 | \f3 |
| 701 | .fl |
| 702 | /** |
| 703 | .fl |
| 704 | * This is a <b>doc</b> comment. |
| 705 | .fl |
| 706 | * @see java.lang.Object |
| 707 | .fl |
| 708 | */ |
| 709 | .fl |
| 710 | \fP |
| 711 | .fi |
| 712 | .LP |
| 713 | \f3Leading asterisks\fP \- When javadoc parses a doc comment, leading asterisk (\f2*\fP) characters on each line are discarded; blanks and tabs preceding the initial asterisk (\f2*\fP) characters are also discarded. Starting with 1.4, if you omit the leading asterisk on a line, the leading white space is no longer removed. This enables you to paste code examples directly into a doc comment inside a \f2<PRE>\fP tag, and its indentation will be honored. Spaces are generally interpreted by browsers more uniformly than tabs. Indentation is relative to the left margin (rather than the separator \f2/**\fP or \f2<PRE>\fP tag). |
| 714 | .LP |
| 715 | \f3First sentence\fP \- The first sentence of each doc comment should be a summary sentence, containing 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 Javadoc tool copies this first sentence to the member summary at the top of the HTML page. |
| 716 | .LP |
| 717 | \f3Declaration with multiple fields\fP \- Java allows declaring multiple fields in a single statement, but this statement can have only one documentation comment, which is copied for all fields. Therefore if you want individual documentation comments for each field, you must declare each field in a separate statement. For example, the following documentation comment doesn't make sense written as a single declaration and would be better handled as two declarations: |
| 718 | .nf |
| 719 | \f3 |
| 720 | .fl |
| 721 | /** |
| 722 | .fl |
| 723 | * The horizontal and vertical distances of point (x,y) |
| 724 | .fl |
| 725 | */ |
| 726 | .fl |
| 727 | public int x, y; // Avoid this |
| 728 | .fl |
| 729 | \fP |
| 730 | .fi |
| 731 | .LP |
| 732 | The Javadoc tool generates the following documentation from the above code: |
| 733 | .nf |
| 734 | \f3 |
| 735 | .fl |
| 736 | public int \fP\f3x\fP |
| 737 | .fl |
| 738 | .fi |
| 739 | .RS 3 |
| 740 | The horizontal and vertical distances of point (x,y) |
| 741 | .RE |
| 742 | .nf |
| 743 | \f3 |
| 744 | .fl |
| 745 | public int \fP\f3y\fP |
| 746 | .fl |
| 747 | .fi |
| 748 | .RS 3 |
| 749 | The horizontal and vertical distances of point (x,y) |
| 750 | .RE |
| 751 | .LP |
| 752 | \f3Use header tags carefully\fP \- When writing documentation comments for members, it's best not to use HTML heading tags such as <H1> and <H2>, because the Javadoc tool creates an entire structured document and these structural tags might interfere with the formatting of the generated document. However, it is fine to use these headings in class and package comments to provide your own structure. |
| 753 | .SS |
| 754 | Automatic Copying of Method Comments |
| 755 | .LP |
| 756 | The Javadoc tool has the ability to copy or "inherit" method comments in classes and interfaces under the following two circumstances. Constructors, fields and nested classes do not inherit doc comments. |
| 757 | .RS 3 |
| 758 | .TP 2 |
| 759 | o |
| 760 | \f3Automatically inherit comment to fill in missing text\fP \- When a main description, or \f2@return\fP, \f2@param\fP or \f2@throws\fP tag is missing from a method comment, the Javadoc tool copies the corresponding main description or tag comment from the method it overrides or implements (if any), according to the algorithm below. |
| 761 | .LP |
| 762 | More specifically, when a \f2@param\fP tag for a particular parameter is missing, then the comment for that parameter is copied from the method further up the inheritance hierarchy. When a \f2@throws\fP tag for a particular exception is missing, the \f2@throws\fP tag is copied \f2only if that exception is declared\fP. |
| 763 | .LP |
| 764 | This behavior contrasts with version 1.3 and earlier, where the presence of any main description or tag would prevent all comments from being inherited. |
| 765 | .TP 2 |
| 766 | o |
| 767 | \f3Explicitly inherit comment with {@inheritDoc} tag\fP \- Insert the inline tag \f2{@inheritDoc}\fP in a method main description or \f2@return\fP, \f2@param\fP or \f2@throws\fP tag comment \-\- the corresponding inherited main description or tag comment is copied into that spot. |
| 768 | .RE |
| 769 | .LP |
| 770 | The source file for the inherited method need only be on the path specified by \-sourcepath for the doc comment to actually be available to copy. Neither the class nor its package needs to be passed in on the command line. This contrasts with 1.3.x and earlier releases, where the class had to be a documented class |
| 771 | .LP |
| 772 | \f3Inherit from classes and interfaces\fP \- Inheriting of comments occurs in all three possible cases of inheritance from classes and interfaces: |
| 773 | .RS 3 |
| 774 | .TP 2 |
| 775 | o |
| 776 | When a method in a class overrides a method in a superclass |
| 777 | .TP 2 |
| 778 | o |
| 779 | When a method in an interface overrides a method in a superinterface |
| 780 | .TP 2 |
| 781 | o |
| 782 | When a method in a class implements a method in an interface |
| 783 | .RE |
| 784 | .LP |
| 785 | In the first two cases, for method overrides, the Javadoc tool generates a subheading "Overrides" in the documentation for the overriding method, with a link to the method it is overriding, whether or not the comment is inherited. |
| 786 | .LP |
| 787 | In the third case, when a method in a given class implements a method in an interface, the Javadoc tool generates a subheading "Specified by" in the documentation for the overriding method, with a link to the method it is implementing. This happens whether or not the comment is inherited. |
| 788 | .LP |
| 789 | \f3Algorithm for Inheriting Method Comments\fP \- If a method does not have a doc comment, or has an {@inheritDoc} tag, the Javadoc tool searches for an applicable comment using the following algorithm, which is designed to find the most specific applicable doc comment, giving preference to interfaces over superclasses: |
| 790 | .RS 3 |
| 791 | .TP 3 |
| 792 | 1. |
| 793 | Look in each directly implemented (or extended) interface in the order they appear following the word implements (or extends) in the method declaration. Use the first doc comment found for this method. |
| 794 | .TP 3 |
| 795 | 2. |
| 796 | If step 1 failed to find a doc comment, recursively apply this entire algorithm to each directly implemented (or extended) interface, in the same order they were examined in step 1. |
| 797 | .TP 3 |
| 798 | 3. |
| 799 | If step 2 failed to find a doc comment and this is a class other than Object (not an interface): |
| 800 | .RS 3 |
| 801 | .TP 3 |
| 802 | a. |
| 803 | If the superclass has a doc comment for this method, use it. |
| 804 | .TP 3 |
| 805 | b. |
| 806 | If step 3a failed to find a doc comment, recursively apply this entire algorithm to the superclass. |
| 807 | .RE |
| 808 | .RE |
| 809 | .SH "JAVADOC TAGS" |
| 810 | .LP |
| 811 | The Javadoc tool parses special tags when they are embedded within a Java doc comment. These doc tags enable you to autogenerate a complete, well\-formatted API from your source code. The tags start with an "at" sign (\f2@\fP) 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 normal text. By convention, tags with the same name are grouped together. For example, put all \f2@see\fP tags together. |
| 812 | .LP |
| 813 | Tags come in two types: |
| 814 | .RS 3 |
| 815 | .TP 2 |
| 816 | o |
| 817 | \f3Block tags\fP \- Can be placed only in the tag section that follows the main description. Block tags are of the form: \f2@tag\fP. |
| 818 | .TP 2 |
| 819 | o |
| 820 | \f3Inline tags\fP \- Can be placed anywhere in the main description or in the comments for block tags. Inline tags are denoted by curly braces: \f2{@tag}\fP. |
| 821 | .RE |
| 822 | .LP |
| 823 | For information about tags we might introduce in future releases, see |
| 824 | .na |
| 825 | \f2Proposed Tags\fP @ |
| 826 | .fi |
| 827 | http://java.sun.com/j2se/javadoc/proposed\-tags.html. |
| 828 | .LP |
| 829 | The current tags are: |
| 830 | .LP |
| 831 | .if \n+(b.=1 .nr d. \n(.c-\n(c.-1 |
| 832 | .de 35 |
| 833 | .ps \n(.s |
| 834 | .vs \n(.vu |
| 835 | .in \n(.iu |
| 836 | .if \n(.u .fi |
| 837 | .if \n(.j .ad |
| 838 | .if \n(.j=0 .na |
| 839 | .. |
| 840 | .nf |
| 841 | .nr #~ 0 |
| 842 | .if n .nr #~ 0.6n |
| 843 | .ds #d .d |
| 844 | .if \(ts\n(.z\(ts\(ts .ds #d nl |
| 845 | .fc |
| 846 | .nr 33 \n(.s |
| 847 | .rm 80 81 |
| 848 | .nr 80 0 |
| 849 | .nr 38 \w\f3Tag\fP |
| 850 | .if \n(80<\n(38 .nr 80 \n(38 |
| 851 | .nr 38 \w\f2@author\fP |
| 852 | .if \n(80<\n(38 .nr 80 \n(38 |
| 853 | .nr 38 \w\f2{@code}\fP |
| 854 | .if \n(80<\n(38 .nr 80 \n(38 |
| 855 | .nr 38 \w\f2{@docRoot}\fP |
| 856 | .if \n(80<\n(38 .nr 80 \n(38 |
| 857 | .nr 38 \w\f2@deprecated\fP |
| 858 | .if \n(80<\n(38 .nr 80 \n(38 |
| 859 | .nr 38 \w\f2@exception\fP |
| 860 | .if \n(80<\n(38 .nr 80 \n(38 |
| 861 | .nr 38 \w\f2{@inheritDoc}\fP |
| 862 | .if \n(80<\n(38 .nr 80 \n(38 |
| 863 | .nr 38 \w\f2{@link}\fP |
| 864 | .if \n(80<\n(38 .nr 80 \n(38 |
| 865 | .nr 38 \w\f2{@linkplain}\fP |
| 866 | .if \n(80<\n(38 .nr 80 \n(38 |
| 867 | .nr 38 \w\f2{@literal}\fP |
| 868 | .if \n(80<\n(38 .nr 80 \n(38 |
| 869 | .nr 38 \w\f2@param\fP |
| 870 | .if \n(80<\n(38 .nr 80 \n(38 |
| 871 | .nr 38 \w\f2@return\fP |
| 872 | .if \n(80<\n(38 .nr 80 \n(38 |
| 873 | .nr 38 \w\f2@see\fP |
| 874 | .if \n(80<\n(38 .nr 80 \n(38 |
| 875 | .nr 38 \w\f2@serial\fP |
| 876 | .if \n(80<\n(38 .nr 80 \n(38 |
| 877 | .nr 38 \w\f2@serialData\fP |
| 878 | .if \n(80<\n(38 .nr 80 \n(38 |
| 879 | .nr 38 \w\f2@serialField\fP |
| 880 | .if \n(80<\n(38 .nr 80 \n(38 |
| 881 | .nr 38 \w\f2@since\fP |
| 882 | .if \n(80<\n(38 .nr 80 \n(38 |
| 883 | .nr 38 \w\f2@throws\fP |
| 884 | .if \n(80<\n(38 .nr 80 \n(38 |
| 885 | .nr 38 \w\f2{@value}\fP |
| 886 | .if \n(80<\n(38 .nr 80 \n(38 |
| 887 | .nr 38 \w\f2@version\fP |
| 888 | .if \n(80<\n(38 .nr 80 \n(38 |
| 889 | .80 |
| 890 | .rm 80 |
| 891 | .nr 81 0 |
| 892 | .nr 38 \w\f3Introduced in JDK/SDK\fP |
| 893 | .if \n(81<\n(38 .nr 81 \n(38 |
| 894 | .nr 38 \w1.0 |
| 895 | .if \n(81<\n(38 .nr 81 \n(38 |
| 896 | .nr 38 \w1.5 |
| 897 | .if \n(81<\n(38 .nr 81 \n(38 |
| 898 | .nr 38 \w1.3 |
| 899 | .if \n(81<\n(38 .nr 81 \n(38 |
| 900 | .nr 38 \w1.0 |
| 901 | .if \n(81<\n(38 .nr 81 \n(38 |
| 902 | .nr 38 \w1.0 |
| 903 | .if \n(81<\n(38 .nr 81 \n(38 |
| 904 | .nr 38 \w1.4 |
| 905 | .if \n(81<\n(38 .nr 81 \n(38 |
| 906 | .nr 38 \w1.2 |
| 907 | .if \n(81<\n(38 .nr 81 \n(38 |
| 908 | .nr 38 \w1.4 |
| 909 | .if \n(81<\n(38 .nr 81 \n(38 |
| 910 | .nr 38 \w1.5 |
| 911 | .if \n(81<\n(38 .nr 81 \n(38 |
| 912 | .nr 38 \w1.0 |
| 913 | .if \n(81<\n(38 .nr 81 \n(38 |
| 914 | .nr 38 \w1.0 |
| 915 | .if \n(81<\n(38 .nr 81 \n(38 |
| 916 | .nr 38 \w1.0 |
| 917 | .if \n(81<\n(38 .nr 81 \n(38 |
| 918 | .nr 38 \w1.2 |
| 919 | .if \n(81<\n(38 .nr 81 \n(38 |
| 920 | .nr 38 \w1.2 |
| 921 | .if \n(81<\n(38 .nr 81 \n(38 |
| 922 | .nr 38 \w1.2 |
| 923 | .if \n(81<\n(38 .nr 81 \n(38 |
| 924 | .nr 38 \w1.1 |
| 925 | .if \n(81<\n(38 .nr 81 \n(38 |
| 926 | .nr 38 \w1.2 |
| 927 | .if \n(81<\n(38 .nr 81 \n(38 |
| 928 | .nr 38 \w1.4 |
| 929 | .if \n(81<\n(38 .nr 81 \n(38 |
| 930 | .nr 38 \w1.0 |
| 931 | .if \n(81<\n(38 .nr 81 \n(38 |
| 932 | .81 |
| 933 | .rm 81 |
| 934 | .nr 38 1n |
| 935 | .nr 79 0 |
| 936 | .nr 40 \n(79+(0*\n(38) |
| 937 | .nr 80 +\n(40 |
| 938 | .nr 41 \n(80+(3*\n(38) |
| 939 | .nr 81 +\n(41 |
| 940 | .nr TW \n(81 |
| 941 | .if t .if \n(TW>\n(.li .tm Table at line 873 file Input is too wide - \n(TW units |
| 942 | .fc |
| 943 | .nr #T 0-1 |
| 944 | .nr #a 0-1 |
| 945 | .eo |
| 946 | .de T# |
| 947 | .ds #d .d |
| 948 | .if \(ts\n(.z\(ts\(ts .ds #d nl |
| 949 | .mk ## |
| 950 | .nr ## -1v |
| 951 | .ls 1 |
| 952 | .ls |
| 953 | .. |
| 954 | .ec |
| 955 | .ta \n(80u \n(81u |
| 956 | .nr 31 \n(.f |
| 957 | .nr 35 1m |
| 958 | \&\h'|\n(40u'\f3Tag\fP\h'|\n(41u'\f3Introduced in JDK/SDK\fP |
| 959 | .ta \n(80u \n(81u |
| 960 | .nr 31 \n(.f |
| 961 | .nr 35 1m |
| 962 | \&\h'|\n(40u'\f2@author\fP\h'|\n(41u'1.0 |
| 963 | .ta \n(80u \n(81u |
| 964 | .nr 31 \n(.f |
| 965 | .nr 35 1m |
| 966 | \&\h'|\n(40u'\f2{@code}\fP\h'|\n(41u'1.5 |
| 967 | .ta \n(80u \n(81u |
| 968 | .nr 31 \n(.f |
| 969 | .nr 35 1m |
| 970 | \&\h'|\n(40u'\f2{@docRoot}\fP\h'|\n(41u'1.3 |
| 971 | .ta \n(80u \n(81u |
| 972 | .nr 31 \n(.f |
| 973 | .nr 35 1m |
| 974 | \&\h'|\n(40u'\f2@deprecated\fP\h'|\n(41u'1.0 |
| 975 | .ta \n(80u \n(81u |
| 976 | .nr 31 \n(.f |
| 977 | .nr 35 1m |
| 978 | \&\h'|\n(40u'\f2@exception\fP\h'|\n(41u'1.0 |
| 979 | .ta \n(80u \n(81u |
| 980 | .nr 31 \n(.f |
| 981 | .nr 35 1m |
| 982 | \&\h'|\n(40u'\f2{@inheritDoc}\fP\h'|\n(41u'1.4 |
| 983 | .ta \n(80u \n(81u |
| 984 | .nr 31 \n(.f |
| 985 | .nr 35 1m |
| 986 | \&\h'|\n(40u'\f2{@link}\fP\h'|\n(41u'1.2 |
| 987 | .ta \n(80u \n(81u |
| 988 | .nr 31 \n(.f |
| 989 | .nr 35 1m |
| 990 | \&\h'|\n(40u'\f2{@linkplain}\fP\h'|\n(41u'1.4 |
| 991 | .ta \n(80u \n(81u |
| 992 | .nr 31 \n(.f |
| 993 | .nr 35 1m |
| 994 | \&\h'|\n(40u'\f2{@literal}\fP\h'|\n(41u'1.5 |
| 995 | .ta \n(80u \n(81u |
| 996 | .nr 31 \n(.f |
| 997 | .nr 35 1m |
| 998 | \&\h'|\n(40u'\f2@param\fP\h'|\n(41u'1.0 |
| 999 | .ta \n(80u \n(81u |
| 1000 | .nr 31 \n(.f |
| 1001 | .nr 35 1m |
| 1002 | \&\h'|\n(40u'\f2@return\fP\h'|\n(41u'1.0 |
| 1003 | .ta \n(80u \n(81u |
| 1004 | .nr 31 \n(.f |
| 1005 | .nr 35 1m |
| 1006 | \&\h'|\n(40u'\f2@see\fP\h'|\n(41u'1.0 |
| 1007 | .ta \n(80u \n(81u |
| 1008 | .nr 31 \n(.f |
| 1009 | .nr 35 1m |
| 1010 | \&\h'|\n(40u'\f2@serial\fP\h'|\n(41u'1.2 |
| 1011 | .ta \n(80u \n(81u |
| 1012 | .nr 31 \n(.f |
| 1013 | .nr 35 1m |
| 1014 | \&\h'|\n(40u'\f2@serialData\fP\h'|\n(41u'1.2 |
| 1015 | .ta \n(80u \n(81u |
| 1016 | .nr 31 \n(.f |
| 1017 | .nr 35 1m |
| 1018 | \&\h'|\n(40u'\f2@serialField\fP\h'|\n(41u'1.2 |
| 1019 | .ta \n(80u \n(81u |
| 1020 | .nr 31 \n(.f |
| 1021 | .nr 35 1m |
| 1022 | \&\h'|\n(40u'\f2@since\fP\h'|\n(41u'1.1 |
| 1023 | .ta \n(80u \n(81u |
| 1024 | .nr 31 \n(.f |
| 1025 | .nr 35 1m |
| 1026 | \&\h'|\n(40u'\f2@throws\fP\h'|\n(41u'1.2 |
| 1027 | .ta \n(80u \n(81u |
| 1028 | .nr 31 \n(.f |
| 1029 | .nr 35 1m |
| 1030 | \&\h'|\n(40u'\f2{@value}\fP\h'|\n(41u'1.4 |
| 1031 | .ta \n(80u \n(81u |
| 1032 | .nr 31 \n(.f |
| 1033 | .nr 35 1m |
| 1034 | \&\h'|\n(40u'\f2@version\fP\h'|\n(41u'1.0 |
| 1035 | .fc |
| 1036 | .nr T. 1 |
| 1037 | .T# 1 |
| 1038 | .35 |
| 1039 | .if \n-(b.=0 .nr c. \n(.c-\n(d.-42 |
| 1040 | .LP |
| 1041 | For custom tags, see the \-tag option. |
| 1042 | .RS 3 |
| 1043 | .TP 3 |
| 1044 | @author\ name\-text |
| 1045 | Adds an "Author" entry with the specified \f2name\-text\fP to the generated docs when the \-author option is used. A doc comment may contain multiple \f2@author\fP tags. You can specify one name per \f2@author\fP tag or multiple names per tag. In the former case, the Javadoc tool inserts a comma (\f2,\fP) and space between names. In the latter case, the entire text is simply 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 comma. |
| 1046 | .RE |
| 1047 | .LP |
| 1048 | For more details, see Where Tags Can Be Used and |
| 1049 | .na |
| 1050 | \f2writing @author tags\fP @ |
| 1051 | .fi |
| 1052 | http://www.oracle.com/technetwork/java/javase/documentation/index\-137868.html#@author. |
| 1053 | .LP |
| 1054 | .RS 3 |
| 1055 | .TP 3 |
| 1056 | @deprecated\ deprecated\-text Note: You can deprecate a program element using the @Deprecated annotation. |
| 1057 | .RE |
| 1058 | .LP |
| 1059 | Adds a comment indicating that this API should no longer be used (even though it may continue to work). The Javadoc tool moves the \f2deprecated\-text\fP ahead of the main description, placing it in italics and preceding it with a bold warning: "Deprecated". This tag is valid in all doc comments: overview, package, class, interface, constructor, method and field. |
| 1060 | .LP |
| 1061 | The first sentence of \f2deprecated\-text\fP should at least tell the user when the API was deprecated and what to use as a replacement. The Javadoc tool copies just the first sentence to the summary section and index. Subsequent sentences can also explain why it has been deprecated. You should include a \f2{@link}\fP tag (for Javadoc 1.2 or later) that points to the replacement API: |
| 1062 | .LP |
| 1063 | For more details, see |
| 1064 | .na |
| 1065 | \f2writing @deprecated tags\fP @ |
| 1066 | .fi |
| 1067 | http://www.oracle.com/technetwork/java/javase/documentation/index\-137868.html#@deprecated. |
| 1068 | .RS 3 |
| 1069 | .TP 2 |
| 1070 | o |
| 1071 | For Javadoc 1.2 and later, use a \f2{@link}\fP tag. This creates the link in\-line, where you want it. For example: |
| 1072 | .nf |
| 1073 | \f3 |
| 1074 | .fl |
| 1075 | /** |
| 1076 | .fl |
| 1077 | * @deprecated As of JDK 1.1, replaced by {@link #setBounds(int,int,int,int)} |
| 1078 | .fl |
| 1079 | */ |
| 1080 | .fl |
| 1081 | |
| 1082 | .fl |
| 1083 | \fP |
| 1084 | .fi |
| 1085 | .TP 2 |
| 1086 | o |
| 1087 | For Javadoc 1.1, the standard format is to create a \f2@see\fP tag (which cannot be in\-line) for each \f2@deprecated\fP tag. |
| 1088 | .RE |
| 1089 | .LP |
| 1090 | For more about deprecation, see |
| 1091 | .na |
| 1092 | \f2The @deprecated tag\fP @ |
| 1093 | .fi |
| 1094 | http://download.oracle.com/javase/7/docs/technotes/guides/javadoc/deprecation/index.html. |
| 1095 | .LP |
| 1096 | .RS 3 |
| 1097 | .TP 3 |
| 1098 | {@code\ text} |
| 1099 | Equivalent to \f2<code>{@literal}</code>\fP. |
| 1100 | .LP |
| 1101 | Displays \f2text\fP in \f2code\fP font without interpreting the text as HTML markup or nested javadoc tags. This enables you to use regular angle brackets (\f2<\fP and \f2>\fP) instead of the HTML entities (\f2<\fP and \f2>\fP) in doc comments, such as in parameter types (\f2<Object>\fP), inequalities (\f23 < 4\fP), or arrows (\f2<\-\fP). For example, the doc comment text: |
| 1102 | .nf |
| 1103 | \f3 |
| 1104 | .fl |
| 1105 | \fP\f4{@code A<B>C}\fP\f3 |
| 1106 | .fl |
| 1107 | |
| 1108 | .fl |
| 1109 | \fP |
| 1110 | .fi |
| 1111 | .LP |
| 1112 | displays in the generated HTML page unchanged, as: |
| 1113 | .nf |
| 1114 | \f3 |
| 1115 | .fl |
| 1116 | \fP\f4A<B>C\fP\f3 |
| 1117 | .fl |
| 1118 | |
| 1119 | .fl |
| 1120 | \fP |
| 1121 | .fi |
| 1122 | .LP |
| 1123 | The noteworthy point is that the \f2<B>\fP is not interpreted as bold and is in code font. |
| 1124 | .LP |
| 1125 | If you want the same functionality without the code font, use \f2{@literal}\fP. |
| 1126 | .LP |
| 1127 | .TP 3 |
| 1128 | {@docRoot} |
| 1129 | Represents the relative path to the generated document's (destination) root directory from any generated page. It is useful when you want to include a file, such as a copyright page or company logo, that you want to reference from all generated pages. Linking to the copyright page from the bottom of each page is common. |
| 1130 | .LP |
| 1131 | This \f2{@docRoot}\fP tag can be used both on the command line and in a doc comment: This tag is valid in all doc comments: overview, package, class, interface, constructor, method and field, including the text portion of any tag (such as @return, @param and @deprecated). |
| 1132 | .RS 3 |
| 1133 | .TP 3 |
| 1134 | 1. |
| 1135 | On the command line, where the header/footer/bottom are defined: |
| 1136 | .nf |
| 1137 | \f3 |
| 1138 | .fl |
| 1139 | javadoc \-bottom '<a href="{@docRoot}/copyright.html">Copyright</a>' |
| 1140 | .fl |
| 1141 | |
| 1142 | .fl |
| 1143 | \fP |
| 1144 | .fi |
| 1145 | .LP |
| 1146 | NOTE \- When using \f2{@docRoot}\fP this way in a make file, some makefile programs require special escaping for the brace {} characters. For example, the Inprise MAKE version 5.2 running on Windows requires double braces: \f2{{@docRoot}}\fP. It also requires double (rather than single) quotes to enclose arguments to options such as \f2\-bottom\fP (with the quotes around the \f2href\fP argument omitted). |
| 1147 | .TP 3 |
| 1148 | 2. |
| 1149 | In a doc comment: |
| 1150 | .nf |
| 1151 | \f3 |
| 1152 | .fl |
| 1153 | /** |
| 1154 | .fl |
| 1155 | * See the <a href="{@docRoot}/copyright.html">Copyright</a>. |
| 1156 | .fl |
| 1157 | */ |
| 1158 | .fl |
| 1159 | |
| 1160 | .fl |
| 1161 | \fP |
| 1162 | .fi |
| 1163 | .RE |
| 1164 | .LP |
| 1165 | The reason this tag is needed is because the generated docs are in hierarchical directories, as deep as the number of subpackages. This expression: |
| 1166 | .nf |
| 1167 | \f3 |
| 1168 | .fl |
| 1169 | <a href="{@docRoot}/copyright.html"> |
| 1170 | .fl |
| 1171 | |
| 1172 | .fl |
| 1173 | \fP |
| 1174 | .fi |
| 1175 | .LP |
| 1176 | would resolve to: |
| 1177 | .nf |
| 1178 | \f3 |
| 1179 | .fl |
| 1180 | <a href="../../copyright.html"> for java/lang/Object.java |
| 1181 | .fl |
| 1182 | |
| 1183 | .fl |
| 1184 | \fP |
| 1185 | .fi |
| 1186 | .LP |
| 1187 | and |
| 1188 | .nf |
| 1189 | \f3 |
| 1190 | .fl |
| 1191 | <a href="../../../copyright.html"> for java/lang/ref/Reference.java |
| 1192 | .fl |
| 1193 | |
| 1194 | .fl |
| 1195 | \fP |
| 1196 | .fi |
| 1197 | .LP |
| 1198 | .TP 3 |
| 1199 | @exception\ class\-name\ description |
| 1200 | The \f2@exception\fP tag is a synonym for \f2@throws\fP. |
| 1201 | .LP |
| 1202 | .TP 3 |
| 1203 | {@inheritDoc}\ |
| 1204 | Inherits (copies) documentation from the "nearest" inheritable class or implementable interface into the current doc comment at this tag's location. This allows you to write more general comments higher up the inheritance tree, and to write around the copied text. |
| 1205 | .LP |
| 1206 | This tag is valid only in these places in a doc comment: |
| 1207 | .RS 3 |
| 1208 | .TP 2 |
| 1209 | o |
| 1210 | In the main description block of a method. In this case, the main description is copied from a class or interface up the hierarchy. |
| 1211 | .TP 2 |
| 1212 | o |
| 1213 | In the text arguments of the @return, @param and @throws tags of a method. In this case, the tag text is copied from the corresponding tag up the hierarchy. |
| 1214 | .RE |
| 1215 | .LP |
| 1216 | See Automatic Copying of Method Comments for a more precise description of how comments are found in the inheritance hierarchy. Note that if this tag is missing, the comment is or is not automatically inherited according to rules described in that section. |
| 1217 | .LP |
| 1218 | .TP 3 |
| 1219 | {@link\ package.class#member\ label} |
| 1220 | Inserts an in\-line link with visible text \f2label\fP that points to the documentation for the specified package, class or member name of a referenced class. This tag is valid in all doc comments: overview, package, class, interface, constructor, method and field, including the text portion of any tag (such as @return, @param and @deprecated). |
| 1221 | .LP |
| 1222 | This tag is very simliar to \f2@see\fP \-\- both require the same references and accept exactly the same syntax for \f2package.class\fP\f2#\fP\f2member\fP and \f2label\fP. The main difference is that \f2{@link}\fP generates an in\-line link rather than placing the link in the "See Also" section. Also, the \f2{@link}\fP tag begins and ends with curly braces to separate it from the rest of the in\-line text. If you need to use "}" inside the label, use the HTML entity notation } |
| 1223 | .LP |
| 1224 | There is no limit to the number of \f2{@link}\fP tags allowed in a sentence. You can use this tag in the main description part of any documentation comment or in the text portion of any tag (such as @deprecated, @return or @param). |
| 1225 | .LP |
| 1226 | For example, here is a comment that refers to the \f2getComponentAt(int, int)\fP method: |
| 1227 | .nf |
| 1228 | \f3 |
| 1229 | .fl |
| 1230 | Use the {@link #getComponentAt(int, int) getComponentAt} method. |
| 1231 | .fl |
| 1232 | |
| 1233 | .fl |
| 1234 | \fP |
| 1235 | .fi |
| 1236 | .LP |
| 1237 | From this, the standard doclet would generate the following HTML (assuming it refers to another class in the same package): |
| 1238 | .nf |
| 1239 | \f3 |
| 1240 | .fl |
| 1241 | Use the <a href="Component.html#getComponentAt(int, int)">getComponentAt</a> method. |
| 1242 | .fl |
| 1243 | |
| 1244 | .fl |
| 1245 | \fP |
| 1246 | .fi |
| 1247 | .LP |
| 1248 | Which appears on the web page as: |
| 1249 | .nf |
| 1250 | \f3 |
| 1251 | .fl |
| 1252 | Use the getComponentAt method. |
| 1253 | .fl |
| 1254 | |
| 1255 | .fl |
| 1256 | \fP |
| 1257 | .fi |
| 1258 | .LP |
| 1259 | You can extend \f2{@link}\fP to link to classes not being documented by using the \f2\-link\fP option. |
| 1260 | .LP |
| 1261 | For more details, see |
| 1262 | .na |
| 1263 | \f2writing {@link} tags\fP @ |
| 1264 | .fi |
| 1265 | http://www.oracle.com/technetwork/java/javase/documentation/index\-137868.html#{@link}. |
| 1266 | .LP |
| 1267 | .TP 3 |
| 1268 | {@linkplain\ package.class#member\ label} |
| 1269 | Identical to \f2{@link}\fP, except the link's label is displayed in plain text than code font. Useful when the label is plain text. Example: |
| 1270 | .nf |
| 1271 | \f3 |
| 1272 | .fl |
| 1273 | Refer to {@linkplain add() the overridden method}. |
| 1274 | .fl |
| 1275 | |
| 1276 | .fl |
| 1277 | \fP |
| 1278 | .fi |
| 1279 | .LP |
| 1280 | This would display as: |
| 1281 | .LP |
| 1282 | Refer to the overridden method. |
| 1283 | .LP |
| 1284 | .TP 3 |
| 1285 | {@literal\ text} |
| 1286 | Displays \f2text\fP without interpreting the text as HTML markup or nested javadoc tags. This enables you to use regular angle brackets (\f2<\fP and \f2>\fP) instead of the HTML entities (\f2<\fP and \f2>\fP) in doc comments, such as in parameter types (\f2<Object>\fP), inequalities (\f23 < 4\fP), or arrows (\f2<\-\fP). For example, the doc comment text: |
| 1287 | .nf |
| 1288 | \f3 |
| 1289 | .fl |
| 1290 | \fP\f4{@literal A<B>C}\fP\f3 |
| 1291 | .fl |
| 1292 | |
| 1293 | .fl |
| 1294 | \fP |
| 1295 | .fi |
| 1296 | .LP |
| 1297 | displays unchanged in the generated HTML page in your browser, as: |
| 1298 | .LP |
| 1299 | \f2\ \ \ \ \ \fPA<B>C |
| 1300 | .LP |
| 1301 | The noteworthy point is that the \f2<B>\fP is not interpreted as bold (and it is not in code font). |
| 1302 | .LP |
| 1303 | If you want the same functionality but with the text in code font, use \f2{@code}\fP. |
| 1304 | .LP |
| 1305 | .TP 3 |
| 1306 | @param\ parameter\-name description |
| 1307 | Adds a parameter with the specified \f2parameter\-name\fP followed by the specified \f2description\fP to the "Parameters" section. When writing the doc comment, you may continue the \f2description\fP onto multiple lines. This tag is valid only in a doc comment for a method, constructor or class. |
| 1308 | .LP |
| 1309 | The \f2parameter\-name\fP can be the name of a parameter in a method or constructor, or the name of a type parameter of a class, method or constructor. Use angle brackets around this parameter name to specify the use of a type parameter. |
| 1310 | .LP |
| 1311 | Example of a type parameter of a class: |
| 1312 | .nf |
| 1313 | \f3 |
| 1314 | .fl |
| 1315 | /** |
| 1316 | .fl |
| 1317 | * @param <E> Type of element stored in a list |
| 1318 | .fl |
| 1319 | */ |
| 1320 | .fl |
| 1321 | public interface List<E> extends Collection<E> { |
| 1322 | .fl |
| 1323 | } |
| 1324 | .fl |
| 1325 | |
| 1326 | .fl |
| 1327 | \fP |
| 1328 | .fi |
| 1329 | .LP |
| 1330 | Example of a type parameter of a method: |
| 1331 | .nf |
| 1332 | \f3 |
| 1333 | .fl |
| 1334 | /** |
| 1335 | .fl |
| 1336 | * @param string the string to be converted |
| 1337 | .fl |
| 1338 | * @param type the type to convert the string to |
| 1339 | .fl |
| 1340 | * @param <T> the type of the element |
| 1341 | .fl |
| 1342 | * @param <V> the value of the element |
| 1343 | .fl |
| 1344 | */ |
| 1345 | .fl |
| 1346 | <T, V extends T> V convert(String string, Class<T> type) { |
| 1347 | .fl |
| 1348 | } |
| 1349 | .fl |
| 1350 | |
| 1351 | .fl |
| 1352 | \fP |
| 1353 | .fi |
| 1354 | .LP |
| 1355 | For more details, see |
| 1356 | .na |
| 1357 | \f2writing @param tags\fP @ |
| 1358 | .fi |
| 1359 | http://www.oracle.com/technetwork/java/javase/documentation/index\-137868.html#@param. |
| 1360 | .LP |
| 1361 | .TP 3 |
| 1362 | @return\ description |
| 1363 | Adds a "Returns" section with the \f2description\fP text. This text should describe the return type and permissible range of values. This tag is valid only in a doc comment for a method. |
| 1364 | .LP |
| 1365 | For more details, see |
| 1366 | .na |
| 1367 | \f2writing @return tags\fP @ |
| 1368 | .fi |
| 1369 | http://www.oracle.com/technetwork/java/javase/documentation/index\-137868.html#@return. |
| 1370 | .LP |
| 1371 | .TP 3 |
| 1372 | @see\ reference |
| 1373 | Adds a "See Also" heading with a link or text entry that points to \f2reference\fP. A doc comment may contain any number of \f2@see\fP tags, which are all grouped under the same heading. The \f2@see\fP tag has three variations; the third form below is the most common. This tag is valid in any doc comment: overview, package, class, interface, constructor, method or field. For inserting an in\-line link within a sentence to a package, class or member, see \f2{@link}\fP. |
| 1374 | .RS 3 |
| 1375 | .TP 3 |
| 1376 | @see "string" |
| 1377 | Adds a text entry for \f2string\fP. No link is generated. The \f2string\fP is a book or other reference to information not available by URL. The Javadoc tool distinguishes this from the previous cases by looking for a double\-quote (\f2"\fP) as the first character. For example: |
| 1378 | .nf |
| 1379 | \f3 |
| 1380 | .fl |
| 1381 | @see "The Java Programming Language" |
| 1382 | .fl |
| 1383 | |
| 1384 | .fl |
| 1385 | \fP |
| 1386 | .fi |
| 1387 | .LP |
| 1388 | This generates text such as: |
| 1389 | .RE |
| 1390 | .RE |
| 1391 | .RS 3 |
| 1392 | .RS 3 |
| 1393 | .RS 3 |
| 1394 | .RS 3 |
| 1395 | .TP 3 |
| 1396 | See Also: |
| 1397 | "The Java Programming Language" |
| 1398 | .RE |
| 1399 | .RE |
| 1400 | .TP 3 |
| 1401 | @see <a href="URL#value">label</a> |
| 1402 | Adds a link as defined by \f2URL\fP#\f2value\fP. The \f2URL\fP#\f2value\fP is a relative or absolute URL. The Javadoc tool distinguishes this from other cases by looking for a less\-than symbol (\f2<\fP) as the first character. For example: |
| 1403 | .nf |
| 1404 | \f3 |
| 1405 | .fl |
| 1406 | @see <a href="spec.html#section">Java Spec</a> |
| 1407 | .fl |
| 1408 | \fP |
| 1409 | .fi |
| 1410 | This generates a link such as: |
| 1411 | .RS 3 |
| 1412 | .TP 3 |
| 1413 | See Also: |
| 1414 | Java Spec |
| 1415 | .RE |
| 1416 | .TP 3 |
| 1417 | @see\ package.class#member\ label |
| 1418 | Adds a link, with visible text \f2label\fP, that points to the documentation for the specified name in the Java Language that is referenced. The \f2label\fP is optional; if omitted, the name appears instead as the visible text, suitably shortened \-\- see How a name is displayed. Use \-noqualifier to globally remove the package name from this visible text. Use the label when you want the visible text to be different from the auto\-generated visible text. |
| 1419 | .LP |
| 1420 | Only in version 1.2, just the name but not the label would automatically appear in <code> HTML tags, Starting with 1.2.2, the <code> is always included around the visible text, whether or not a label is used. |
| 1421 | .LP |
| 1422 | .RS 3 |
| 1423 | .TP 2 |
| 1424 | o |
| 1425 | \f4package.class\fP\f4#\fP\f4member\fP is any valid program element name that is referenced \-\- a package, class, interface, constructor, method or field name \-\- except that the character ahead of the member name should be a hash character (\f2#\fP). The \f2class\fP represents any top\-level or nested class or interface. The \f2member\fP represents any constructor, method or field (not a nested class or interface). If this name is in the documented classes, the Javadoc tool will automatically create a link to it. To create links to external referenced classes, use the \f2\-link\fP option. Use either of the other two \f2@see\fP forms for referring to documentation of a name that does not belong to a referenced class. This argument is described at greater length below under Specifying a Name. |
| 1426 | .TP 2 |
| 1427 | o |
| 1428 | \f4label\fP is optional text that is visible as the link's label. The \f2label\fP can contain whitespace. If \f2label\fP is omitted, then \f2package.class.member\fP will appear, suitably shortened relative to the current class and package \-\- see How a name is displayed. |
| 1429 | .TP 2 |
| 1430 | o |
| 1431 | A space is the delimiter between \f2package.class\fP\f2#\fP\f2member\fP and \f2label\fP. A space inside parentheses does not indicate the start of a label, so spaces may be used between parameters in a method. |
| 1432 | .RE |
| 1433 | .LP |
| 1434 | \f3Example\fP \- In this example, an \f2@see\fP tag (in the \f2Character\fP class) refers to the \f2equals\fP method in the \f2String\fP class. The tag includes both arguments: the name "\f2String#equals(Object)\fP" and the label "\f2equals\fP". |
| 1435 | .nf |
| 1436 | \f3 |
| 1437 | .fl |
| 1438 | /** |
| 1439 | .fl |
| 1440 | * @see String#equals(Object) equals |
| 1441 | .fl |
| 1442 | */ |
| 1443 | .fl |
| 1444 | \fP |
| 1445 | .fi |
| 1446 | The standard doclet produces HTML something like this: |
| 1447 | .nf |
| 1448 | \f3 |
| 1449 | .fl |
| 1450 | <dl> |
| 1451 | .fl |
| 1452 | <dt><b>See Also:</b> |
| 1453 | .fl |
| 1454 | <dd><a href="../../java/lang/String#equals(java.lang.Object)"><code>equals<code></a> |
| 1455 | .fl |
| 1456 | </dl> |
| 1457 | .fl |
| 1458 | \fP |
| 1459 | .fi |
| 1460 | Which looks something like this in a browser, where the label is the visible link text: |
| 1461 | .RS 3 |
| 1462 | .TP 3 |
| 1463 | See Also: |
| 1464 | equals |
| 1465 | .RE |
| 1466 | .LP |
| 1467 | \f3Specifying a name\fP \- This \f2package.class\fP\f2#\fP\f2member\fP name can be either fully\-qualified, such as \f2java.lang.String#toUpperCase()\fP or not, such as \f2String#toUpperCase()\fP or \f2#toUpperCase()\fP. If less than fully\-qualified, the Javadoc tool uses the normal Java compiler search order to find it, further described below in Search order for @see. The name can contain whitespace within parentheses, such as between method arguments. |
| 1468 | .LP |
| 1469 | Of course the advantage of providing shorter, "partially\-qualified" names is that they are shorter to type and there is less clutter in the source code. The following table shows the different forms of the name, where \f2Class\fP can be a class or interface, \f2Type\fP can be a class, interface, array, or primitive, and \f2method\fP can be a method or constructor. |
| 1470 | .LP |
| 1471 | .LP |
| 1472 | .if \n+(b.=1 .nr d. \n(.c-\n(c.-1 |
| 1473 | .de 35 |
| 1474 | .ps \n(.s |
| 1475 | .vs \n(.vu |
| 1476 | .in \n(.iu |
| 1477 | .if \n(.u .fi |
| 1478 | .if \n(.j .ad |
| 1479 | .if \n(.j=0 .na |
| 1480 | .. |
| 1481 | .nf |
| 1482 | .nr #~ 0 |
| 1483 | .if n .nr #~ 0.6n |
| 1484 | .ds #d .d |
| 1485 | .if \(ts\n(.z\(ts\(ts .ds #d nl |
| 1486 | .fc |
| 1487 | .nr 33 \n(.s |
| 1488 | .rm 80 |
| 1489 | .nr 34 \n(.lu |
| 1490 | .eo |
| 1491 | .am 80 |
| 1492 | .br |
| 1493 | .di a+ |
| 1494 | .35 |
| 1495 | .ft \n(.f |
| 1496 | .ll \n(34u*1u/2u |
| 1497 | .if \n(.l<\n(80 .ll \n(80u |
| 1498 | .in 0 |
| 1499 | \f3Typical\ forms\ for\ \fP\f4@see\fP\f3\ \fP\f4package.class#member\fP |
| 1500 | .br |
| 1501 | .di |
| 1502 | .nr a| \n(dn |
| 1503 | .nr a- \n(dl |
| 1504 | .. |
| 1505 | .ec \ |
| 1506 | .eo |
| 1507 | .am 80 |
| 1508 | .br |
| 1509 | .di b+ |
| 1510 | .35 |
| 1511 | .ft \n(.f |
| 1512 | .ll \n(34u*1u/2u |
| 1513 | .if \n(.l<\n(80 .ll \n(80u |
| 1514 | .in 0 |
| 1515 | \f3Referencing\ a\ member\ of\ the\ current\ class\fP |
| 1516 | .br |
| 1517 | \f2@see\fP\ \f2#\fP\f2field\fP |
| 1518 | .br |
| 1519 | \f2@see\fP\ \f2#\fP\f2method(Type,\ Type,...)\fP |
| 1520 | .br |
| 1521 | \f2@see\fP\ \f2#\fP\f2method(Type\ argname,\ Type\ argname,...)\fP |
| 1522 | .br |
| 1523 | \f2@see\fP\ \f2#\fP\f2constructor(Type,\ Type,...)\fP |
| 1524 | .br |
| 1525 | \f2@see\fP\ \f2#\fP\f2constructor(Type\ argname,\ Type\ argname,...)\fP |
| 1526 | .br |
| 1527 | .di |
| 1528 | .nr b| \n(dn |
| 1529 | .nr b- \n(dl |
| 1530 | .. |
| 1531 | .ec \ |
| 1532 | .eo |
| 1533 | .am 80 |
| 1534 | .br |
| 1535 | .di c+ |
| 1536 | .35 |
| 1537 | .ft \n(.f |
| 1538 | .ll \n(34u*1u/2u |
| 1539 | .if \n(.l<\n(80 .ll \n(80u |
| 1540 | .in 0 |
| 1541 | \f3Referencing\ another\ class\ in\ the\ current\ or\ imported\ packages\fP |
| 1542 | .br |
| 1543 | \f2@see\fP\ \f2Class\fP\f2#\fP\f2field\fP |
| 1544 | .br |
| 1545 | \f2@see\fP\ \f2Class\fP\f2#\fP\f2method(Type,\ Type,...)\fP |
| 1546 | .br |
| 1547 | \f2@see\fP\ \f2Class\fP\f2#\fP\f2method(Type\ argname,\ Type\ argname,...)\fP |
| 1548 | .br |
| 1549 | \f2@see\fP\ \f2Class\fP\f2#\fP\f2constructor(Type,\ Type,...)\fP |
| 1550 | .br |
| 1551 | \f2@see\fP\ \f2Class\fP\f2#\fP\f2constructor(Type\ argname,\ Type\ argname,...)\fP |
| 1552 | .br |
| 1553 | \f2@see\fP\ \f2Class.NestedClass\fP |
| 1554 | .br |
| 1555 | \f2@see\fP\ \f2Class\fP |
| 1556 | .br |
| 1557 | .di |
| 1558 | .nr c| \n(dn |
| 1559 | .nr c- \n(dl |
| 1560 | .. |
| 1561 | .ec \ |
| 1562 | .eo |
| 1563 | .am 80 |
| 1564 | .br |
| 1565 | .di d+ |
| 1566 | .35 |
| 1567 | .ft \n(.f |
| 1568 | .ll \n(34u*1u/2u |
| 1569 | .if \n(.l<\n(80 .ll \n(80u |
| 1570 | .in 0 |
| 1571 | \f3Referencing\ an\ element\ in\ another\ package\fP\ (fully qualified) |
| 1572 | .br |
| 1573 | \f2@see\fP\ \f2package.Class\fP\f2#\fP\f2field\fP |
| 1574 | .br |
| 1575 | \f2@see\fP\ \f2package.Class\fP\f2#\fP\f2method(Type,\ Type,...)\fP |
| 1576 | .br |
| 1577 | \f2@see\fP\ \f2package.Class\fP\f2#\fP\f2method(Type\ argname,\ Type\ argname,...)\fP |
| 1578 | .br |
| 1579 | \f2@see\fP\ \f2package.Class\fP\f2#\fP\f2constructor(Type,\ Type,...)\fP |
| 1580 | .br |
| 1581 | \f2@see\fP\ \f2package.Class\fP\f2#\fP\f2constructor(Type\ argname,\ Type\ argname,...)\fP |
| 1582 | .br |
| 1583 | \f2@see\fP\ \f2package.Class.NestedClass\fP |
| 1584 | .br |
| 1585 | \f2@see\fP\ \f2package.Class\fP |
| 1586 | .br |
| 1587 | \f2@see\fP\ \f2package\fP |
| 1588 | .br |
| 1589 | .di |
| 1590 | .nr d| \n(dn |
| 1591 | .nr d- \n(dl |
| 1592 | .. |
| 1593 | .ec \ |
| 1594 | .35 |
| 1595 | .nf |
| 1596 | .ll \n(34u |
| 1597 | .nr 80 0 |
| 1598 | .80 |
| 1599 | .rm 80 |
| 1600 | .nr 38 \n(a- |
| 1601 | .if \n(80<\n(38 .nr 80 \n(38 |
| 1602 | .nr 38 \n(b- |
| 1603 | .if \n(80<\n(38 .nr 80 \n(38 |
| 1604 | .nr 38 \n(c- |
| 1605 | .if \n(80<\n(38 .nr 80 \n(38 |
| 1606 | .nr 38 \n(d- |
| 1607 | .if \n(80<\n(38 .nr 80 \n(38 |
| 1608 | .35 |
| 1609 | .nf |
| 1610 | .ll \n(34u |
| 1611 | .nr 38 1n |
| 1612 | .nr 79 0 |
| 1613 | .nr 40 \n(79+(0*\n(38) |
| 1614 | .nr 80 +\n(40 |
| 1615 | .nr TW \n(80 |
| 1616 | .if t .if \n(TW>\n(.li .tm Table at line 1364 file Input is too wide - \n(TW units |
| 1617 | .fc |
| 1618 | .nr #T 0-1 |
| 1619 | .nr #a 0-1 |
| 1620 | .eo |
| 1621 | .de T# |
| 1622 | .ds #d .d |
| 1623 | .if \(ts\n(.z\(ts\(ts .ds #d nl |
| 1624 | .mk ## |
| 1625 | .nr ## -1v |
| 1626 | .ls 1 |
| 1627 | .ls |
| 1628 | .. |
| 1629 | .ec |
| 1630 | .ne \n(a|u+\n(.Vu |
| 1631 | .if (\n(a|+\n(#^-1v)>\n(#- .nr #- +(\n(a|+\n(#^-\n(#--1v) |
| 1632 | .ta \n(80u |
| 1633 | .nr 31 \n(.f |
| 1634 | .nr 35 1m |
| 1635 | \&\h'|\n(40u' |
| 1636 | .mk ## |
| 1637 | .nr 31 \n(## |
| 1638 | .sp |\n(##u-1v |
| 1639 | .nr 37 \n(40u |
| 1640 | .in +\n(37u |
| 1641 | .a+ |
| 1642 | .in -\n(37u |
| 1643 | .mk 32 |
| 1644 | .if \n(32>\n(31 .nr 31 \n(32 |
| 1645 | .sp |\n(31u |
| 1646 | .ne \n(b|u+\n(.Vu |
| 1647 | .if (\n(b|+\n(#^-1v)>\n(#- .nr #- +(\n(b|+\n(#^-\n(#--1v) |
| 1648 | .ta \n(80u |
| 1649 | .nr 31 \n(.f |
| 1650 | .nr 35 1m |
| 1651 | \&\h'|\n(40u' |
| 1652 | .mk ## |
| 1653 | .nr 31 \n(## |
| 1654 | .sp |\n(##u-1v |
| 1655 | .nr 37 \n(40u |
| 1656 | .in +\n(37u |
| 1657 | .b+ |
| 1658 | .in -\n(37u |
| 1659 | .mk 32 |
| 1660 | .if \n(32>\n(31 .nr 31 \n(32 |
| 1661 | .sp |\n(31u |
| 1662 | .ne \n(c|u+\n(.Vu |
| 1663 | .if (\n(c|+\n(#^-1v)>\n(#- .nr #- +(\n(c|+\n(#^-\n(#--1v) |
| 1664 | .ta \n(80u |
| 1665 | .nr 31 \n(.f |
| 1666 | .nr 35 1m |
| 1667 | \&\h'|\n(40u' |
| 1668 | .mk ## |
| 1669 | .nr 31 \n(## |
| 1670 | .sp |\n(##u-1v |
| 1671 | .nr 37 \n(40u |
| 1672 | .in +\n(37u |
| 1673 | .c+ |
| 1674 | .in -\n(37u |
| 1675 | .mk 32 |
| 1676 | .if \n(32>\n(31 .nr 31 \n(32 |
| 1677 | .sp |\n(31u |
| 1678 | .ne \n(d|u+\n(.Vu |
| 1679 | .if (\n(d|+\n(#^-1v)>\n(#- .nr #- +(\n(d|+\n(#^-\n(#--1v) |
| 1680 | .ta \n(80u |
| 1681 | .nr 31 \n(.f |
| 1682 | .nr 35 1m |
| 1683 | \&\h'|\n(40u' |
| 1684 | .mk ## |
| 1685 | .nr 31 \n(## |
| 1686 | .sp |\n(##u-1v |
| 1687 | .nr 37 \n(40u |
| 1688 | .in +\n(37u |
| 1689 | .d+ |
| 1690 | .in -\n(37u |
| 1691 | .mk 32 |
| 1692 | .if \n(32>\n(31 .nr 31 \n(32 |
| 1693 | .sp |\n(31u |
| 1694 | .fc |
| 1695 | .nr T. 1 |
| 1696 | .T# 1 |
| 1697 | .35 |
| 1698 | .rm a+ |
| 1699 | .rm b+ |
| 1700 | .rm c+ |
| 1701 | .rm d+ |
| 1702 | .if \n-(b.=0 .nr c. \n(.c-\n(d.-58 |
| 1703 | .LP |
| 1704 | The following notes apply to the above table: |
| 1705 | .RS 3 |
| 1706 | .TP 2 |
| 1707 | o |
| 1708 | The first set of forms (with no class or package) will cause the Javadoc tool to search only through the current class's hierarchy. It will find a member of the current class or interface, one of its superclasses or superinterfaces, or one of its enclosing classes or interfaces (search steps 1\-3). It will not search the rest of the current package or other packages (search steps 4\-5). |
| 1709 | .TP 2 |
| 1710 | o |
| 1711 | If any method or constructor is entered as a name with no parentheses, such as \f2getValue\fP, and if there is no field with the same name, the Javadoc tool will correctly create a link to it, but will print a warning message reminding you to add the parentheses and arguments. If this method is overloaded, the Javadoc tool will link to the first method its search encounters, which is unspecified. |
| 1712 | .TP 2 |
| 1713 | o |
| 1714 | Nested classes must be specified as \f2outer\fP\f2.\fP\f2inner\fP, not simply \f2inner\fP, for all forms. |
| 1715 | .TP 2 |
| 1716 | o |
| 1717 | As stated, the hash character (\f2#\fP), rather than a dot (\f2.\fP) separates a member from its class. This enables the Javadoc tool to resolve ambiguities, since the dot also separates classes, nested classes, packages, and subpackages. However, the Javadoc tool is generally lenient and will properly parse a dot if you know there is no ambiguity, though it will print a warning. |
| 1718 | .RE |
| 1719 | .LP |
| 1720 | \f3Search order for @see\fP \- the Javadoc tool will process a \f2@see\fP tag that appears in a source file (.java), package file (package.html or package\-info.java) or overview file (overview.html). In the latter two files, you must fully\-qualify the name you supply with \f2@see\fP. In a source file, you can specify a name that is fully\-qualified or partially\-qualified. |
| 1721 | .LP |
| 1722 | When the Javadoc tool encounters a \f2@see\fP tag in a \f2.java\fP file that is \f2not\fP fully qualified, it searches for the specified name in the same order as the Java compiler would (except the Javadoc tool will not detect certain namespace ambiguities, since it assumes the source code is free of these errors). This search order is formally defined in the \f2Java Language Specification\fP. The Javadoc tool searches for that name through all related and imported classes and packages. In particular, it searches in this order: |
| 1723 | .RS 3 |
| 1724 | .TP 3 |
| 1725 | 1. |
| 1726 | the current class or interface |
| 1727 | .TP 3 |
| 1728 | 2. |
| 1729 | any enclosing classes and interfaces, searching closest first |
| 1730 | .TP 3 |
| 1731 | 3. |
| 1732 | any superclasses and superinterfaces, searching closest first |
| 1733 | .TP 3 |
| 1734 | 4. |
| 1735 | the current package |
| 1736 | .TP 3 |
| 1737 | 5. |
| 1738 | any imported packages, classes and interfaces, searching in the order of the import statement |
| 1739 | .RE |
| 1740 | .LP |
| 1741 | The Javadoc tool continues to search recursively through steps 1\-3 for each class it encounters until it finds a match. That is, after it searches through the current class and its enclosing class E, it will search through E's superclasses before E's enclosing classes. In steps 4 and 5, the Javadoc tool does not search classes or interfaces within a package in any specified order (that order depends on the particular compiler). In step 5, the Javadoc tool looks in java.lang, since that is automatically imported by all programs. |
| 1742 | .LP |
| 1743 | The Javadoc tool does not necessarily look in subclasses, nor will it look in other packages even if their documentation is being generated in the same run. For example, if the \f2@see\fP tag is in the \f2java.awt.event.KeyEvent\fP class and refers to a name in the \f2java.awt\fP package, javadoc does not look in that package unless that class imports it. |
| 1744 | .LP |
| 1745 | \f3How a name is displayed\fP \- If \f2label\fP is omitted, then \f2package.class.member\fP appears. In general, it is suitably shortened relative to the current class and package. By "shortened", we mean the Javadoc tool displays only the minimum name necessary. For example, if the \f2String.toUpperCase()\fP method contains references to a member of the same class and to a member of a different class, the class name is displayed only in the latter case, as shown in the following table. |
| 1746 | .LP |
| 1747 | Use \-noqualifier to globally remove the package names. |
| 1748 | .br |
| 1749 | .LP |
| 1750 | .if \n+(b.=1 .nr d. \n(.c-\n(c.-1 |
| 1751 | .de 35 |
| 1752 | .ps \n(.s |
| 1753 | .vs \n(.vu |
| 1754 | .in \n(.iu |
| 1755 | .if \n(.u .fi |
| 1756 | .if \n(.j .ad |
| 1757 | .if \n(.j=0 .na |
| 1758 | .. |
| 1759 | .nf |
| 1760 | .nr #~ 0 |
| 1761 | .if n .nr #~ 0.6n |
| 1762 | .ds #d .d |
| 1763 | .if \(ts\n(.z\(ts\(ts .ds #d nl |
| 1764 | .fc |
| 1765 | .nr 33 \n(.s |
| 1766 | .rm 80 81 82 |
| 1767 | .nr 34 \n(.lu |
| 1768 | .eo |
| 1769 | .am 81 |
| 1770 | .br |
| 1771 | .di a+ |
| 1772 | .35 |
| 1773 | .ft \n(.f |
| 1774 | .ll \n(34u*1u/4u |
| 1775 | .if \n(.l<\n(81 .ll \n(81u |
| 1776 | .in 0 |
| 1777 | \f3Example in \fP\f4String.toUpperCase()\fP |
| 1778 | .br |
| 1779 | .di |
| 1780 | .nr a| \n(dn |
| 1781 | .nr a- \n(dl |
| 1782 | .. |
| 1783 | .ec \ |
| 1784 | .eo |
| 1785 | .am 80 |
| 1786 | .br |
| 1787 | .di b+ |
| 1788 | .35 |
| 1789 | .ft \n(.f |
| 1790 | .ll \n(34u*1u/4u |
| 1791 | .if \n(.l<\n(80 .ll \n(80u |
| 1792 | .in 0 |
| 1793 | \f2@see\fP tag refers to member of the same class, same package |
| 1794 | .br |
| 1795 | .di |
| 1796 | .nr b| \n(dn |
| 1797 | .nr b- \n(dl |
| 1798 | .. |
| 1799 | .ec \ |
| 1800 | .eo |
| 1801 | .am 82 |
| 1802 | .br |
| 1803 | .di c+ |
| 1804 | .35 |
| 1805 | .ft \n(.f |
| 1806 | .ll \n(34u*1u/4u |
| 1807 | .if \n(.l<\n(82 .ll \n(82u |
| 1808 | .in 0 |
| 1809 | \f2toLowerCase()\fP (omits the package and class names) |
| 1810 | .br |
| 1811 | .di |
| 1812 | .nr c| \n(dn |
| 1813 | .nr c- \n(dl |
| 1814 | .. |
| 1815 | .ec \ |
| 1816 | .eo |
| 1817 | .am 80 |
| 1818 | .br |
| 1819 | .di d+ |
| 1820 | .35 |
| 1821 | .ft \n(.f |
| 1822 | .ll \n(34u*1u/4u |
| 1823 | .if \n(.l<\n(80 .ll \n(80u |
| 1824 | .in 0 |
| 1825 | \f2@see\fP tag refers to member of a different class, same package |
| 1826 | .br |
| 1827 | .di |
| 1828 | .nr d| \n(dn |
| 1829 | .nr d- \n(dl |
| 1830 | .. |
| 1831 | .ec \ |
| 1832 | .eo |
| 1833 | .am 81 |
| 1834 | .br |
| 1835 | .di e+ |
| 1836 | .35 |
| 1837 | .ft \n(.f |
| 1838 | .ll \n(34u*1u/4u |
| 1839 | .if \n(.l<\n(81 .ll \n(81u |
| 1840 | .in 0 |
| 1841 | \f2@see Character#toLowerCase(char)\fP |
| 1842 | .br |
| 1843 | .di |
| 1844 | .nr e| \n(dn |
| 1845 | .nr e- \n(dl |
| 1846 | .. |
| 1847 | .ec \ |
| 1848 | .eo |
| 1849 | .am 82 |
| 1850 | .br |
| 1851 | .di f+ |
| 1852 | .35 |
| 1853 | .ft \n(.f |
| 1854 | .ll \n(34u*1u/4u |
| 1855 | .if \n(.l<\n(82 .ll \n(82u |
| 1856 | .in 0 |
| 1857 | \f2Character.toLowerCase(char)\fP (omits the package name, includes the class name) |
| 1858 | .br |
| 1859 | .di |
| 1860 | .nr f| \n(dn |
| 1861 | .nr f- \n(dl |
| 1862 | .. |
| 1863 | .ec \ |
| 1864 | .eo |
| 1865 | .am 80 |
| 1866 | .br |
| 1867 | .di g+ |
| 1868 | .35 |
| 1869 | .ft \n(.f |
| 1870 | .ll \n(34u*1u/4u |
| 1871 | .if \n(.l<\n(80 .ll \n(80u |
| 1872 | .in 0 |
| 1873 | \f2@see\fP tag refers to member of a different class, different package |
| 1874 | .br |
| 1875 | .di |
| 1876 | .nr g| \n(dn |
| 1877 | .nr g- \n(dl |
| 1878 | .. |
| 1879 | .ec \ |
| 1880 | .eo |
| 1881 | .am 81 |
| 1882 | .br |
| 1883 | .di h+ |
| 1884 | .35 |
| 1885 | .ft \n(.f |
| 1886 | .ll \n(34u*1u/4u |
| 1887 | .if \n(.l<\n(81 .ll \n(81u |
| 1888 | .in 0 |
| 1889 | \f2@see java.io.File#exists()\fP |
| 1890 | .br |
| 1891 | .di |
| 1892 | .nr h| \n(dn |
| 1893 | .nr h- \n(dl |
| 1894 | .. |
| 1895 | .ec \ |
| 1896 | .eo |
| 1897 | .am 82 |
| 1898 | .br |
| 1899 | .di i+ |
| 1900 | .35 |
| 1901 | .ft \n(.f |
| 1902 | .ll \n(34u*1u/4u |
| 1903 | .if \n(.l<\n(82 .ll \n(82u |
| 1904 | .in 0 |
| 1905 | \f2java.io.File.exists()\fP (includes the package and class names) |
| 1906 | .br |
| 1907 | .di |
| 1908 | .nr i| \n(dn |
| 1909 | .nr i- \n(dl |
| 1910 | .. |
| 1911 | .ec \ |
| 1912 | .35 |
| 1913 | .nf |
| 1914 | .ll \n(34u |
| 1915 | .nr 80 0 |
| 1916 | .nr 38 \w\f3Type of Reference\fP |
| 1917 | .if \n(80<\n(38 .nr 80 \n(38 |
| 1918 | .80 |
| 1919 | .rm 80 |
| 1920 | .nr 38 \n(b- |
| 1921 | .if \n(80<\n(38 .nr 80 \n(38 |
| 1922 | .nr 38 \n(d- |
| 1923 | .if \n(80<\n(38 .nr 80 \n(38 |
| 1924 | .nr 38 \n(g- |
| 1925 | .if \n(80<\n(38 .nr 80 \n(38 |
| 1926 | .nr 81 0 |
| 1927 | .nr 38 \w\f2@see String#toLowerCase()\fP |
| 1928 | .if \n(81<\n(38 .nr 81 \n(38 |
| 1929 | .81 |
| 1930 | .rm 81 |
| 1931 | .nr 38 \n(a- |
| 1932 | .if \n(81<\n(38 .nr 81 \n(38 |
| 1933 | .nr 38 \n(e- |
| 1934 | .if \n(81<\n(38 .nr 81 \n(38 |
| 1935 | .nr 38 \n(h- |
| 1936 | .if \n(81<\n(38 .nr 81 \n(38 |
| 1937 | .nr 82 0 |
| 1938 | .nr 38 \w\f3Displays As\fP |
| 1939 | .if \n(82<\n(38 .nr 82 \n(38 |
| 1940 | .82 |
| 1941 | .rm 82 |
| 1942 | .nr 38 \n(c- |
| 1943 | .if \n(82<\n(38 .nr 82 \n(38 |
| 1944 | .nr 38 \n(f- |
| 1945 | .if \n(82<\n(38 .nr 82 \n(38 |
| 1946 | .nr 38 \n(i- |
| 1947 | .if \n(82<\n(38 .nr 82 \n(38 |
| 1948 | .35 |
| 1949 | .nf |
| 1950 | .ll \n(34u |
| 1951 | .nr 38 1n |
| 1952 | .nr 79 0 |
| 1953 | .nr 40 \n(79+(0*\n(38) |
| 1954 | .nr 80 +\n(40 |
| 1955 | .nr 41 \n(80+(3*\n(38) |
| 1956 | .nr 81 +\n(41 |
| 1957 | .nr 42 \n(81+(3*\n(38) |
| 1958 | .nr 82 +\n(42 |
| 1959 | .nr TW \n(82 |
| 1960 | .if t .if \n(TW>\n(.li .tm Table at line 1440 file Input is too wide - \n(TW units |
| 1961 | .fc |
| 1962 | .nr #T 0-1 |
| 1963 | .nr #a 0-1 |
| 1964 | .eo |
| 1965 | .de T# |
| 1966 | .ds #d .d |
| 1967 | .if \(ts\n(.z\(ts\(ts .ds #d nl |
| 1968 | .mk ## |
| 1969 | .nr ## -1v |
| 1970 | .ls 1 |
| 1971 | .ls |
| 1972 | .. |
| 1973 | .ec |
| 1974 | .ne \n(a|u+\n(.Vu |
| 1975 | .if (\n(a|+\n(#^-1v)>\n(#- .nr #- +(\n(a|+\n(#^-\n(#--1v) |
| 1976 | .ta \n(80u \n(81u \n(82u |
| 1977 | .nr 31 \n(.f |
| 1978 | .nr 35 1m |
| 1979 | \&\h'|\n(40u'\f3Type of Reference\fP\h'|\n(41u'\h'|\n(42u'\f3Displays As\fP |
| 1980 | .mk ## |
| 1981 | .nr 31 \n(## |
| 1982 | .sp |\n(##u-1v |
| 1983 | .nr 37 \n(41u |
| 1984 | .in +\n(37u |
| 1985 | .a+ |
| 1986 | .in -\n(37u |
| 1987 | .mk 32 |
| 1988 | .if \n(32>\n(31 .nr 31 \n(32 |
| 1989 | .sp |\n(31u |
| 1990 | .ne \n(b|u+\n(.Vu |
| 1991 | .ne \n(c|u+\n(.Vu |
| 1992 | .if (\n(b|+\n(#^-1v)>\n(#- .nr #- +(\n(b|+\n(#^-\n(#--1v) |
| 1993 | .if (\n(c|+\n(#^-1v)>\n(#- .nr #- +(\n(c|+\n(#^-\n(#--1v) |
| 1994 | .ta \n(80u \n(81u \n(82u |
| 1995 | .nr 31 \n(.f |
| 1996 | .nr 35 1m |
| 1997 | \&\h'|\n(40u'\h'|\n(41u'\f2@see String#toLowerCase()\fP\h'|\n(42u' |
| 1998 | .mk ## |
| 1999 | .nr 31 \n(## |
| 2000 | .sp |\n(##u-1v |
| 2001 | .nr 37 \n(40u |
| 2002 | .in +\n(37u |
| 2003 | .b+ |
| 2004 | .in -\n(37u |
| 2005 | .mk 32 |
| 2006 | .if \n(32>\n(31 .nr 31 \n(32 |
| 2007 | .sp |\n(##u-1v |
| 2008 | .nr 37 \n(42u |
| 2009 | .in +\n(37u |
| 2010 | .c+ |
| 2011 | .in -\n(37u |
| 2012 | .mk 32 |
| 2013 | .if \n(32>\n(31 .nr 31 \n(32 |
| 2014 | .sp |\n(31u |
| 2015 | .ne \n(d|u+\n(.Vu |
| 2016 | .ne \n(e|u+\n(.Vu |
| 2017 | .ne \n(f|u+\n(.Vu |
| 2018 | .if (\n(d|+\n(#^-1v)>\n(#- .nr #- +(\n(d|+\n(#^-\n(#--1v) |
| 2019 | .if (\n(e|+\n(#^-1v)>\n(#- .nr #- +(\n(e|+\n(#^-\n(#--1v) |
| 2020 | .if (\n(f|+\n(#^-1v)>\n(#- .nr #- +(\n(f|+\n(#^-\n(#--1v) |
| 2021 | .ta \n(80u \n(81u \n(82u |
| 2022 | .nr 31 \n(.f |
| 2023 | .nr 35 1m |
| 2024 | \&\h'|\n(40u'\h'|\n(41u'\h'|\n(42u' |
| 2025 | .mk ## |
| 2026 | .nr 31 \n(## |
| 2027 | .sp |\n(##u-1v |
| 2028 | .nr 37 \n(40u |
| 2029 | .in +\n(37u |
| 2030 | .d+ |
| 2031 | .in -\n(37u |
| 2032 | .mk 32 |
| 2033 | .if \n(32>\n(31 .nr 31 \n(32 |
| 2034 | .sp |\n(##u-1v |
| 2035 | .nr 37 \n(41u |
| 2036 | .in +\n(37u |
| 2037 | .e+ |
| 2038 | .in -\n(37u |
| 2039 | .mk 32 |
| 2040 | .if \n(32>\n(31 .nr 31 \n(32 |
| 2041 | .sp |\n(##u-1v |
| 2042 | .nr 37 \n(42u |
| 2043 | .in +\n(37u |
| 2044 | .f+ |
| 2045 | .in -\n(37u |
| 2046 | .mk 32 |
| 2047 | .if \n(32>\n(31 .nr 31 \n(32 |
| 2048 | .sp |\n(31u |
| 2049 | .ne \n(g|u+\n(.Vu |
| 2050 | .ne \n(h|u+\n(.Vu |
| 2051 | .ne \n(i|u+\n(.Vu |
| 2052 | .if (\n(g|+\n(#^-1v)>\n(#- .nr #- +(\n(g|+\n(#^-\n(#--1v) |
| 2053 | .if (\n(h|+\n(#^-1v)>\n(#- .nr #- +(\n(h|+\n(#^-\n(#--1v) |
| 2054 | .if (\n(i|+\n(#^-1v)>\n(#- .nr #- +(\n(i|+\n(#^-\n(#--1v) |
| 2055 | .ta \n(80u \n(81u \n(82u |
| 2056 | .nr 31 \n(.f |
| 2057 | .nr 35 1m |
| 2058 | \&\h'|\n(40u'\h'|\n(41u'\h'|\n(42u' |
| 2059 | .mk ## |
| 2060 | .nr 31 \n(## |
| 2061 | .sp |\n(##u-1v |
| 2062 | .nr 37 \n(40u |
| 2063 | .in +\n(37u |
| 2064 | .g+ |
| 2065 | .in -\n(37u |
| 2066 | .mk 32 |
| 2067 | .if \n(32>\n(31 .nr 31 \n(32 |
| 2068 | .sp |\n(##u-1v |
| 2069 | .nr 37 \n(41u |
| 2070 | .in +\n(37u |
| 2071 | .h+ |
| 2072 | .in -\n(37u |
| 2073 | .mk 32 |
| 2074 | .if \n(32>\n(31 .nr 31 \n(32 |
| 2075 | .sp |\n(##u-1v |
| 2076 | .nr 37 \n(42u |
| 2077 | .in +\n(37u |
| 2078 | .i+ |
| 2079 | .in -\n(37u |
| 2080 | .mk 32 |
| 2081 | .if \n(32>\n(31 .nr 31 \n(32 |
| 2082 | .sp |\n(31u |
| 2083 | .fc |
| 2084 | .nr T. 1 |
| 2085 | .T# 1 |
| 2086 | .35 |
| 2087 | .rm a+ |
| 2088 | .rm b+ |
| 2089 | .rm c+ |
| 2090 | .rm d+ |
| 2091 | .rm e+ |
| 2092 | .rm f+ |
| 2093 | .rm g+ |
| 2094 | .rm h+ |
| 2095 | .rm i+ |
| 2096 | .if \n-(b.=0 .nr c. \n(.c-\n(d.-28 |
| 2097 | .LP |
| 2098 | \f3Examples of @see\fP |
| 2099 | .br |
| 2100 | The comment to the right shows how the name would be displayed if the \f2@see\fP tag is in a class in another package, such as \f2java.applet.Applet\fP. |
| 2101 | .nf |
| 2102 | \f3 |
| 2103 | .fl |
| 2104 | See also: |
| 2105 | .fl |
| 2106 | @see java.lang.String // String \fP\f3 |
| 2107 | .fl |
| 2108 | @see java.lang.String The String class // The String class \fP\f3 |
| 2109 | .fl |
| 2110 | @see String // String \fP\f3 |
| 2111 | .fl |
| 2112 | @see String#equals(Object) // String.equals(Object) \fP\f3 |
| 2113 | .fl |
| 2114 | @see String#equals // String.equals(java.lang.Object) \fP\f3 |
| 2115 | .fl |
| 2116 | @see java.lang.Object#wait(long) // java.lang.Object.wait(long) \fP\f3 |
| 2117 | .fl |
| 2118 | @see Character#MAX_RADIX // Character.MAX_RADIX \fP\f3 |
| 2119 | .fl |
| 2120 | @see <a href="spec.html">Java Spec</a> // Java Spec \fP\f3 |
| 2121 | .fl |
| 2122 | @see "The Java Programming Language" // "The Java Programming Language" \fP\f3 |
| 2123 | .fl |
| 2124 | \fP |
| 2125 | .fi |
| 2126 | You can extend \f2@see\fP to link to classes not being documented by using the \f2\-link\fP option. |
| 2127 | .LP |
| 2128 | For more details, see |
| 2129 | .na |
| 2130 | \f2writing @see tags\fP @ |
| 2131 | .fi |
| 2132 | http://www.oracle.com/technetwork/java/javase/documentation/index\-137868.html#@see. |
| 2133 | .RE |
| 2134 | .RE |
| 2135 | .LP |
| 2136 | .RS 3 |
| 2137 | .TP 3 |
| 2138 | @serial\ field\-description | include | exclude |
| 2139 | Used in the doc comment for a default serializable field. |
| 2140 | .LP |
| 2141 | An optional \f2field\-description\fP should explain the meaning of the field and list the acceptable values. If needed, the description can span multiple lines. The standard doclet adds this information to the serialized form page. |
| 2142 | .LP |
| 2143 | If a serializable field was added to a class some time after the class was made serializable, a statement should be added to its main description to identify at which version it was added. |
| 2144 | .LP |
| 2145 | The \f2include\fP and \f2exclude\fP arguments identify whether a class or package should be included or excluded from the serialized form page. They work as follows: |
| 2146 | .RS 3 |
| 2147 | .TP 2 |
| 2148 | o |
| 2149 | A public or protected class that implements \f2Serializable\fP is \f2included\fP unless that class (or its package) is marked \f2@serial exclude\fP. |
| 2150 | .TP 2 |
| 2151 | o |
| 2152 | A private or package\-private class that implements \f2Serializable\fP is \f2excluded\fP unless that class (or its package) is marked \f2@serial include\fP. |
| 2153 | .RE |
| 2154 | .LP |
| 2155 | Examples: The \f2javax.swing\fP package is marked \f2@serial exclude\fP (in \f2package.html\fP or \f2package\-info.java\fP). The public class \f2java.security.BasicPermission\fP is marked \f2@serial exclude\fP. The package\-private class \f2java.util.PropertyPermissionCollection\fP is marked \f2@serial include\fP. |
| 2156 | .LP |
| 2157 | The tag @serial at a class level overrides @serial at a package level. |
| 2158 | .LP |
| 2159 | For more information about how to use these tags, along with an example, see " |
| 2160 | .na |
| 2161 | \f2Documenting Serializable Fields and Data for a Class\fP @ |
| 2162 | .fi |
| 2163 | http://download.oracle.com/javase/7/docs/platform/serialization/spec/serial\-arch.html," Section 1.6 of the \f2Java Object Serialization Specification\fP. Also see the |
| 2164 | .na |
| 2165 | \f2Serialization FAQ\fP @ |
| 2166 | .fi |
| 2167 | http://java.sun.com/javase/technologies/core/basic/serializationFAQ.jsp#javadoc_warn_missing, which covers common questions, such as "Why do I see javadoc warnings stating that I am missing @serial tags for private fields if I am not running javadoc with the \-private switch?". Also see |
| 2168 | .na |
| 2169 | \f2Sun's criteria\fP @ |
| 2170 | .fi |
| 2171 | http://java.sun.com/j2se/javadoc/writingapispecs/serialized\-criteria.html for including classes in the serialized form specification. |
| 2172 | .LP |
| 2173 | .TP 3 |
| 2174 | @serialField\ field\-name\ field\-type\ field\-description |
| 2175 | Documents an \f2ObjectStreamField\fP component of a \f2Serializable\fP class's \f2serialPersistentFields\fP member. One \f2@serialField\fP tag should be used for each \f2ObjectStreamField\fP component. |
| 2176 | .LP |
| 2177 | .TP 3 |
| 2178 | @serialData\ data\-description |
| 2179 | The \f2data\-description\fP documents the types and order of data in the serialized form. Specifically, this data includes the optional data written by the \f2writeObject\fP method and all data (including base classes) written by the \f2Externalizable.writeExternal\fP method. |
| 2180 | .LP |
| 2181 | The \f2@serialData\fP tag can be used in the doc comment for the \f2writeObject\fP, \f2readObject\fP, \f2writeExternal\fP, \f2readExternal\fP, \f2writeReplace\fP, and \f2readResolve\fP methods. |
| 2182 | .LP |
| 2183 | .TP 3 |
| 2184 | @since\ since\-text |
| 2185 | Adds a "Since" heading with the specified \f2since\-text\fP to the generated documentation. The text has no special internal structure. This tag is valid in any doc comment: overview, package, class, interface, constructor, method or field. This tag means that this change or feature has existed since the software release specified by the \f2since\-text\fP. For example: |
| 2186 | .nf |
| 2187 | \f3 |
| 2188 | .fl |
| 2189 | @since 1.5 |
| 2190 | .fl |
| 2191 | |
| 2192 | .fl |
| 2193 | \fP |
| 2194 | .fi |
| 2195 | .LP |
| 2196 | For source code in the Java platform, this tag indicates the version of the Java platform API specification (not necessarily when it was added to the reference implementation). Multiple @since tags are allowed and are treated like multiple @author tags. You could use multiple tags if the prgram element is used by more than one API. |
| 2197 | .LP |
| 2198 | .TP 3 |
| 2199 | @throws\ class\-name\ description |
| 2200 | The \f2@throws\fP and \f2@exception\fP tags are synonyms. Adds a "Throws" subheading to the generated documentation, with the \f2class\-name\fP and \f2description\fP text. The \f2class\-name\fP is the name of the exception that may be thrown by the method. This tag is valid only in the doc comment for a method or constructor. If this class is not fully\-specified, the Javadoc tool uses the search order to look up this class. Multiple \f2@throws\fP tags can be used in a given doc comment for the same or different exceptions. |
| 2201 | .LP |
| 2202 | To ensure that all checked exceptions are documented, if a \f2@throws\fP tag does not exist for an exception in the throws clause, the Javadoc tool automatically adds that exception to the HTML output (with no description) as if it were documented with @throws tag. |
| 2203 | .LP |
| 2204 | The \f2@throws\fP documentation is copied from an overridden method to a subclass only when the exception is explicitly declared in the overridden method. The same is true for copying from an interface method to an implementing method. You can use {@inheritDoc} to force @throws to inherit documentation. |
| 2205 | .LP |
| 2206 | For more details, see |
| 2207 | .na |
| 2208 | \f2writing @throws tags\fP @ |
| 2209 | .fi |
| 2210 | http://www.oracle.com/technetwork/java/javase/documentation/index\-137868.html#@exception. |
| 2211 | .LP |
| 2212 | .TP 3 |
| 2213 | {@value\ package.class#field} |
| 2214 | When \f2{@value}\fP is used (without any argument) in the doc comment of a static field, it displays the value of that constant: |
| 2215 | .nf |
| 2216 | \f3 |
| 2217 | .fl |
| 2218 | /** |
| 2219 | .fl |
| 2220 | * The value of this constant is {@value}. |
| 2221 | .fl |
| 2222 | */ |
| 2223 | .fl |
| 2224 | public static final String SCRIPT_START = "<script>" |
| 2225 | .fl |
| 2226 | |
| 2227 | .fl |
| 2228 | \fP |
| 2229 | .fi |
| 2230 | .LP |
| 2231 | When used with argument \f2package.class#field\fP in any doc comment, it displays the value of the specified constant: |
| 2232 | .nf |
| 2233 | \f3 |
| 2234 | .fl |
| 2235 | /** |
| 2236 | .fl |
| 2237 | * Evaluates the script starting with {@value #SCRIPT_START}. |
| 2238 | .fl |
| 2239 | */ |
| 2240 | .fl |
| 2241 | public String evalScript(String script) { |
| 2242 | .fl |
| 2243 | } |
| 2244 | .fl |
| 2245 | |
| 2246 | .fl |
| 2247 | \fP |
| 2248 | .fi |
| 2249 | .LP |
| 2250 | The argument \f2package.class#field\fP takes a form identical to that of the @see argument, except that the member must be a static field. |
| 2251 | .LP |
| 2252 | These values of these constants are also displayed on the |
| 2253 | .na |
| 2254 | \f2Constant Field Values\fP @ |
| 2255 | .fi |
| 2256 | http://download.oracle.com/javase/7/docs/api/constant\-values.html page. |
| 2257 | .LP |
| 2258 | .TP 3 |
| 2259 | @version\ version\-text |
| 2260 | Adds a "Version" subheading with the specified \f2version\-text\fP to the generated docs when the \-version option is used. This tag is intended to hold the current version number of the software that this code is part of (as opposed to @since, which holds the version number where this code was introduced). The \f2version\-text\fP has no special internal structure. To see where the version tag can be used, see Where Tags Can Be Used. |
| 2261 | .LP |
| 2262 | A doc comment may contain multiple \f2@version\fP tags. If it makes sense, you can specify one version number per \f2@version\fP tag or multiple version numbers per tag. In the former case, the Javadoc tool inserts a comma (\f2,\fP) and space between names. In the latter case, the entire text is simply 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 comma. |
| 2263 | .LP |
| 2264 | For more details, see |
| 2265 | .na |
| 2266 | \f2writing @version tags\fP @ |
| 2267 | .fi |
| 2268 | http://www.oracle.com/technetwork/java/javase/documentation/index\-137868.html#@version. |
| 2269 | .RE |
| 2270 | .SS |
| 2271 | Where Tags Can Be Used |
| 2272 | .LP |
| 2273 | The following sections describe where the tags can be used. Note that these tags can be used in all doc comments: \f2@see\fP, \f2@since\fP, \f2@deprecated\fP, \f2{@link}\fP, \f2{@linkplain}\fP, and \f2{@docroot}\fP. |
| 2274 | .SS |
| 2275 | Overview Documentation Tags |
| 2276 | .LP |
| 2277 | Overview tags are tags that can appear in the documentation comment for the overview page (which resides in the source file typically named \f2overview.html\fP). Like in any other documentation comments, these tags must appear after the main description. |
| 2278 | .LP |
| 2279 | \f3NOTE\fP \- The \f2{@link}\fP tag has a bug in overview documents in version 1.2 \-\- the text appears properly but has no link. The \f2{@docRoot}\fP tag does not currently work in overview documents. |
| 2280 | .LP |
| 2281 | \f3Overview Tags\fP |
| 2282 | .RS 3 |
| 2283 | .TP 2 |
| 2284 | o |
| 2285 | \f2@see\fP |
| 2286 | .TP 2 |
| 2287 | o |
| 2288 | \f2@since\fP |
| 2289 | .TP 2 |
| 2290 | o |
| 2291 | \f2@author\fP |
| 2292 | .TP 2 |
| 2293 | o |
| 2294 | \f2@version\fP |
| 2295 | .TP 2 |
| 2296 | o |
| 2297 | \f2{@link}\fP |
| 2298 | .TP 2 |
| 2299 | o |
| 2300 | \f2{@linkplain}\fP |
| 2301 | .TP 2 |
| 2302 | o |
| 2303 | \f2{@docRoot}\fP |
| 2304 | .RE |
| 2305 | .SS |
| 2306 | Package Documentation Tags |
| 2307 | .LP |
| 2308 | Package tags are tags that can appear in the documentation comment for a package (which resides in the source file named \f2package.html\fP or \f2package\-info.java\fP). The \f2@serial\fP tag can only be used here with the \f2include\fP or \f2exclude\fP argument. |
| 2309 | .LP |
| 2310 | \f3Package Tags\fP |
| 2311 | .RS 3 |
| 2312 | .TP 2 |
| 2313 | o |
| 2314 | \f2@see\fP |
| 2315 | .TP 2 |
| 2316 | o |
| 2317 | \f2@since\fP |
| 2318 | .TP 2 |
| 2319 | o |
| 2320 | \f2@serial\fP |
| 2321 | .TP 2 |
| 2322 | o |
| 2323 | \f2@author\fP |
| 2324 | .TP 2 |
| 2325 | o |
| 2326 | \f2@version\fP |
| 2327 | .TP 2 |
| 2328 | o |
| 2329 | \f2{@link}\fP |
| 2330 | .TP 2 |
| 2331 | o |
| 2332 | \f2{@linkplain}\fP |
| 2333 | .TP 2 |
| 2334 | o |
| 2335 | \f2{@docRoot}\fP |
| 2336 | .RE |
| 2337 | .SS |
| 2338 | Class and Interface Documentation Tags |
| 2339 | .LP |
| 2340 | The following are tags that can appear in the documentation comment for a class or interface. The \f2@serial\fP tag can only be used here with the \f2include\fP or \f2exclude\fP argument. |
| 2341 | .LP |
| 2342 | \f3Class/Interface Tags\fP |
| 2343 | .RS 3 |
| 2344 | .TP 2 |
| 2345 | o |
| 2346 | \f2@see\fP |
| 2347 | .TP 2 |
| 2348 | o |
| 2349 | \f2@since\fP |
| 2350 | .TP 2 |
| 2351 | o |
| 2352 | \f2@deprecated\fP |
| 2353 | .TP 2 |
| 2354 | o |
| 2355 | \f2@serial\fP |
| 2356 | .TP 2 |
| 2357 | o |
| 2358 | \f2@author\fP |
| 2359 | .TP 2 |
| 2360 | o |
| 2361 | \f2@version\fP |
| 2362 | .TP 2 |
| 2363 | o |
| 2364 | \f2{@link}\fP |
| 2365 | .TP 2 |
| 2366 | o |
| 2367 | \f2{@linkplain}\fP |
| 2368 | .TP 2 |
| 2369 | o |
| 2370 | \f2{@docRoot}\fP |
| 2371 | .RE |
| 2372 | \f3An example of a class comment:\fP |
| 2373 | .nf |
| 2374 | \f3 |
| 2375 | .fl |
| 2376 | /** |
| 2377 | .fl |
| 2378 | * A class representing a window on the screen. |
| 2379 | .fl |
| 2380 | * For example: |
| 2381 | .fl |
| 2382 | * <pre> |
| 2383 | .fl |
| 2384 | * Window win = new Window(parent); |
| 2385 | .fl |
| 2386 | * win.show(); |
| 2387 | .fl |
| 2388 | * </pre> |
| 2389 | .fl |
| 2390 | * |
| 2391 | .fl |
| 2392 | * @author Sami Shaio |
| 2393 | .fl |
| 2394 | * @version 1.13, 06/08/06 |
| 2395 | .fl |
| 2396 | * @see java.awt.BaseWindow |
| 2397 | .fl |
| 2398 | * @see java.awt.Button |
| 2399 | .fl |
| 2400 | */ |
| 2401 | .fl |
| 2402 | class Window extends BaseWindow { |
| 2403 | .fl |
| 2404 | ... |
| 2405 | .fl |
| 2406 | } |
| 2407 | .fl |
| 2408 | \fP |
| 2409 | .fi |
| 2410 | .SS |
| 2411 | Field Documentation Tags |
| 2412 | .LP |
| 2413 | The following are the tags that can appear in |
| 2414 | .LP |
| 2415 | \f3Field Tags\fP |
| 2416 | .RS 3 |
| 2417 | .TP 2 |
| 2418 | o |
| 2419 | \f2@see\fP |
| 2420 | .TP 2 |
| 2421 | o |
| 2422 | \f2@since\fP |
| 2423 | .TP 2 |
| 2424 | o |
| 2425 | \f2@deprecated\fP |
| 2426 | .TP 2 |
| 2427 | o |
| 2428 | \f2@serial\fP |
| 2429 | .TP 2 |
| 2430 | o |
| 2431 | \f2@serialField\fP |
| 2432 | .TP 2 |
| 2433 | o |
| 2434 | \f2{@link}\fP |
| 2435 | .TP 2 |
| 2436 | o |
| 2437 | \f2{@linkplain}\fP |
| 2438 | .TP 2 |
| 2439 | o |
| 2440 | \f2{@docRoot}\fP |
| 2441 | .TP 2 |
| 2442 | o |
| 2443 | \f2{@value}\fP |
| 2444 | .RE |
| 2445 | \f3An example of a field comment:\fP |
| 2446 | .nf |
| 2447 | \f3 |
| 2448 | .fl |
| 2449 | /** |
| 2450 | .fl |
| 2451 | * The X\-coordinate of the component. |
| 2452 | .fl |
| 2453 | * |
| 2454 | .fl |
| 2455 | * @see #getLocation() |
| 2456 | .fl |
| 2457 | */ |
| 2458 | .fl |
| 2459 | int x = 1263732; |
| 2460 | .fl |
| 2461 | \fP |
| 2462 | .fi |
| 2463 | .SS |
| 2464 | Constructor and Method Documentation Tags |
| 2465 | .LP |
| 2466 | The following are the tags that can appear in the documentation comment for a constructor or method, except for \f2@return\fP, which cannot appear in a constructor, and \f2{@inheritDoc}\fP, which has certain restrictions. The \f2@serialData\fP tag can only be used in the doc comment for certain serialization methods. |
| 2467 | .LP |
| 2468 | \f3Method/Constructor Tags\fP |
| 2469 | .RS 3 |
| 2470 | .TP 2 |
| 2471 | o |
| 2472 | \f2@see\fP |
| 2473 | .TP 2 |
| 2474 | o |
| 2475 | \f2@since\fP |
| 2476 | .TP 2 |
| 2477 | o |
| 2478 | \f2@deprecated\fP |
| 2479 | .TP 2 |
| 2480 | o |
| 2481 | \f2@param\fP |
| 2482 | .TP 2 |
| 2483 | o |
| 2484 | \f2@return\fP |
| 2485 | .TP 2 |
| 2486 | o |
| 2487 | \f2@throws\fP and \f2@exception\fP |
| 2488 | .TP 2 |
| 2489 | o |
| 2490 | \f2@serialData\fP |
| 2491 | .TP 2 |
| 2492 | o |
| 2493 | \f2{@link}\fP |
| 2494 | .TP 2 |
| 2495 | o |
| 2496 | \f2{@linkplain}\fP |
| 2497 | .TP 2 |
| 2498 | o |
| 2499 | \f2{@inheritDoc}\fP |
| 2500 | .TP 2 |
| 2501 | o |
| 2502 | \f2{@docRoot}\fP |
| 2503 | .RE |
| 2504 | \f3An example of a method doc comment:\fP |
| 2505 | .nf |
| 2506 | \f3 |
| 2507 | .fl |
| 2508 | /** |
| 2509 | .fl |
| 2510 | * Returns the character at the specified index. An index |
| 2511 | .fl |
| 2512 | * ranges from <code>0</code> to <code>length() \- 1</code>. |
| 2513 | .fl |
| 2514 | * |
| 2515 | .fl |
| 2516 | * @param index the index of the desired character. |
| 2517 | .fl |
| 2518 | * @return the desired character. |
| 2519 | .fl |
| 2520 | * @exception StringIndexOutOfRangeException |
| 2521 | .fl |
| 2522 | * if the index is not in the range <code>0</code> |
| 2523 | .fl |
| 2524 | * to <code>length()\-1</code>. |
| 2525 | .fl |
| 2526 | * @see java.lang.Character#charValue() |
| 2527 | .fl |
| 2528 | */ |
| 2529 | .fl |
| 2530 | public char charAt(int index) { |
| 2531 | .fl |
| 2532 | ... |
| 2533 | .fl |
| 2534 | } |
| 2535 | .fl |
| 2536 | \fP |
| 2537 | .fi |
| 2538 | .SH "OPTIONS" |
| 2539 | .LP |
| 2540 | The javadoc tool uses doclets to determine its output. The Javadoc tool uses the default standard doclet unless a custom doclet is specified with the \-doclet option. The Javadoc tool provides a set of command\-line options that can be used with any doclet \-\- these options are described below under the sub\-heading Javadoc Options. The standard doclet provides an additional set of command\-line options that are described below under the sub\-heading Options Provided by the Standard Doclet. All option names are case\-insensitive, though their arguments can be case\-sensitive. |
| 2541 | .LP |
| 2542 | The options are: |
| 2543 | .LP |
| 2544 | .if \n+(b.=1 .nr d. \n(.c-\n(c.-1 |
| 2545 | .de 35 |
| 2546 | .ps \n(.s |
| 2547 | .vs \n(.vu |
| 2548 | .in \n(.iu |
| 2549 | .if \n(.u .fi |
| 2550 | .if \n(.j .ad |
| 2551 | .if \n(.j=0 .na |
| 2552 | .. |
| 2553 | .nf |
| 2554 | .nr #~ 0 |
| 2555 | .if n .nr #~ 0.6n |
| 2556 | .ds #d .d |
| 2557 | .if \(ts\n(.z\(ts\(ts .ds #d nl |
| 2558 | .fc |
| 2559 | .nr 33 \n(.s |
| 2560 | .rm 80 81 82 |
| 2561 | .nr 34 \n(.lu |
| 2562 | .eo |
| 2563 | .am 80 |
| 2564 | .br |
| 2565 | .di a+ |
| 2566 | .35 |
| 2567 | .ft \n(.f |
| 2568 | .ll \n(34u*1u/4u |
| 2569 | .if \n(.l<\n(80 .ll \n(80u |
| 2570 | .in 0 |
| 2571 | \-\f21.1\fP |
| 2572 | .br |
| 2573 | \-author |
| 2574 | .br |
| 2575 | \-\f2bootclasspath\fP |
| 2576 | .br |
| 2577 | \-bottom |
| 2578 | .br |
| 2579 | \-\f2breakiterator\fP |
| 2580 | .br |
| 2581 | \-charset |
| 2582 | .br |
| 2583 | \-\f2classpath\fP |
| 2584 | .br |
| 2585 | \-d |
| 2586 | .br |
| 2587 | \-docencoding |
| 2588 | .br |
| 2589 | \-docfilessubdirs |
| 2590 | .br |
| 2591 | \-\f2doclet\fP |
| 2592 | .br |
| 2593 | \-\f2docletpath\fP |
| 2594 | .br |
| 2595 | \-doctitle |
| 2596 | .br |
| 2597 | \-\f2encoding\fP |
| 2598 | .br |
| 2599 | \-\f2exclude\fP |
| 2600 | .br |
| 2601 | \-excludedocfilessubdir |
| 2602 | .br |
| 2603 | \-\f2extdirs\fP |
| 2604 | .br |
| 2605 | \-footer |
| 2606 | .br |
| 2607 | \-group |
| 2608 | .br |
| 2609 | .br |
| 2610 | .di |
| 2611 | .nr a| \n(dn |
| 2612 | .nr a- \n(dl |
| 2613 | .. |
| 2614 | .ec \ |
| 2615 | .eo |
| 2616 | .am 81 |
| 2617 | .br |
| 2618 | .di b+ |
| 2619 | .35 |
| 2620 | .ft \n(.f |
| 2621 | .ll \n(34u*1u/4u |
| 2622 | .if \n(.l<\n(81 .ll \n(81u |
| 2623 | .in 0 |
| 2624 | \-header |
| 2625 | .br |
| 2626 | \-\f2help\fP |
| 2627 | .br |
| 2628 | \-helpfile |
| 2629 | .br |
| 2630 | \-\f2J\fP |
| 2631 | .br |
| 2632 | \-keywords |
| 2633 | .br |
| 2634 | \-link |
| 2635 | .br |
| 2636 | \-linkoffline |
| 2637 | .br |
| 2638 | \-linksource |
| 2639 | .br |
| 2640 | \-\f2locale\fP |
| 2641 | .br |
| 2642 | \-nocomment |
| 2643 | .br |
| 2644 | \-nodeprecated |
| 2645 | .br |
| 2646 | \-nodeprecatedlist |
| 2647 | .br |
| 2648 | \-nohelp |
| 2649 | .br |
| 2650 | \-noindex |
| 2651 | .br |
| 2652 | \-nonavbar |
| 2653 | .br |
| 2654 | \-noqualifier |
| 2655 | .br |
| 2656 | \-nosince |
| 2657 | .br |
| 2658 | \-notimestamp |
| 2659 | .br |
| 2660 | \-notree |
| 2661 | .br |
| 2662 | \-\f2overview\fP |
| 2663 | .br |
| 2664 | \-\f2package\fP |
| 2665 | .br |
| 2666 | .br |
| 2667 | .di |
| 2668 | .nr b| \n(dn |
| 2669 | .nr b- \n(dl |
| 2670 | .. |
| 2671 | .ec \ |
| 2672 | .eo |
| 2673 | .am 82 |
| 2674 | .br |
| 2675 | .di c+ |
| 2676 | .35 |
| 2677 | .ft \n(.f |
| 2678 | .ll \n(34u*1u/4u |
| 2679 | .if \n(.l<\n(82 .ll \n(82u |
| 2680 | .in 0 |
| 2681 | \-\f2private\fP |
| 2682 | .br |
| 2683 | \-\f2protected\fP |
| 2684 | .br |
| 2685 | \-\f2public\fP |
| 2686 | .br |
| 2687 | \-\f2quiet\fP |
| 2688 | .br |
| 2689 | \-serialwarn |
| 2690 | .br |
| 2691 | \-\f2source\fP |
| 2692 | .br |
| 2693 | \-\f2sourcepath\fP |
| 2694 | .br |
| 2695 | \-sourcetab |
| 2696 | .br |
| 2697 | \-splitindex |
| 2698 | .br |
| 2699 | \-stylesheetfile |
| 2700 | .br |
| 2701 | \-\f2subpackages\fP |
| 2702 | .br |
| 2703 | \-tag |
| 2704 | .br |
| 2705 | \-taglet |
| 2706 | .br |
| 2707 | \-tagletpath |
| 2708 | .br |
| 2709 | \-top |
| 2710 | .br |
| 2711 | \-title |
| 2712 | .br |
| 2713 | \-use |
| 2714 | .br |
| 2715 | \-\f2verbose\fP |
| 2716 | .br |
| 2717 | \-version |
| 2718 | .br |
| 2719 | \-windowtitle |
| 2720 | .br |
| 2721 | .br |
| 2722 | .di |
| 2723 | .nr c| \n(dn |
| 2724 | .nr c- \n(dl |
| 2725 | .. |
| 2726 | .ec \ |
| 2727 | .35 |
| 2728 | .nf |
| 2729 | .ll \n(34u |
| 2730 | .nr 80 0 |
| 2731 | .80 |
| 2732 | .rm 80 |
| 2733 | .nr 38 \n(a- |
| 2734 | .if \n(80<\n(38 .nr 80 \n(38 |
| 2735 | .nr 81 0 |
| 2736 | .81 |
| 2737 | .rm 81 |
| 2738 | .nr 38 \n(b- |
| 2739 | .if \n(81<\n(38 .nr 81 \n(38 |
| 2740 | .nr 82 0 |
| 2741 | .82 |
| 2742 | .rm 82 |
| 2743 | .nr 38 \n(c- |
| 2744 | .if \n(82<\n(38 .nr 82 \n(38 |
| 2745 | .35 |
| 2746 | .nf |
| 2747 | .ll \n(34u |
| 2748 | .nr 38 1n |
| 2749 | .nr 79 0 |
| 2750 | .nr 40 \n(79+(0*\n(38) |
| 2751 | .nr 80 +\n(40 |
| 2752 | .nr 41 \n(80+(3*\n(38) |
| 2753 | .nr 81 +\n(41 |
| 2754 | .nr 42 \n(81+(3*\n(38) |
| 2755 | .nr 82 +\n(42 |
| 2756 | .nr TW \n(82 |
| 2757 | .if t .if \n(TW>\n(.li .tm Table at line 2015 file Input is too wide - \n(TW units |
| 2758 | .fc |
| 2759 | .nr #T 0-1 |
| 2760 | .nr #a 0-1 |
| 2761 | .eo |
| 2762 | .de T# |
| 2763 | .ds #d .d |
| 2764 | .if \(ts\n(.z\(ts\(ts .ds #d nl |
| 2765 | .mk ## |
| 2766 | .nr ## -1v |
| 2767 | .ls 1 |
| 2768 | .ls |
| 2769 | .. |
| 2770 | .ec |
| 2771 | .ne \n(a|u+\n(.Vu |
| 2772 | .ne \n(b|u+\n(.Vu |
| 2773 | .ne \n(c|u+\n(.Vu |
| 2774 | .if (\n(a|+\n(#^-1v)>\n(#- .nr #- +(\n(a|+\n(#^-\n(#--1v) |
| 2775 | .if (\n(b|+\n(#^-1v)>\n(#- .nr #- +(\n(b|+\n(#^-\n(#--1v) |
| 2776 | .if (\n(c|+\n(#^-1v)>\n(#- .nr #- +(\n(c|+\n(#^-\n(#--1v) |
| 2777 | .ta \n(80u \n(81u \n(82u |
| 2778 | .nr 31 \n(.f |
| 2779 | .nr 35 1m |
| 2780 | \&\h'|\n(40u'\h'|\n(41u'\h'|\n(42u' |
| 2781 | .mk ## |
| 2782 | .nr 31 \n(## |
| 2783 | .sp |\n(##u-1v |
| 2784 | .nr 37 \n(40u |
| 2785 | .in +\n(37u |
| 2786 | .a+ |
| 2787 | .in -\n(37u |
| 2788 | .mk 32 |
| 2789 | .if \n(32>\n(31 .nr 31 \n(32 |
| 2790 | .sp |\n(##u-1v |
| 2791 | .nr 37 \n(41u |
| 2792 | .in +\n(37u |
| 2793 | .b+ |
| 2794 | .in -\n(37u |
| 2795 | .mk 32 |
| 2796 | .if \n(32>\n(31 .nr 31 \n(32 |
| 2797 | .sp |\n(##u-1v |
| 2798 | .nr 37 \n(42u |
| 2799 | .in +\n(37u |
| 2800 | .c+ |
| 2801 | .in -\n(37u |
| 2802 | .mk 32 |
| 2803 | .if \n(32>\n(31 .nr 31 \n(32 |
| 2804 | .sp |\n(31u |
| 2805 | .fc |
| 2806 | .nr T. 1 |
| 2807 | .T# 1 |
| 2808 | .35 |
| 2809 | .rm a+ |
| 2810 | .rm b+ |
| 2811 | .rm c+ |
| 2812 | .if \n-(b.=0 .nr c. \n(.c-\n(d.-127 |
| 2813 | .LP |
| 2814 | Options shown in \f2italic\fP are the Javadoc core options, which are provided by the front end of the Javadoc tool and are available to all doclets. The standard doclet itself provides the non\-italic options. |
| 2815 | .SS |
| 2816 | Javadoc Options |
| 2817 | .RS 3 |
| 2818 | .TP 3 |
| 2819 | \-overview \ path/filename |
| 2820 | Specifies that javadoc should retrieve the text for the overview documentation from the "source" file specified by \f2path/filename\fP and place it on the Overview page (\f2overview\-summary.html\fP). The \f2path/filename\fP is relative to the current directory. |
| 2821 | .br |
| 2822 | .br |
| 2823 | While you can use any name you want for \f2filename\fP and place it anywhere you want for \f2path\fP, a typical thing to do is to name it \f2overview.html\fP and place it in the source tree at the directory that contains the topmost package directories. In this location, no \f2path\fP is needed when documenting packages, since \f2\-sourcepath\fP will point to this file. For example, if the source tree for the \f2java.lang\fP package is \f2/src/classes/java/lang/\fP, then you could place the overview file at \f2/src/classes/overview.html\fP. See Real World Example. |
| 2824 | .br |
| 2825 | .br |
| 2826 | For information about the file specified by \f2path/filename\fP, see overview comment file. |
| 2827 | .br |
| 2828 | .br |
| 2829 | Note that the overview page is created only if you pass into javadoc two or more package names. For further explanation, see HTML Frames.) |
| 2830 | .br |
| 2831 | .br |
| 2832 | The title on the overview page is set by \f2\-doctitle\fP. |
| 2833 | .TP 3 |
| 2834 | \-public |
| 2835 | Shows only public classes and members. |
| 2836 | .TP 3 |
| 2837 | \-protected |
| 2838 | Shows only protected and public classes and members. This is the default. |
| 2839 | .TP 3 |
| 2840 | \-package |
| 2841 | Shows only package, protected, and public classes and members. |
| 2842 | .TP 3 |
| 2843 | \-private |
| 2844 | Shows all classes and members. |
| 2845 | .TP 3 |
| 2846 | \-help |
| 2847 | Displays the online help, which lists these javadoc and doclet command line options. |
| 2848 | .TP 3 |
| 2849 | \-doclet\ class |
| 2850 | Specifies the class file that starts the doclet used in generating the documentation. Use the fully\-qualified name. This doclet defines the content and formats the output. If the \f4\-doclet\fP option is not used, javadoc uses the standard doclet for generating the default HTML format. This class must contain the \f2start(Root)\fP method. The path to this starting class is defined by the \f2\-docletpath\fP option. |
| 2851 | .br |
| 2852 | .br |
| 2853 | For example, to call the MIF doclet, use: |
| 2854 | .nf |
| 2855 | \f3 |
| 2856 | .fl |
| 2857 | \-doclet com.sun.tools.doclets.mif.MIFDoclet |
| 2858 | .fl |
| 2859 | \fP |
| 2860 | .fi |
| 2861 | For full, working examples of running a particular doclet, see the |
| 2862 | .na |
| 2863 | \f2MIF Doclet documentation\fP @ |
| 2864 | .fi |
| 2865 | http://java.sun.com/j2se/javadoc/mifdoclet/docs/mifdoclet.html. |
| 2866 | .TP 3 |
| 2867 | \-docletpath\ classpathlist |
| 2868 | Specifies the path to the doclet starting class file (specified with the \f2\-doclet\fP option) and any jar files it depends on. If the starting class file is in a jar file, then this specifies the path to that jar file, as shown in the example below. You can specify an absolute path or a path relative to the current directory. If \f2classpathlist\fP contains multiple paths or jar files, they should be separated with a colon (:) on Solaris and a semi\-colon (;) on Windows. This option is not necessary if the doclet starting class is already in the search path. |
| 2869 | .br |
| 2870 | .br |
| 2871 | Example of path to jar file that contains the starting doclet class file. Notice the jar filename is included. |
| 2872 | .nf |
| 2873 | \f3 |
| 2874 | .fl |
| 2875 | \-docletpath /home/user/mifdoclet/lib/mifdoclet.jar |
| 2876 | .fl |
| 2877 | \fP |
| 2878 | .fi |
| 2879 | Example of path to starting doclet class file. Notice the class filename is omitted. |
| 2880 | .nf |
| 2881 | \f3 |
| 2882 | .fl |
| 2883 | \-docletpath /home/user/mifdoclet/classes/com/sun/tools/doclets/mif/ |
| 2884 | .fl |
| 2885 | \fP |
| 2886 | .fi |
| 2887 | For full, working examples of running a particular doclet, see the |
| 2888 | .na |
| 2889 | \f2MIF Doclet documentation\fP @ |
| 2890 | .fi |
| 2891 | http://java.sun.com/j2se/javadoc/mifdoclet/docs/mifdoclet.html. |
| 2892 | .TP 3 |
| 2893 | \-1.1 |
| 2894 | \f2This feature has been removed from Javadoc 1.4. There is no replacement for it. This option created documentation with the appearance and functionality of documentation generated by Javadoc 1.1 (it never supported nested classes). If you need this option, use Javadoc 1.2 or 1.3 instead.\fP |
| 2895 | .TP 3 |
| 2896 | \-source release |
| 2897 | Specifies the version of source code accepted. The following values for \f2release\fP are allowed: |
| 2898 | .RS 3 |
| 2899 | .TP 2 |
| 2900 | o |
| 2901 | \f31.5\fP \- javadoc accepts code containing generics and other language features introduced in JDK 1.5. The compiler defaults to the 1.5 behavior if the \f3\-source\fP flag is not used. |
| 2902 | .TP 2 |
| 2903 | o |
| 2904 | \f31.4\fP \- javadoc accepts code containing assertions, which were introduced in JDK 1.4. |
| 2905 | .TP 2 |
| 2906 | o |
| 2907 | \f31.3\fP \- javadoc does \f2not\fP support assertions, generics, or other language features introduced after JDK 1.3. |
| 2908 | .RE |
| 2909 | Use the value of \f2release\fP corresponding to that used when compiling the code with javac. |
| 2910 | .TP 3 |
| 2911 | \-sourcepath\ sourcepathlist |
| 2912 | Specifies the search paths for finding source files (\f2.java\fP) when passing package names or \f2\-subpackages\fP into the \f2javadoc\fP command. The \f2sourcepathlist\fP can contain multiple paths by separating them with a colon (\f2:\fP). The Javadoc tool will search in all subdirectories of the specified paths. Note that this option is not only used to locate the source files being documented, but also to find source files that are not being documented but whose comments are inherited by the source files being documented. |
| 2913 | .br |
| 2914 | .br |
| 2915 | Note that you can use the \f2\-sourcepath\fP option only when passing package names into the javadoc command \-\- it will not locate \f2.java\fP files passed into the \f2javadoc\fP command. (To locate \f2.java\fP files, cd to that directory or include the path ahead of each file, as shown at Documenting One or More Classes.) If \f2\-sourcepath\fP is omitted, javadoc uses the class path to find the source files (see \-classpath). Therefore, the default \-sourcepath is the value of class path. If \-classpath is omitted and you are passing package names into javadoc, it looks in the current directory (and subdirectories) for the source files. |
| 2916 | .br |
| 2917 | .br |
| 2918 | Set \f2sourcepathlist\fP to the root directory of the source tree for the package you are documenting. For example, suppose you want to document a package called \f2com.mypackage\fP whose source files are located at: |
| 2919 | .nf |
| 2920 | \f3 |
| 2921 | .fl |
| 2922 | /home/user/src/com/mypackage/*.java |
| 2923 | .fl |
| 2924 | \fP |
| 2925 | .fi |
| 2926 | In this case you would specify the \f2sourcepath\fP to \f2/home/user/src\fP, the directory that contains \f2com/mypackage\fP, and then supply the package name \f2com.mypackage\fP: |
| 2927 | .nf |
| 2928 | \f3 |
| 2929 | .fl |
| 2930 | % \fP\f3javadoc \-sourcepath /home/user/src/ com.mypackage\fP |
| 2931 | .fl |
| 2932 | .fi |
| 2933 | This is easy to remember by noticing that if you concatenate the value of sourcepath and the package name together and change the dot to a slash "/", you end up with the full path to the package: \f2/home/user/src/com/mypackage\fP. |
| 2934 | .br |
| 2935 | .br |
| 2936 | To point to two source paths: |
| 2937 | .nf |
| 2938 | \f3 |
| 2939 | .fl |
| 2940 | % \fP\f3javadoc \-sourcepath /home/user1/src:/home/user2/src com.mypackage\fP |
| 2941 | .fl |
| 2942 | .fi |
| 2943 | .TP 3 |
| 2944 | \-classpath\ classpathlist |
| 2945 | Specifies the paths where javadoc will look for referenced classes (\f2.class\fP files) \-\- these are the documented classes plus any classes referenced by those classes. The \f2classpathlist\fP can contain multiple paths by separating them with a colon (\f2:\fP). The Javadoc tool will search in all subdirectories of the specified paths. Follow the instructions in |
| 2946 | .na |
| 2947 | \f2class path\fP @ |
| 2948 | .fi |
| 2949 | http://download.oracle.com/javase/7/docs/technotes/tools/index.html#general documentation for specifying \f2classpathlist\fP. |
| 2950 | .br |
| 2951 | .br |
| 2952 | If \f2\-sourcepath\fP is omitted, the Javadoc tool uses \f2\-classpath\fP to find the source files as well as class files (for backward compatibility). Therefore, if you want to search for source and class files in separate paths, use both \f2\-sourcepath\fP and \f2\-classpath\fP. |
| 2953 | .br |
| 2954 | .br |
| 2955 | For example, if you want to document \f2com.mypackage\fP, whose source files reside in the directory \f2/home/user/src/com/mypackage\fP, and if this package relies on a library in \f2/home/user/lib\fP, you would specify: |
| 2956 | .nf |
| 2957 | \f3 |
| 2958 | .fl |
| 2959 | % \fP\f3javadoc \-classpath /home/user/lib \-sourcepath /home/user/src com.mypackage\fP |
| 2960 | .fl |
| 2961 | .fi |
| 2962 | As with other tools, if you do not specify \f2\-classpath\fP, the Javadoc tool uses the CLASSPATH environment variable, if it is set. If both are not set, the Javadoc tool searches for classes from the current directory. |
| 2963 | .br |
| 2964 | .br |
| 2965 | For an in\-depth description of how the Javadoc tool uses \f2\-classpath\fP to find user classes as it relates to extension classes and bootstrap classes, see |
| 2966 | .na |
| 2967 | \f2How Classes Are Found\fP @ |
| 2968 | .fi |
| 2969 | http://download.oracle.com/javase/7/docs/technotes/tools/findingclasses.html. |
| 2970 | .br |
| 2971 | .br |
| 2972 | As a special convenience, a class path element containing a basename of \f2*\fP is considered equivalent to specifying a list of all the files in the directory with the extension \f2.jar\fP or \f2.JAR\fP (a Java program cannot tell the difference between the two invocations). |
| 2973 | .br |
| 2974 | .br |
| 2975 | For example, if directory \f2foo\fP contains \f2a.jar\fP and \f2b.JAR\fP, then the class path element \f2foo/*\fP is expanded to a \f2A.jar:b.JAR\fP, except that the order of jar files is unspecified. All jar files in the specified directory, even hidden ones, are included in the list. A classpath entry consisting simply of \f2*\fP expands to a list of all the jar files in the current directory. The \f2CLASSPATH\fP environment variable, where defined, will be similarly expanded. Any classpath wildcard expansion occurs before the Java virtual machine is started \-\- no Java program will ever see unexpanded wildcards except by querying the environment. For example; by invoking \f2System.getenv("CLASSPATH")\fP. |
| 2976 | .TP 3 |
| 2977 | \-subpackages\ \ package1:package2:... |
| 2978 | Generates documentation from source files in the specified packages and recursively in their subpackages. This option is useful when adding new subpackages to the source code, as they are automatically included. Each \f2package\fP argument is any top\-level subpackage (such as \f2java\fP) or fully qualified package (such as \f2javax.swing\fP) that does not need to contain source files. Arguments are separated by colons (on all operating systmes). Wildcards are not needed or allowed. Use \f2\-sourcepath\fP to specify where to find the packages. This option is smart about not processing source files that are in the source tree but do not belong to the packages, as described at processing of source files. |
| 2979 | .br |
| 2980 | .br |
| 2981 | For example: |
| 2982 | .nf |
| 2983 | \f3 |
| 2984 | .fl |
| 2985 | % \fP\f3javadoc \-d docs \-sourcepath /home/user/src \-subpackages java:javax.swing\fP |
| 2986 | .fl |
| 2987 | .fi |
| 2988 | This command generates documentation for packages named "java" and "javax.swing" and all their subpackages. |
| 2989 | .br |
| 2990 | .br |
| 2991 | You can use \f2\-subpackages\fP in conjunction with \f2\-exclude\fP to exclude specific packages. |
| 2992 | .TP 3 |
| 2993 | \-exclude\ \ packagename1:packagename2:... |
| 2994 | Unconditionally excludes the specified packages and their subpackages from the list formed by \f2\-subpackages\fP. It excludes those packages even if they would otherwise be included by some previous or later \f2\-subpackages\fP option. For example: |
| 2995 | .nf |
| 2996 | \f3 |
| 2997 | .fl |
| 2998 | % \fP\f3javadoc \-sourcepath /home/user/src \-subpackages java \-exclude java.net:java.lang\fP |
| 2999 | .fl |
| 3000 | .fi |
| 3001 | would include \f2java.io\fP, \f2java.util\fP, and \f2java.math\fP (among others), but would exclude packages rooted at \f2java.net\fP and \f2java.lang\fP. Notice this excludes \f2java.lang.ref\fP, a subpackage of \f2java.lang\fP). |
| 3002 | .TP 3 |
| 3003 | \-bootclasspath\ classpathlist |
| 3004 | Specifies the paths where the boot classes reside. These are nominally the Java platform classes. The bootclasspath is part of the search path the Javadoc tool will use to look up source and class files. See |
| 3005 | .na |
| 3006 | \f2How Classes Are Found\fP @ |
| 3007 | .fi |
| 3008 | http://download.oracle.com/javase/7/docs/technotes/tools/findingclasses.html#srcfiles. for more details. Separate directories in \f2classpathlist\fP with colons (:). |
| 3009 | .TP 3 |
| 3010 | \-extdirs\ dirlist |
| 3011 | Specifies the directories where extension classes reside. These are any classes that use the Java Extension mechanism. The extdirs is part of the search path the Javadoc tool will use to look up source and class files. See \f2\-classpath\fP (above) for more details. Separate directories in \f2dirlist\fP with colons (:). |
| 3012 | .TP 3 |
| 3013 | \-verbose |
| 3014 | Provides more detailed messages while javadoc is running. Without the verbose option, messages appear for loading the source files, generating the documentation (one message per source file), and sorting. The verbose option causes the printing of additional messages specifying the number of milliseconds to parse each java source file. |
| 3015 | .TP 3 |
| 3016 | \-quiet |
| 3017 | Shuts off non\-error and non\-warning messages, leaving only the warnings and errors appear, making them easier to view. Also suppresses the version string. |
| 3018 | .TP 3 |
| 3019 | \-breakiterator\ |
| 3020 | Uses the internationalized sentence boundary of |
| 3021 | .na |
| 3022 | \f2java.text.BreakIterator\fP @ |
| 3023 | .fi |
| 3024 | http://download.oracle.com/javase/7/docs/api/java/text/BreakIterator.html to determine the end of the first sentence for English (all other locales already use \f2BreakIterator\fP), rather than an English language, locale\-specific algorithm. By \f2first sentence\fP, we mean the first sentence in the main description of a package, class or member. This sentence is copied to the package, class or member summary, and to the alphabetic index. |
| 3025 | .br |
| 3026 | .br |
| 3027 | From JDK 1.2 forward, the BreakIterator class is already used to determine the end of sentence for all languages but English. Therefore, the \f2\-breakiterator\fP option has no effect except for English from 1.2 forward. English has its own default algorithm: |
| 3028 | .RS 3 |
| 3029 | .TP 2 |
| 3030 | o |
| 3031 | English default sentence\-break algorithm \- Stops at a period followed by a space or a HTML block tag, such as \f2<P>\fP. |
| 3032 | .TP 2 |
| 3033 | o |
| 3034 | Breakiterator sentence\-break algorithm \- In general, stops at a period, question mark or exclamation mark followed by a space if the next word starts with a capital letter. This is meant to handle most abbreviations (such as "The serial no. is valid", but won't handle "Mr. Smith"). Doesn't stop at HTML tags or sentences that begin with numbers or symbols. Stops at the last period in "../filename", even if embedded in an HTML tag. |
| 3035 | .RE |
| 3036 | NOTE: We have removed from 1.5.0 the breakiterator warning messages that were in 1.4.x and have left the default sentence\-break algorithm unchanged. That is, the \-breakiterator option is not the default in 1.5.0, nor do we expect it to become the default. This is a reversal from our former intention that the default would change in the "next major release" (1.5.0). This means if you have not modified your source code to eliminate the breakiterator warnings in 1.4.x, then you don't have to do anything, and the warnings go away starting with 1.5.0. The reason for this reversal is because any benefit to having breakiterator become the default would be outweighed by the incompatible source change it would require. We regret any extra work and confusion this has caused. |
| 3037 | .TP 3 |
| 3038 | \-locale\ language_country_variant |
| 3039 | \f3Important\fP \- The \f2\-locale\fP option must be placed \f2ahead\fP (to the left) of any options provided by the standard doclet or any other doclet. Otherwise, the navigation bars will appear in English. This is the only command\-line option that is order\-dependent. |
| 3040 | .br |
| 3041 | .br |
| 3042 | Specifies the locale that javadoc uses when generating documentation. The argument is the name of the locale, as described in java.util.Locale documentation, such as \f2en_US\fP (English, United States) or \f2en_US_WIN\fP (Windows variant). |
| 3043 | .br |
| 3044 | .br |
| 3045 | Specifying a locale causes javadoc to choose the resource files of that locale for messages (strings in the navigation bar, headings for lists and tables, help file contents, comments in stylesheet.css, and so forth). It also specifies the sorting order for lists sorted alphabetically, and the sentence separator to determine the end of the first sentence. It does not determine the locale of the doc comment text specified in the source files of the documented classes. |
| 3046 | .TP 3 |
| 3047 | \-encoding\ name |
| 3048 | Specifies the encoding name of the source files, such as \f2EUCJIS/SJIS\fP. If this option is not specified, the platform default converter is used. |
| 3049 | .br |
| 3050 | .br |
| 3051 | Also see \-docencoding and \-charset. |
| 3052 | .TP 3 |
| 3053 | \-Jflag |
| 3054 | Passes \f2flag\fP directly to the runtime system java that runs javadoc. Notice there must be no space between the \f2J\fP and the \f2flag\fP. For example, if you need to ensure that the system sets aside 32 megabytes of memory in which to process the generated documentation, then you would call the \f2\-Xmx\fP option of java as follows (\f2\-Xms\fP is optional, as it only sets the size of initial memory, which is useful if you know the minimum amount of memory required): |
| 3055 | .nf |
| 3056 | \f3 |
| 3057 | .fl |
| 3058 | % \fP\f3javadoc \-J\-Xmx32m \-J\-Xms32m\fP \f3com.mypackage\fP |
| 3059 | .fl |
| 3060 | .fi |
| 3061 | To tell what version of javadoc you are using, call the "\f2\-version\fP" option of java: |
| 3062 | .nf |
| 3063 | \f3 |
| 3064 | .fl |
| 3065 | % \fP\f3javadoc \-J\-version\fP |
| 3066 | .fl |
| 3067 | java version "1.2" |
| 3068 | .fl |
| 3069 | Classic VM (build JDK\-1.2\-V, green threads, sunwjit) |
| 3070 | .fl |
| 3071 | .fi |
| 3072 | (The version number of the standard doclet appears in its output stream.) |
| 3073 | .RE |
| 3074 | .SS |
| 3075 | Options Provided by the Standard Doclet |
| 3076 | .RS 3 |
| 3077 | .TP 3 |
| 3078 | \-d\ directory |
| 3079 | Specifies the destination directory where javadoc saves the generated HTML files. (The "d" means "destination.") Omitting this option causes the files to be saved to the current directory. The value \f2directory\fP can be absolute, or relative to the current working directory. As of 1.4, the destination directory is automatically created when javadoc is run. |
| 3080 | .br |
| 3081 | .br |
| 3082 | For example, the following generates the documentation for the package \f2com.mypackage\fP and saves the results in the \f2/home/user/doc/\fP directory: |
| 3083 | .nf |
| 3084 | \f3 |
| 3085 | .fl |
| 3086 | % \fP\f3javadoc \-d /home/user/doc com.mypackage\fP |
| 3087 | .fl |
| 3088 | .fi |
| 3089 | .TP 3 |
| 3090 | \-use |
| 3091 | Includes one "Use" page for each documented class and package. The page describes what packages, classes, methods, constructors and fields use any API of the given class or package. Given class C, things that use class C would include subclasses of C, fields declared as C, methods that return C, and methods and constructors with parameters of type C. |
| 3092 | .br |
| 3093 | .br |
| 3094 | For example, let us look at what might appear on the "Use" page for String. The \f2getName()\fP method in the \f2java.awt.Font\fP class returns type \f2String\fP. Therefore, \f2getName()\fP uses \f2String\fP, and you will find that method on the "Use" page for \f2String\fP. |
| 3095 | .br |
| 3096 | .br |
| 3097 | Note that this documents only uses of the API, not the implementation. If a method uses \f2String\fP in its implementation but does not take a string as an argument or return a string, that is not considered a "use" of \f2String\fP. |
| 3098 | .br |
| 3099 | .br |
| 3100 | You can access the generated "Use" page by first going to the class or package, then clicking on the "Use" link in the navigation bar. |
| 3101 | .TP 3 |
| 3102 | \-version |
| 3103 | Includes the @version text in the generated docs. This text is omitted by default. To tell what version of the Javadoc tool you are using, use the \f2\-J\-version\fP option. |
| 3104 | .TP 3 |
| 3105 | \-author |
| 3106 | Includes the @author text in the generated docs. |
| 3107 | .TP 3 |
| 3108 | \-splitindex |
| 3109 | Splits the index file into multiple files, alphabetically, one file per letter, plus a file for any index entries that start with non\-alphabetical characters. |
| 3110 | .TP 3 |
| 3111 | \-windowtitle\ title |
| 3112 | Specifies the title to be placed in the HTML <title> tag. This appears in the window title and in any browser bookmarks (favorite places) that someone creates for this page. This title should not contain any HTML tags, as the browser will not properly interpret them. Any internal quotation marks within \f2title\fP may have to be escaped. If \-windowtitle is omitted, the Javadoc tool uses the value of \-doctitle for this option. |
| 3113 | .nf |
| 3114 | \f3 |
| 3115 | .fl |
| 3116 | % \fP\f3javadoc \-windowtitle "Java SE Platform" com.mypackage\fP |
| 3117 | .fl |
| 3118 | .fi |
| 3119 | .TP 3 |
| 3120 | \-doctitle\ title |
| 3121 | Specifies the title to be placed near the top of the overview summary file. The title will be placed as a centered, level\-one heading directly beneath the upper navigation bar. The \f2title\fP may contain html tags and white space, though if it does, it must be enclosed in quotes. Any internal quotation marks within \f2title\fP may have to be escaped. |
| 3122 | .nf |
| 3123 | \f3 |
| 3124 | .fl |
| 3125 | % \fP\f3javadoc \-doctitle "Java(TM)" com.mypackage\fP |
| 3126 | .fl |
| 3127 | .fi |
| 3128 | .TP 3 |
| 3129 | \-title\ title |
| 3130 | \f3This option no longer exists.\fP It existed only in Beta versions of Javadoc 1.2. It has been renamed to \f2\-doctitle\fP. This option is being renamed to make it clear that it defines the document title rather than the window title. |
| 3131 | .TP 3 |
| 3132 | \-header\ header |
| 3133 | Specifies the header text to be placed at the top of each output file. The header will be placed to the right of the upper navigation bar. \f2header\fP may contain HTML tags and white space, though if it does, it must be enclosed in quotes. Any internal quotation marks within \f2header\fP may have to be escaped. |
| 3134 | .nf |
| 3135 | \f3 |
| 3136 | .fl |
| 3137 | % \fP\f3javadoc \-header "<b>Java 2 Platform </b><br>v1.4" com.mypackage\fP |
| 3138 | .fl |
| 3139 | .fi |
| 3140 | .TP 3 |
| 3141 | \-footer\ footer |
| 3142 | Specifies the footer text to be placed at the bottom of each output file. The footer will be placed to the right of the lower navigation bar. \f2footer\fP may contain html tags and white space, though if it does, it must be enclosed in quotes. Any internal quotation marks within \f2footer\fP may have to be escaped. |
| 3143 | .TP 3 |
| 3144 | \-top |
| 3145 | Specifies the text to be placed at the top of each output file. |
| 3146 | .TP 3 |
| 3147 | \-bottom\ text |
| 3148 | Specifies the text to be placed at the bottom of each output file. The text will be placed at the bottom of the page, below the lower navigation bar. The \f2text\fP may contain HTML tags and white space, though if it does, it must be enclosed in quotes. Any internal quotation marks within \f2text\fP may have to be escaped. |
| 3149 | .TP 3 |
| 3150 | \-link\ extdocURL |
| 3151 | Creates links to existing javadoc\-generated documentation of external referenced classes. It takes one argument: |
| 3152 | .RS 3 |
| 3153 | .TP 2 |
| 3154 | o |
| 3155 | \f4extdocURL\fP is the absolute or relative URL of the directory containing the external javadoc\-generated documentation you want to link to. Examples are shown below. The package\-list file must be found in this directory (otherwise, use \f2\-linkoffline\fP). The Javadoc tool reads the package names from the \f2package\-list\fP file and then links to those packages at that URL. When the Javadoc tool is run, the \f2extdocURL\fP value is copied literally into the \f2<A HREF>\fP links that are created. Therefore, \f2extdocURL\fP must be the URL to the \f2directory\fP, not to a file. |
| 3156 | .br |
| 3157 | .br |
| 3158 | You can use an absolute link for \f2extdocURL\fP to enable your docs to link to a document on any website, or can use a relative link to link only to a relative location. If relative, the value you pass in should be the relative path from the destination directory (specified with \f2\-d\fP) to the directory containing the packages being linked to. |
| 3159 | .br |
| 3160 | .br |
| 3161 | When specifying an absolute link you normally use an \f2http:\fP link. However, if you want to link to a file system that has no web server, you can use a \f2file:\fP link \-\- however, do this only if everyone wanting to access the generated documentation shares the same file system. |
| 3162 | .br |
| 3163 | .br |
| 3164 | In all cases, and on all operating systems, you should use a forward slash as the separator, whether the URL is absolute or relative, and "http:" or "file:" based (as specified in the |
| 3165 | .na |
| 3166 | \f2URL Memo\fP @ |
| 3167 | .fi |
| 3168 | http://www.ietf.org/rfc/rfc1738.txt). |
| 3169 | .RS 3 |
| 3170 | .TP 3 |
| 3171 | Absolute http: based link: |
| 3172 | \f2\-link http://<host>/<directory>/<directory>/.../<name>\fP |
| 3173 | .TP 3 |
| 3174 | Absolute file: based link: |
| 3175 | \f2\-link file://<host>/<directory>/<directory>/.../<name>\fP |
| 3176 | .TP 3 |
| 3177 | Relative link: |
| 3178 | \f2\-link <directory>/<directory>/.../<name>\fP |
| 3179 | .RE |
| 3180 | .RE |
| 3181 | You can specify multiple \f2\-link\fP options in a given javadoc run to link to multiple documents. |
| 3182 | .br |
| 3183 | .br |
| 3184 | \f3Choosing between \-linkoffline and \-link\fP: |
| 3185 | .br |
| 3186 | .br |
| 3187 | Use \f2\-link\fP: |
| 3188 | .RS 3 |
| 3189 | .TP 2 |
| 3190 | o |
| 3191 | when using a relative path to the external API document, or |
| 3192 | .TP 2 |
| 3193 | o |
| 3194 | when using an absolute URL to the external API document, if your shell allows a program to open a connection to that URL for reading. |
| 3195 | .RE |
| 3196 | Use \f2\-linkoffline\fP: |
| 3197 | .RS 3 |
| 3198 | .TP 2 |
| 3199 | o |
| 3200 | when using an absolute URL to the external API document, if your shell \f2does not allow\fP a program to open a connection to that URL for reading. This can occur if you are behind a firewall and the document you want to link to is on the other side. |
| 3201 | .RE |
| 3202 | .br |
| 3203 | .br |
| 3204 | \f3Example using absolute links to the external docs\fP \- Let us say you want to link to the \f2java.lang\fP, \f2java.io\fP and other Java Platform packages at |
| 3205 | .na |
| 3206 | \f2http://download.oracle.com/javase/7/docs/api/\fP @ |
| 3207 | .fi |
| 3208 | http://download.oracle.com/javase/7/docs/api/. The following command generates documentation for the package \f2com.mypackage\fP with links to the Java SE Platform packages. The generated documentation will contain links to the \f2Object\fP class, for example, in the class trees. (Other options, such as \f2\-sourcepath\fP and \f2\-d\fP, are not shown.) |
| 3209 | .nf |
| 3210 | \f3 |
| 3211 | .fl |
| 3212 | % \fP\f3javadoc \-link http://download.oracle.com/javase/7/docs/api/ com.mypackage\fP |
| 3213 | .fl |
| 3214 | .fi |
| 3215 | \f3Example using relative links to the external docs\fP \- Let us say you have two packages whose docs are generated in different runs of the Javadoc tool, and those docs are separated by a relative path. In this example, the packages are \f2com.apipackage\fP, an API, and \f2com.spipackage\fP, an SPI (Service Provide Interface). You want the documentation to reside in \f2docs/api/com/apipackage\fP and \f2docs/spi/com/spipackage\fP. Assuming the API package documentation is already generated, and that \f2docs\fP is the current directory, you would document the SPI package with links to the API documentation by running: |
| 3216 | .nf |
| 3217 | \f3 |
| 3218 | .fl |
| 3219 | % \fP\f3javadoc \-d ./spi \-link ../api com.spipackage\fP |
| 3220 | .fl |
| 3221 | .fi |
| 3222 | Notice the \f2\-link\fP argument is relative to the destination directory (\f2docs/spi\fP). |
| 3223 | .br |
| 3224 | .br |
| 3225 | \f3Details\fP \- The \f2\-link\fP option enables you to link to classes referenced to by your code but \f2not\fP documented in the current javadoc run. For these links to go to valid pages, you must know where those HTML pages are located, and specify that location with \f2extdocURL\fP. This allows, for instance, third party documentation to link to \f2java.*\fP documentation on \f2http://java.sun.com\fP. |
| 3226 | .br |
| 3227 | .br |
| 3228 | Omit the \f2\-link\fP option for javadoc to create links only to API within the documentation it is generating in the current run. (Without the \f2\-link\fP option, the Javadoc tool does not create links to documentation for external references, because it does not know if or where that documentation exists.) |
| 3229 | .br |
| 3230 | .br |
| 3231 | This option can create links in several places in the generated documentation. |
| 3232 | .br |
| 3233 | .br |
| 3234 | Another use is for cross\-links between sets of packages: Execute javadoc on one set of packages, then run javadoc again on another set of packages, creating links both ways between both sets. |
| 3235 | .br |
| 3236 | .br |
| 3237 | \f3How a Class Must be Referenced\fP \- For a link to an external referenced class to actually appear (and not just its text label), the class must be referenced in the following way. It is not sufficient for it to be referenced in the body of a method. It must be referenced in either an \f2import\fP statement or in a declaration. Here are examples of how the class \f2java.io.File\fP can be referenced: |
| 3238 | .RS 3 |
| 3239 | .TP 2 |
| 3240 | o |
| 3241 | In any kind of \f2import\fP statement: by wildcard import, import explicitly by name, or automatically import for \f2java.lang.*\fP. For example, this would suffice: |
| 3242 | .br |
| 3243 | \f2import java.io.*;\fP |
| 3244 | .br |
| 3245 | In 1.3.x and 1.2.x, only an explicit import by name works \-\- a wildcard import statement does not work, nor does the automatic import \f2java.lang.*\fP. |
| 3246 | .TP 2 |
| 3247 | o |
| 3248 | In a declaration: |
| 3249 | .br |
| 3250 | \f2void foo(File f) {}\fP |
| 3251 | .br |
| 3252 | The reference and be in the return type or parameter type of a method, constructor, field, class or interface, or in an \f2implements\fP, \f2extends\fP or \f2throws\fP statement. |
| 3253 | .RE |
| 3254 | An important corollary is that when you use the \f2\-link\fP option, there may be many links that unintentionally do not appear due to this constraint. (The text would appear without a hypertext link.) You can detect these by the warnings they emit. The most innocuous way to properly reference a class and thereby add the link would be to import that class, as shown above. |
| 3255 | .br |
| 3256 | .br |
| 3257 | \f3Package List\fP \- The \f2\-link\fP option requires that a file named \f2package\-list\fP, which is generated by the Javadoc tool, exist at the URL you specify with \f2\-link\fP. The \f2package\-list\fP file is a simple text file that lists the names of packages documented at that location. In the earlier example, the Javadoc tool looks for a file named \f2package\-list\fP at the given URL, reads in the package names and then links to those packages at that URL. |
| 3258 | .br |
| 3259 | .br |
| 3260 | For example, the package list for the Java SE 6 API is located at |
| 3261 | .na |
| 3262 | \f2http://download.oracle.com/javase/7/docs/api/package\-list\fP @ |
| 3263 | .fi |
| 3264 | http://download.oracle.com/javase/7/docs/api/package\-list. and starts as follows: |
| 3265 | .nf |
| 3266 | \f3 |
| 3267 | .fl |
| 3268 | java.applet |
| 3269 | .fl |
| 3270 | java.awt |
| 3271 | .fl |
| 3272 | java.awt.color |
| 3273 | .fl |
| 3274 | java.awt.datatransfer |
| 3275 | .fl |
| 3276 | java.awt.dnd |
| 3277 | .fl |
| 3278 | java.awt.event |
| 3279 | .fl |
| 3280 | java.awt.font |
| 3281 | .fl |
| 3282 | etc. |
| 3283 | .fl |
| 3284 | \fP |
| 3285 | .fi |
| 3286 | When javadoc is run without the \f2\-link\fP option, when it encounters a name that belongs to an external referenced class, it prints the name with no link. However, when the \f2\-link\fP option is used, the Javadoc tool searches the \f2package\-list\fP file at the specified \f2extdocURL\fP location for that package name. If it finds the package name, it prefixes the name with \f2extdocURL\fP. |
| 3287 | .br |
| 3288 | .br |
| 3289 | In order for there to be no broken links, all of the documentation for the external references must exist at the specified URLs. The Javadoc tool will not check that these pages exist \-\- only that the package\-list exists. |
| 3290 | .br |
| 3291 | .br |
| 3292 | \f3Multiple Links\fP \- You can supply multiple \f2\-link\fP options to link to any number of external generated documents. \ Javadoc 1.2 has a known bug which prevents you from supplying more than one \f2\-link\fP command. This was fixed in 1.2.2. |
| 3293 | .br |
| 3294 | .br |
| 3295 | Specify a different link option for each external document to link to: |
| 3296 | .br |
| 3297 | .br |
| 3298 | \ \ \f2% \fP\f4javadoc \-link\fP \f2extdocURL1\fP \f4\-link\fP \f2extdocURL2\fP \f2... \fP\f4\-link\fP \f2extdocURLn\fP \f4com.mypackage\fP |
| 3299 | .br |
| 3300 | .br |
| 3301 | where \f2extdocURL1\fP,\ \f2extdocURL2\fP,\ ... \f2extdocURLn\fP point respectively to the roots of external documents, each of which contains a file named \f2package\-list\fP. |
| 3302 | .br |
| 3303 | .br |
| 3304 | \f3Cross\-links\fP \- Note that "bootstrapping" may be required when cross\-linking two or more documents that have not previously been generated. In other words, if \f2package\-list\fP does not exist for either document, when you run the Javadoc tool on the first document, the \f2package\-list\fP will not yet exist for the second document. Therefore, to create the external links, you must re\-generate the first document after generating the second document. |
| 3305 | .br |
| 3306 | .br |
| 3307 | In this case, the purpose of first generating a document is to create its \f2package\-list\fP (or you can create it by hand it if you're certain of the package names). Then generate the second document with its external links. The Javadoc tool prints a warning if a needed external \f2package\-list\fP file does not exist. |
| 3308 | .TP 3 |
| 3309 | \-linkoffline\ extdocURL\ packagelistLoc |
| 3310 | This option is a variation of \f2\-link\fP; they both create links to javadoc\-generated documentation for external referenced classes. Use the \f2\-linkoffline\fP option when linking to a document on the web when the Javadoc tool itself is "offline" \-\- that is, it cannot access the document through a web connection. |
| 3311 | .br |
| 3312 | .br |
| 3313 | More specifically, use \f2\-linkoffline\fP if the external document's \f2package\-list\fP file is not accessible or does not exist at the \f2extdocURL\fP location but does exist at a different location, which can be specified by \f2packageListLoc\fP (typically local). Thus, if \f2extdocURL\fP is accessible only on the World Wide Web, \f2\-linkoffline\fP removes the constraint that the Javadoc tool have a web connection when generating the documentation. |
| 3314 | .br |
| 3315 | .br |
| 3316 | Another use is as a "hack" to update docs: After you have run javadoc on a full set of packages, then you can run javadoc again on onlya smaller set of changed packages, so that the updated files can be inserted back into the original set. Examples are given below. |
| 3317 | .br |
| 3318 | .br |
| 3319 | The \f2\-linkoffline\fP option takes two arguments \-\- the first for the string to be embedded in the \f2<a href>\fP links, the second telling it where to find \f2package\-list\fP: |
| 3320 | .RS 3 |
| 3321 | .TP 2 |
| 3322 | o |
| 3323 | \f4extdocURL\fP is the absolute or relative URL of the directory containing the external javadoc\-generated documentation you want to link to. If relative, the value should be the relative path from the destination directory (specified with \f2\-d\fP) to the root of the packages being linked to. For more details, see \f2extdocURL\fP in the \f2\-link\fP option. |
| 3324 | .TP 2 |
| 3325 | o |
| 3326 | \f4packagelistLoc\fP is the path or URL to the directory containing the \f2package\-list\fP file for the external documentation. This can be a URL (http: or file:) or file path, and can be absolute or relative. If relative, make it relative to the \f2current\fP directory from where javadoc was run. Do not include the \f2package\-list\fP filename. |
| 3327 | .RE |
| 3328 | You can specify multiple \f2\-linkoffline\fP options in a given javadoc run. (Prior to 1.2.2, it could be specified only once.) |
| 3329 | .br |
| 3330 | .br |
| 3331 | \f3Example using absolute links to the external docs\fP \- Let us say you want to link to the \f2java.lang\fP, \f2java.io\fP and other Java SE Platform packages at \f2http://download.oracle.com/javase/7/docs/api/\fP, but your shell does not have web access. You could open the \f2package\-list\fP file in a browser at |
| 3332 | .na |
| 3333 | \f2http://download.oracle.com/javase/7/docs/api/package\-list\fP @ |
| 3334 | .fi |
| 3335 | http://download.oracle.com/javase/7/docs/api/package\-list, save it to a local directory, and point to this local copy with the second argument, \f2packagelistLoc\fP. In this example, the package list file has been saved to the current directory "\f2.\fP" . The following command generates documentation for the package \f2com.mypackage\fP with links to the Java SE Platform packages. The generated documentation will contain links to the \f2Object\fP class, for example, in the class trees. (Other necessary options, such as \f2\-sourcepath\fP, are not shown.) |
| 3336 | .nf |
| 3337 | \f3 |
| 3338 | .fl |
| 3339 | % \fP\f3javadoc \-linkoffline http://download.oracle.com/javase/7/docs/api/ . com.mypackage\fP |
| 3340 | .fl |
| 3341 | .fi |
| 3342 | \f3Example using relative links to the external docs\fP \- It's not very common to use \f2\-linkoffline\fP with relative paths, for the simple reason that \f2\-link\fP usually suffices. When using \f2\-linkoffline\fP, the \f2package\-list\fP file is generally local, and when using relative links, the file you are linking to is also generally local. So it is usually unnecessary to give a different path for the two arguments to \f2\-linkoffline\fP. When the two arguments are identical, you can use \f2\-link\fP. See the \f2\-link\fP relative example. |
| 3343 | .br |
| 3344 | .br |
| 3345 | \f3Manually Creating a \fP\f4package\-list\fP\f3 File\fP \- If a \f2package\-list\fP file does not yet exist, but you know what package names your document will link to, you can create your own copy of this file by hand and specify its path with \f2packagelistLoc\fP. An example would be the previous case where the package list for \f2com.spipackage\fP did not exist when \f2com.apipackage\fP was first generated. This technique is useful when you need to generate documentation that links to new external documentation whose package names you know, but which is not yet published. This is also a way of creating \f2package\-list\fP files for packages generated with Javadoc 1.0 or 1.1, where \f2package\-list\fP files were not generated. Likewise, two companies can share their unpublished \f2package\-list\fP files, enabling them to release their cross\-linked documentation simultaneously. |
| 3346 | .br |
| 3347 | .br |
| 3348 | \f3Linking to Multiple Documents\fP \- You can include \f2\-linkoffline\fP once for each generated document you want to refer to (each option is shown on a separate line for clarity): |
| 3349 | .br |
| 3350 | .br |
| 3351 | \f2% \fP\f4javadoc \-linkoffline\fP \f2extdocURL1\fP \f2packagelistLoc1\fP \f2\\\fP |
| 3352 | .br |
| 3353 | \f2\ \ \ \ \ \ \ \ \ \ \fP\f4\-linkoffline\fP \f2extdocURL2\fP \f2packagelistLoc2\fP \f2\\\fP |
| 3354 | .br |
| 3355 | \f2\ \ \ \ \ \ \ \ \ \ ...\fP |
| 3356 | .br |
| 3357 | .br |
| 3358 | \f3Updating docs\fP \- Another use for \f2\-linkoffline\fP option is useful if your project has dozens or hundreds of packages, if you have already run javadoc on the entire tree, and now, in a separate run, you want to quickly make some small changes and re\-run javadoc on just a small portion of the source tree. This is somewhat of a hack in that it works properly only if your changes are only to doc comments and not to declarations. If you were to add, remove or change any declarations from the source code, then broken links could show up in the index, package tree, inherited member lists, use page, and other places. |
| 3359 | .br |
| 3360 | .br |
| 3361 | First, you create a new destination directory (call it \f2update\fP) for this new small run. Let us say the original destination directory was named \f2html\fP. In the simplest example, cd to the parent of \f2html\fP. Set the first argument of \f2\-linkoffline\fP to the current directory "." and set the second argument to the relative path to \f2html\fP, where it can find \f2package\-list\fP, and pass in only the package names of the packages you want to update: |
| 3362 | .nf |
| 3363 | \f3 |
| 3364 | .fl |
| 3365 | % \fP\f3javadoc \-d update \-linkoffline . html com.mypackage\fP |
| 3366 | .fl |
| 3367 | .fi |
| 3368 | When the Javadoc tool is done, copy these generated class pages in \f2update/com/package\fP (not the overview or index), over the original files in \f2html/com/package\fP. |
| 3369 | .TP 3 |
| 3370 | \-linksource\ |
| 3371 | Creates an HTML version of each source file (with line numbers) and adds links to them from the standard HTML documentation. Links are created for classes, interfaces, constructors, methods and fields whose declarations are in a source file. Otherwise, links are not created, such as for default constructors and generated classes. |
| 3372 | .br |
| 3373 | .br |
| 3374 | \f3This option exposes \fP\f4all\fP\f3 private implementation details in the included source files, including private classes, private fields, and the bodies of private methods, \fP\f4regardless of the \fP\f4\-public\fP\f3, \fP\f4\-package\fP\f3, \fP\f4\-protected\fP\f3 and \fP\f4\-private\fP\f3 options.\fP Unless you also use the \f2\-private\fP option, not all private classes or interfaces will necessarily be accessible via links. |
| 3375 | .br |
| 3376 | .br |
| 3377 | Each link appears on the name of the identifier in its declaration. For example, the link to the source code of the \f2Button\fP class would be on the word "Button": |
| 3378 | .nf |
| 3379 | \f3 |
| 3380 | .fl |
| 3381 | public class Button |
| 3382 | .fl |
| 3383 | extends Component |
| 3384 | .fl |
| 3385 | implements Accessible |
| 3386 | .fl |
| 3387 | \fP |
| 3388 | .fi |
| 3389 | and the link to the source code of the \f2getLabel()\fP method in the Button class would be on the word "getLabel": |
| 3390 | .nf |
| 3391 | \f3 |
| 3392 | .fl |
| 3393 | public String getLabel() |
| 3394 | .fl |
| 3395 | \fP |
| 3396 | .fi |
| 3397 | .TP 3 |
| 3398 | \-group\ groupheading\ packagepattern:packagepattern:... |
| 3399 | Separates packages on the overview page into whatever groups you specify, one group per table. You specify each group with a different \f2\-group\fP option. The groups appear on the page in the order specified on the command line; packages are alphabetized within a group. For a given \f2\-group\fP option, the packages matching the list of \f2packagepattern\fP expressions appear in a table with the heading \f2groupheading\fP. |
| 3400 | .RS 3 |
| 3401 | .TP 2 |
| 3402 | o |
| 3403 | \f4groupheading\fP can be any text, and can include white space. This text is placed in the table heading for the group. |
| 3404 | .TP 2 |
| 3405 | o |
| 3406 | \f4packagepattern\fP can be any package name, or can be the start of any package name followed by an asterisk (\f2*\fP). The asterisk is a wildcard meaning "match any characters". This is the only wildcard allowed. Multiple patterns can be included in a group by separating them with colons (\f2:\fP). |
| 3407 | .RE |
| 3408 | \f3NOTE: If using an asterisk in a pattern or pattern list, the pattern list must be inside quotes, such as \fP\f4"java.lang*:java.util"\fP |
| 3409 | .br |
| 3410 | .br |
| 3411 | If you do not supply any \f2\-group\fP option, all packages are placed in one group with the heading "Packages". If the all groups do not include all documented packages, any leftover packages appear in a separate group with the heading "Other Packages". |
| 3412 | .br |
| 3413 | .br |
| 3414 | For example, the following option separates the four documented packages into core, extension and other packages. Notice the trailing "dot" does not appear in "java.lang*" \-\- including the dot, such as "java.lang.*" would omit the java.lang package. |
| 3415 | .nf |
| 3416 | \f3 |
| 3417 | .fl |
| 3418 | % \fP\f3javadoc \-group "Core Packages" "java.lang*:java.util" |
| 3419 | .fl |
| 3420 | \-group "Extension Packages" "javax.*" |
| 3421 | .fl |
| 3422 | java.lang java.lang.reflect java.util javax.servlet java.new\fP |
| 3423 | .fl |
| 3424 | .fi |
| 3425 | This results in the groupings: |
| 3426 | .RS 3 |
| 3427 | .TP 3 |
| 3428 | Core Packages |
| 3429 | \f2java.lang\fP |
| 3430 | \f2java.lang.reflect\fP |
| 3431 | \f2java.util\fP |
| 3432 | .TP 3 |
| 3433 | Extension Packages |
| 3434 | \f2javax.servlet\fP |
| 3435 | .TP 3 |
| 3436 | Other Packages |
| 3437 | \f2java.new\fP |
| 3438 | .RE |
| 3439 | .TP 3 |
| 3440 | \-nodeprecated |
| 3441 | Prevents the generation of any deprecated API at all in the documentation. This does what \-nodeprecatedlist does, plus it does not generate any deprecated API throughout the rest of the documentation. This is useful when writing code and you don't want to be distracted by the deprecated code. |
| 3442 | .TP 3 |
| 3443 | \-nodeprecatedlist |
| 3444 | Prevents the generation of the file containing the list of deprecated APIs (deprecated\-list.html) and the link in the navigation bar to that page. (However, javadoc continues to generate the deprecated API throughout the rest of the document.) This is useful if your source code contains no deprecated API, and you want to make the navigation bar cleaner. |
| 3445 | .TP 3 |
| 3446 | \-nosince |
| 3447 | Omits from the generated docs the "Since" sections associated with the @since tags. |
| 3448 | .TP 3 |
| 3449 | \-notree |
| 3450 | Omits the class/interface hierarchy pages from the generated docs. These are the pages you reach using the "Tree" button in the navigation bar. The hierarchy is produced by default. |
| 3451 | .TP 3 |
| 3452 | \-noindex |
| 3453 | Omits the index from the generated docs. The index is produced by default. |
| 3454 | .TP 3 |
| 3455 | \-nohelp |
| 3456 | Omits the HELP link in the navigation bars at the top and bottom of each page of output. |
| 3457 | .TP 3 |
| 3458 | \-nonavbar |
| 3459 | Prevents the generation of the navigation bar, header and footer, otherwise found at the top and bottom of the generated pages. Has no affect on the "bottom" option. The \f2\-nonavbar\fP option is useful when you are interested only in the content and have no need for navigation, such as converting the files to PostScript or PDF for print only. |
| 3460 | .TP 3 |
| 3461 | \-helpfile\ path/filename |
| 3462 | Specifies the path of an alternate help file \f2path/filename\fP that the HELP link in the top and bottom navigation bars link to. Without this option, the Javadoc tool automatically creates a help file \f2help\-doc.html\fP that is hard\-coded in the Javadoc tool. This option enables you to override this default. The \f2filename\fP can be any name and is not restricted to \f2help\-doc.html\fP \-\- the Javadoc tool will adjust the links in the navigation bar accordingly. For example: |
| 3463 | .nf |
| 3464 | \f3 |
| 3465 | .fl |
| 3466 | % \fP\f3javadoc \-helpfile /home/user/myhelp.html java.awt\fP |
| 3467 | .fl |
| 3468 | .fi |
| 3469 | .TP 3 |
| 3470 | \-stylesheetfile\ path/filename |
| 3471 | Specifies the path of an alternate HTML stylesheet file. Without this option, the Javadoc tool automatically creates a stylesheet file \f2stylesheet.css\fP that is hard\-coded in the Javadoc tool. This option enables you to override this default. The \f2filename\fP can be any name and is not restricted to \f2stylesheet.css\fP. For example: |
| 3472 | .nf |
| 3473 | \f3 |
| 3474 | .fl |
| 3475 | % \fP\f3javadoc \-stylesheetfile /home/user/mystylesheet.css com.mypackage\fP |
| 3476 | .fl |
| 3477 | .fi |
| 3478 | .TP 3 |
| 3479 | \-serialwarn |
| 3480 | Generates compile\-time warnings for missing @serial tags. By default, Javadoc 1.2.2 (and later versions) generates no serial warnings. (This is a reversal from earlier versions.) Use this option to display the serial warnings, which helps to properly document default serializable fields and \f2writeExternal\fP methods. |
| 3481 | .TP 3 |
| 3482 | \-charset\ name |
| 3483 | Specifies the HTML character set for this document. The name should be a preferred MIME name as given in the |
| 3484 | .na |
| 3485 | \f2IANA Registry\fP @ |
| 3486 | .fi |
| 3487 | http://www.iana.org/assignments/character\-sets. For example: |
| 3488 | .nf |
| 3489 | \f3 |
| 3490 | .fl |
| 3491 | % \fP\f3javadoc \-charset "iso\-8859\-1" mypackage\fP |
| 3492 | .fl |
| 3493 | .fi |
| 3494 | would insert the following line in the head of every generated page: |
| 3495 | .nf |
| 3496 | \f3 |
| 3497 | .fl |
| 3498 | <META http\-equiv="Content\-Type" content="text/html; charset=ISO\-8859\-1"> |
| 3499 | .fl |
| 3500 | \fP |
| 3501 | .fi |
| 3502 | This META tag is described in the |
| 3503 | .na |
| 3504 | \f2HTML standard\fP @ |
| 3505 | .fi |
| 3506 | http://www.w3.org/TR/REC\-html40/charset.html#h\-5.2.2. (4197265 and 4137321) |
| 3507 | .br |
| 3508 | .br |
| 3509 | Also see \-encoding and \-docencoding. |
| 3510 | .TP 3 |
| 3511 | \-docencoding\ name |
| 3512 | Specifies the encoding of the generated HTML files. The name should be a preferred MIME name as given in the |
| 3513 | .na |
| 3514 | \f2IANA Registry\fP @ |
| 3515 | .fi |
| 3516 | http://www.iana.org/assignments/character\-sets. If you omit this option but use \-encoding, then the encoding of the generated HTML files is determined by \-encoding. Example: |
| 3517 | .nf |
| 3518 | \f3 |
| 3519 | .fl |
| 3520 | % \fP\f3javadoc \-docencoding "ISO\-8859\-1" mypackage\fP |
| 3521 | .fl |
| 3522 | .fi |
| 3523 | Also see \-encoding and \-charset. |
| 3524 | .TP 3 |
| 3525 | \-keywords |
| 3526 | Adds HTML meta keyword tags to the generated file for each class. These tags can help the page be found by search engines that look for meta tags. (Most search engines that search the entire Internet do not look at meta tags, because pages can misuse them; but search engines offered by companies that confine their search to their own website can benefit by looking at meta tags.) |
| 3527 | .br |
| 3528 | .br |
| 3529 | The meta tags include the fully qualified name of the class and the unqualified names of the fields and methods. Constructors are not included because they are identical to the class name. For example, the class String starts with these keywords: |
| 3530 | .nf |
| 3531 | \f3 |
| 3532 | .fl |
| 3533 | <META NAME="keywords" CONTENT="java.lang.String class"> |
| 3534 | .fl |
| 3535 | <META NAME="keywords" CONTENT="CASE_INSENSITIVE_ORDER"> |
| 3536 | .fl |
| 3537 | <META NAME="keywords" CONTENT="length()"> |
| 3538 | .fl |
| 3539 | <META NAME="keywords" CONTENT="charAt()"> |
| 3540 | .fl |
| 3541 | \fP |
| 3542 | .fi |
| 3543 | .TP 3 |
| 3544 | \-tag\ \ tagname:Xaoptcmf:"taghead" |
| 3545 | Enables the Javadoc tool to interpret a simple, one\-argument custom block tag \f2@\fP\f2tagname\fP in doc comments. So the Javadoc tool can "spell\-check" tag names, it is important to include a \f2\-tag\fP option for every custom tag that is present in the source code, disabling (with \f2X\fP) those that are not being output in the current run. |
| 3546 | .br |
| 3547 | .br |
| 3548 | The colon (\f4:\fP) is always the separator. To use a colon in \f2tagname\fP, see Use of Colon in Tag Name. |
| 3549 | .br |
| 3550 | .br |
| 3551 | The \f2\-tag\fP option outputs the tag's heading \f2taghead\fP in bold, followed on the next line by the text from its single argument, as shown in the example below. Like any block tag, this argument's text can contain inline tags, which are also interpreted. The output is similar to standard one\-argument tags, such as \f2@return\fP and \f2@author\fP. Omitting \f2taghead\fP causes \f2tagname\fP to appear as the heading. |
| 3552 | .br |
| 3553 | .br |
| 3554 | \f3Placement of tags\fP \- The \f4Xaoptcmf\fP part of the argument determines where in the source code the tag is allowed to be placed, and whether the tag can be disabled (using \f2X\fP). You can supply either \f4a\fP, to allow the tag in all places, or any combination of the other letters: |
| 3555 | .br |
| 3556 | .br |
| 3557 | \f4X\fP (disable tag) |
| 3558 | .br |
| 3559 | \f4a\fP (all) |
| 3560 | .br |
| 3561 | \f4o\fP (overview) |
| 3562 | .br |
| 3563 | \f4p\fP (packages) |
| 3564 | .br |
| 3565 | \f4t\fP (types, that is classes and interfaces) |
| 3566 | .br |
| 3567 | \f4c\fP (constructors) |
| 3568 | .br |
| 3569 | \f4m\fP (methods) |
| 3570 | .br |
| 3571 | \f4f\fP (fields) |
| 3572 | .br |
| 3573 | .br |
| 3574 | \f3Examples of single tags\fP \- An example of a tag option for a tag that can be used anywhere in the source code is: |
| 3575 | .nf |
| 3576 | \f3 |
| 3577 | .fl |
| 3578 | \-tag todo:a:"To Do:" |
| 3579 | .fl |
| 3580 | \fP |
| 3581 | .fi |
| 3582 | If you wanted @todo to be used only with constructors, methods and fields, you would use: |
| 3583 | .nf |
| 3584 | \f3 |
| 3585 | .fl |
| 3586 | \-tag todo:cmf:"To Do:" |
| 3587 | .fl |
| 3588 | \fP |
| 3589 | .fi |
| 3590 | Notice the last colon (\f2:\fP) above is not a parameter separator, but is part of the heading text (as shown below). You would use either tag option for source code that contains the tag \f2@todo\fP, such as: |
| 3591 | .nf |
| 3592 | \f3 |
| 3593 | .fl |
| 3594 | @todo The documentation for this method needs work. |
| 3595 | .fl |
| 3596 | \fP |
| 3597 | .fi |
| 3598 | \f3Use of Colon in Tag Name\fP \- A colon can be used in a tag name if it is escaped with a backslash. For this doc comment: |
| 3599 | .nf |
| 3600 | \f3 |
| 3601 | .fl |
| 3602 | /** |
| 3603 | .fl |
| 3604 | * @ejb:bean |
| 3605 | .fl |
| 3606 | */ |
| 3607 | .fl |
| 3608 | \fP |
| 3609 | .fi |
| 3610 | use this tag option: |
| 3611 | .nf |
| 3612 | \f3 |
| 3613 | .fl |
| 3614 | \-tag ejb\\\\:bean:a:"EJB Bean:" |
| 3615 | .fl |
| 3616 | \fP |
| 3617 | .fi |
| 3618 | \f3Spell\-checking tag names (Disabling tags)\fP \- Some developers put custom tags in the source code that they don't always want to output. In these cases, it is important to list all tags that are present in the source code, enabling the ones you want to output and disabling the ones you don't want to output. The presence of \f2X\fP disables the tag, while its absence enables the tag. This gives the Javadoc tool enough information to know if a tag it encounters is unknown, probably the results of a typo or a misspelling. It prints a warning in these cases. |
| 3619 | .br |
| 3620 | .br |
| 3621 | You can add \f2X\fP to the placement values already present, so that when you want to enable the tag, you can simply delete the \f2X\fP. For example, if @todo is a tag that you want to suppress on output, you would use: |
| 3622 | .nf |
| 3623 | \f3 |
| 3624 | .fl |
| 3625 | \-tag todo:Xcmf:"To Do:" |
| 3626 | .fl |
| 3627 | \fP |
| 3628 | .fi |
| 3629 | or, if you'd rather keep it simple: |
| 3630 | .nf |
| 3631 | \f3 |
| 3632 | .fl |
| 3633 | \-tag todo:X |
| 3634 | .fl |
| 3635 | \fP |
| 3636 | .fi |
| 3637 | The syntax \f2\-tag todo:X\fP works even if \f2@todo\fP is defined by a taglet. |
| 3638 | .br |
| 3639 | .br |
| 3640 | \f3Order of tags\fP \- The order of the \f2\-tag\fP (and \f2\-taglet\fP) options determine the order the tags are output. You can mix the custom tags with the standard tags to intersperse them. The tag options for standard tags are placeholders only for determining the order \-\- they take only the standard tag's name. (Subheadings for standard tags cannot be altered.) This is illustrated in the following example. |
| 3641 | .br |
| 3642 | .br |
| 3643 | If \f2\-tag\fP is missing, then the position of \f2\-taglet\fP determines its order. If they are both present, then whichever appears last on the command line determines its order. (This happens because the tags and taglets are processed in the order that they appear on the command line. For example, if \f2\-taglet\fP and \f2\-tag\fP both have the name "todo", the one that appears last on the command line will determine its order. |
| 3644 | .br |
| 3645 | .br |
| 3646 | \f3Example of a complete set of tags\fP \- This example inserts "To Do" after "Parameters" and before "Throws" in the output. By using "X", it also specifies that @example is a tag that might be encountered in the source code that should not be output during this run. Notice that if you use @argfile, you can put the tags on separate lines in an argument file like this (no line continuation characters needed): |
| 3647 | .nf |
| 3648 | \f3 |
| 3649 | .fl |
| 3650 | \-tag param |
| 3651 | .fl |
| 3652 | \-tag return |
| 3653 | .fl |
| 3654 | \-tag todo:a:"To Do:" |
| 3655 | .fl |
| 3656 | \-tag throws |
| 3657 | .fl |
| 3658 | \-tag see |
| 3659 | .fl |
| 3660 | \-tag example:X |
| 3661 | .fl |
| 3662 | \fP |
| 3663 | .fi |
| 3664 | When javadoc parses the doc comments, any tag encountered that is neither a standard tag nor passed in with \f2\-tag\fP or \f2\-taglet\fP is considered unknown, and a warning is thrown. |
| 3665 | .br |
| 3666 | .br |
| 3667 | The standard tags are initially stored internally in a list in their default order. Whenever \f2\-tag\fP options are used, those tags get appended to this list \-\- standard tags are moved from their default position. Therefore, if a \f2\-tag\fP option is omitted for a standard tag, it remains in its default position. |
| 3668 | .br |
| 3669 | .br |
| 3670 | \f3Avoiding Conflicts\fP \- If you want to slice out your own namespace, you can use a dot\-separated naming convention similar to that used for packages: \f2com.mycompany.todo\fP. Oracle will continue to create standard tags whose names do not contain dots. Any tag you create will override the behavior of a tag by the same name defined by Oracle. In other words, if you create a tag or taglet \f2@todo\fP, it will always have the same behavior you define, even if Oracle later creates a standard tag of the same name. |
| 3671 | .br |
| 3672 | .br |
| 3673 | \f3Annotations vs. Javadoc Tags\fP \- In general, if the markup you want to add is intended to affect or produce documentation, it should probably be a javadoc tag; otherwise, it should be an annotation. See |
| 3674 | .na |
| 3675 | \f2Comparing Annotations and Javadoc Tags\fP @ |
| 3676 | .fi |
| 3677 | http://www.oracle.com/technetwork/java/javase/documentation/index\-137868.html#annotations< |
| 3678 | .br |
| 3679 | .br |
| 3680 | You can also create more complex block tags, or custom inline tags with the \-taglet option. |
| 3681 | .TP 3 |
| 3682 | \-taglet\ \ class |
| 3683 | Specifies the class file that starts the taglet used in generating the documentation for that tag. Use the fully\-qualified name for \f2class\fP. This taglet also defines the number of text arguments that the custom tag has. The taglet accepts those arguments, processes them, and generates the output. For extensive documentation with example taglets, see: |
| 3684 | .RS 3 |
| 3685 | .TP 2 |
| 3686 | o |
| 3687 | .na |
| 3688 | \f2Taglet Overview\fP @ |
| 3689 | .fi |
| 3690 | http://download.oracle.com/javase/7/docs/technotes/guides/javadoc/taglet/overview.html |
| 3691 | .RE |
| 3692 | Taglets are useful for block or inline tags. They can have any number of arguments and implement custom behavior, such as making text bold, formatting bullets, writing out the text to a file, or starting other processes. |
| 3693 | .br |
| 3694 | .br |
| 3695 | Taglets can only determine where a tag should appear and in what form. All other decisions are made by the doclet. So a taglet cannot do things such as remove a class name from the list of included classes. However, it can execute side effects, such as printing the tag's text to a file or triggering another process. |
| 3696 | .br |
| 3697 | .br |
| 3698 | Use the \f2\-tagletpath\fP option to specify the path to the taglet. Here is an example that inserts the "To Do" taglet after "Parameters" and ahead of "Throws" in the generated pages: |
| 3699 | .nf |
| 3700 | \f3 |
| 3701 | .fl |
| 3702 | \-taglet com.sun.tools.doclets.ToDoTaglet |
| 3703 | .fl |
| 3704 | \-tagletpath /home/taglets |
| 3705 | .fl |
| 3706 | \-tag return |
| 3707 | .fl |
| 3708 | \-tag param |
| 3709 | .fl |
| 3710 | \-tag todo |
| 3711 | .fl |
| 3712 | \-tag throws |
| 3713 | .fl |
| 3714 | \-tag see |
| 3715 | .fl |
| 3716 | \fP |
| 3717 | .fi |
| 3718 | Alternatively, you can use the \f2\-taglet\fP option in place of its \f2\-tag\fP option, but that may be harder to read. |
| 3719 | .TP 3 |
| 3720 | \-tagletpath\ \ tagletpathlist |
| 3721 | Specifies the search paths for finding taglet class files (.class). The \f2tagletpathlist\fP can contain multiple paths by separating them with a colon (\f2:\fP). The Javadoc tool will search in all subdirectories of the specified paths. |
| 3722 | .TP 3 |
| 3723 | \-docfilessubdirs\ |
| 3724 | Enables deep copying of "\f2doc\-files\fP" directories. In other words, subdirectories and all contents are recursively copied to the destination. For example, the directory \f2doc\-files/example/images\fP and all its contents would now be copied. There is also an option to exclude subdirectories. |
| 3725 | .TP 3 |
| 3726 | \-excludedocfilessubdir\ \ name1:name2... |
| 3727 | Excludes any "\f2doc\-files\fP" subdirectories with the given names. This prevents the copying of SCCS and other source\-code\-control subdirectories. |
| 3728 | .TP 3 |
| 3729 | \-noqualifier\ \ all\ | \ packagename1:packagename2:... |
| 3730 | Omits qualifying package name from ahead of class names in output. The argument to \f2\-noqualifier\fP is either "\f2all\fP" (all package qualifiers are omitted) or a colon\-separate list of packages, with wildcards, to be removed as qualifiers. The package name is removed from places where class or interface names appear. |
| 3731 | .br |
| 3732 | .br |
| 3733 | The following example omits all package qualifiers: |
| 3734 | .nf |
| 3735 | \f3 |
| 3736 | .fl |
| 3737 | \-noqualifier all |
| 3738 | .fl |
| 3739 | \fP |
| 3740 | .fi |
| 3741 | The following example omits "java.lang" and "java.io" package qualifiers: |
| 3742 | .nf |
| 3743 | \f3 |
| 3744 | .fl |
| 3745 | \-noqualifier java.lang:java.io |
| 3746 | .fl |
| 3747 | \fP |
| 3748 | .fi |
| 3749 | The following example omits package qualifiers starting with "java", and "com.sun" subpackages (but not "javax"): |
| 3750 | .nf |
| 3751 | \f3 |
| 3752 | .fl |
| 3753 | \-noqualifier java.*:com.sun.* |
| 3754 | .fl |
| 3755 | \fP |
| 3756 | .fi |
| 3757 | Where a package qualifier would appear due to the above behavior, the name can be suitably shortened \-\- see How a name is displayed. This rule is in effect whether or not \f2\-noqualifier\fP is used. |
| 3758 | .TP 3 |
| 3759 | \-notimestamp\ |
| 3760 | Suppresses the timestamp, which is hidden in an HTML comment in the generated HTML near the top of each page. Useful when you want to run javadoc on two source bases and diff them, as it prevents timestamps from causing a diff (which would otherwise be a diff on every page). The timestamp includes the javadoc version number, and currently looks like this: |
| 3761 | .nf |
| 3762 | \f3 |
| 3763 | .fl |
| 3764 | <!\-\- Generated by javadoc (build 1.5.0_01) on Thu Apr 02 14:04:52 IST 2009 \-\-> |
| 3765 | .fl |
| 3766 | \fP |
| 3767 | .fi |
| 3768 | .TP 3 |
| 3769 | \-nocomment\ |
| 3770 | Suppress the entire comment body, including the main description and all tags, generating only declarations. This option enables re\-using source files originally intended for a different purpose, to produce skeleton HTML documentation at the early stages of a new project. |
| 3771 | .TP 3 |
| 3772 | \-sourcetab tabLength |
| 3773 | Specify the number of spaces each tab takes up in the source. |
| 3774 | .RE |
| 3775 | .SH "COMMAND LINE ARGUMENT FILES" |
| 3776 | .LP |
| 3777 | To shorten or simplify the javadoc command line, you can specify one or more files that themselves contain arguments to the \f2javadoc\fP command (except \f2\-J\fP options). This enables you to create javadoc commands of any length on any operating system. |
| 3778 | .LP |
| 3779 | An argument file can include javac options and source filenames in any combination. The arguments within a file can be space\-separated or newline\-separated. If a filename contains embedded spaces, put the whole filename in double quotes. |
| 3780 | .LP |
| 3781 | Filenames within an argument file are relative to the current directory, not the location of the argument file. Wildcards (*) are not allowed in these lists (such as for specifying \f2*.java\fP). Use of the '\f2@\fP' character to recursively interpret files is not supported. The \f2\-J\fP options are not supported because they are passed to the launcher, which does not support argument files. |
| 3782 | .LP |
| 3783 | When executing javadoc, pass in the path and name of each argument file with the '\f2@\fP' leading character. When javadoc encounters an argument beginning with the character `\f2@\fP', it expands the contents of that file into the argument list. |
| 3784 | .SS |
| 3785 | Example \- Single Arg File |
| 3786 | .LP |
| 3787 | You could use a single argument file named "\f2argfile\fP" to hold all Javadoc arguments: |
| 3788 | .nf |
| 3789 | \f3 |
| 3790 | .fl |
| 3791 | % \fP\f3javadoc @argfile\fP |
| 3792 | .fl |
| 3793 | .fi |
| 3794 | .LP |
| 3795 | This argument file could contain the contents of both files shown in the next example. |
| 3796 | .SS |
| 3797 | Example \- Two Arg Files |
| 3798 | .LP |
| 3799 | You can create two argument files \-\- one for the Javadoc options and the other for the package names or source filenames: (Notice the following lists have no line\-continuation characters.) |
| 3800 | .LP |
| 3801 | Create a file named "\f2options\fP" containing: |
| 3802 | .nf |
| 3803 | \f3 |
| 3804 | .fl |
| 3805 | \-d docs\-filelist |
| 3806 | .fl |
| 3807 | \-use |
| 3808 | .fl |
| 3809 | \-splitindex |
| 3810 | .fl |
| 3811 | \-windowtitle 'Java SE 7 API Specification' |
| 3812 | .fl |
| 3813 | \-doctitle 'Java SE 7 API Specification' |
| 3814 | .fl |
| 3815 | \-header '<b>Java(TM) SE 7</b>' |
| 3816 | .fl |
| 3817 | \-bottom 'Copyright © 1993\-2011 Oracle and/or its affiliates. All rights reserved.' |
| 3818 | .fl |
| 3819 | \-group "Core Packages" "java.*" |
| 3820 | .fl |
| 3821 | \-overview /java/pubs/ws/1.7.0/src/share/classes/overview\-core.html |
| 3822 | .fl |
| 3823 | \-sourcepath /java/pubs/ws/1.7.0/src/share/classes |
| 3824 | .fl |
| 3825 | \fP |
| 3826 | .fi |
| 3827 | .LP |
| 3828 | Create a file named "\f2packages\fP" containing: |
| 3829 | .nf |
| 3830 | \f3 |
| 3831 | .fl |
| 3832 | com.mypackage1 |
| 3833 | .fl |
| 3834 | com.mypackage2 |
| 3835 | .fl |
| 3836 | com.mypackage3 |
| 3837 | .fl |
| 3838 | \fP |
| 3839 | .fi |
| 3840 | .LP |
| 3841 | You would then run javadoc with: |
| 3842 | .nf |
| 3843 | \f3 |
| 3844 | .fl |
| 3845 | % \fP\f3javadoc @options @packages\fP |
| 3846 | .fl |
| 3847 | .fi |
| 3848 | .SS |
| 3849 | Example \- Arg Files with Paths |
| 3850 | .LP |
| 3851 | The argument files can have paths, but any filenames inside the files are relative to the current working directory (not \f2path1\fP or \f2path2\fP): |
| 3852 | .nf |
| 3853 | \f3 |
| 3854 | .fl |
| 3855 | % \fP\f3javadoc @path1/options @path2/packages\fP |
| 3856 | .fl |
| 3857 | .fi |
| 3858 | .SS |
| 3859 | Example \- Option Arguments |
| 3860 | .LP |
| 3861 | Here's an example of saving just an argument to a javadoc option in an argument file. We'll use the \f2\-bottom\fP option, since it can have a lengthy argument. You could create a file named "\f2bottom\fP" containing its text argument: |
| 3862 | .nf |
| 3863 | \f3 |
| 3864 | .fl |
| 3865 | <font size="\-1"> |
| 3866 | .fl |
| 3867 | <a href="http://bugreport.sun.com/bugreport/">Submit a bug or feature</a><br/> |
| 3868 | .fl |
| 3869 | Copyright © 1993, 2011, Oracle and/or its affiliates. All rights reserved.<br/> |
| 3870 | .fl |
| 3871 | Oracle is a registered trademark of Oracle Corporation and/or its affiliates. |
| 3872 | .fl |
| 3873 | Other names may be trademarks of their respective owners.</font> |
| 3874 | .fl |
| 3875 | \fP |
| 3876 | .fi |
| 3877 | .LP |
| 3878 | Then run the Javadoc tool with: |
| 3879 | .nf |
| 3880 | \f3 |
| 3881 | .fl |
| 3882 | % \fP\f3javadoc \-bottom @bottom @packages\fP |
| 3883 | .fl |
| 3884 | .fi |
| 3885 | .LP |
| 3886 | Or you could include the \f2\-bottom\fP option at the start of the argument file, and then just run it as: |
| 3887 | .nf |
| 3888 | \f3 |
| 3889 | .fl |
| 3890 | % \fP\f3javadoc @bottom @packages\fP |
| 3891 | .fl |
| 3892 | .fi |
| 3893 | .SH "Name" |
| 3894 | Running |
| 3895 | .SH "RUNNING JAVADOC" |
| 3896 | .LP |
| 3897 | \f3Version Numbers\fP \- The version number of javadoc can be determined using \f3javadoc \-J\-version\fP. The version number of the standard doclet appears in its output stream. It can be turned off with \f2\-quiet\fP. |
| 3898 | .LP |
| 3899 | \f3Public programmatic interface\fP \- To invoke the Javadoc tool from within programs written in the Java language. This interface is in \f2com.sun.tools.javadoc.Main\fP (and javadoc is re\-entrant). For more details, see |
| 3900 | .na |
| 3901 | \f2Standard Doclet\fP @ |
| 3902 | .fi |
| 3903 | http://download.oracle.com/javase/7/docs/technotes/guides/javadoc/standard\-doclet.html#runningprogrammatically. |
| 3904 | .LP |
| 3905 | \f3Running Doclets\fP \- The instructions given below are for invoking the standard HTML doclet. To invoke a custom doclet, use the \-doclet and \-docletpath options. For full, working examples of running a particular doclet, see the |
| 3906 | .na |
| 3907 | \f2MIF Doclet documentation\fP @ |
| 3908 | .fi |
| 3909 | http://java.sun.com/j2se/javadoc/mifdoclet/docs/mifdoclet.html. |
| 3910 | .SH "SIMPLE EXAMPLES" |
| 3911 | .LP |
| 3912 | You can run javadoc on entire packages or individual source files. Each package name has a corresponding directory name. In the following examples, the source files are located at \f2/home/src/java/awt/*.java\fP. The destination directory is \f2/home/html\fP. |
| 3913 | .SS |
| 3914 | Documenting One or More Packages |
| 3915 | .LP |
| 3916 | To document a package, the source files (\f2*.java\fP) for that package must be located in a directory having the same name as the package. If a package name is made up of several identifiers (separated by dots, such as \f2java.awt.color\fP), each subsequent identifier must correspond to a deeper subdirectory (such as \f2java/awt/color\fP). You may split the source files for a single package among two such directory trees located at different places, as long as \f2\-sourcepath\fP points to them both \-\- for example \f2src1/java/awt/color\fP and \f2src2/java/awt/color\fP. |
| 3917 | .LP |
| 3918 | You can run javadoc either by changing directories (with \f2cd\fP) or by using \f2\-sourcepath\fP option. The examples below illustrate both alternatives. |
| 3919 | .RS 3 |
| 3920 | .TP 2 |
| 3921 | o |
| 3922 | \f3Case 1 \- Run recursively starting from one or more packages\fP \- This example uses \-sourcepath so javadoc can be run from any directory and \-subpackages (a new 1.4 option) for recursion. It traverses the subpackages of the \f2java\fP directory excluding packages rooted at \f2java.net\fP and \f2java.lang\fP. Notice this excludes \f2java.lang.ref\fP, a subpackage of \f2java.lang\fP). |
| 3923 | .nf |
| 3924 | \f3 |
| 3925 | .fl |
| 3926 | % \fP\f3javadoc \fP\f3\-d\fP\f3 /home/html \fP\f3\-sourcepath\fP\f3 /home/src \fP\f3\-subpackages\fP\f3 java \fP\f3\-exclude\fP\f3 java.net:java.lang\fP |
| 3927 | .fl |
| 3928 | .fi |
| 3929 | .LP |
| 3930 | To also traverse down other package trees, append their names to the \f2\-subpackages\fP argument, such as \f2java:javax:org.xml.sax\fP. |
| 3931 | .TP 2 |
| 3932 | o |
| 3933 | \f3Case 2 \- Run on explicit packages after changing to the "root" source directory\fP \- Change to the parent directory of the fully\-qualified package. Then run javadoc, supplying names of one or more packages you want to document: |
| 3934 | .nf |
| 3935 | \f3 |
| 3936 | .fl |
| 3937 | % \fP\f3cd /home/src/\fP |
| 3938 | .fl |
| 3939 | % \f3javadoc \-d /home/html java.awt java.awt.event\fP |
| 3940 | .fl |
| 3941 | .fi |
| 3942 | .TP 2 |
| 3943 | o |
| 3944 | \f3Case 3 \- Run from any directory on explicit packages in a single directory tree\fP \- In this case, it doesn't matter what the current directory is. Run javadoc supplying \f2\-sourcepath\fP with the parent directory of the top\-level package, and supplying names of one or more packages you want to document: |
| 3945 | .nf |
| 3946 | \f3 |
| 3947 | .fl |
| 3948 | % \fP\f3javadoc \-d /home/html \-sourcepath /home/src java.awt java.awt.event\fP |
| 3949 | .fl |
| 3950 | .fi |
| 3951 | .TP 2 |
| 3952 | o |
| 3953 | \f3Case 4 \- Run from any directory on explicit packages in multiple directory trees\fP \- This is the same as case 3, but for packages in separate directory trees. Run javadoc supplying \f2\-sourcepath\fP with the path to each tree's root (colon\-separated) and supply names of one or more packages you want to document. All source files for a given package do not need to be located under a single root directory \-\- they just need to be found somewhere along the sourcepath. |
| 3954 | .nf |
| 3955 | \f3 |
| 3956 | .fl |
| 3957 | % \fP\f3javadoc \-d /home/html \-sourcepath /home/src1:/home/src2 java.awt java.awt.event\fP |
| 3958 | .fl |
| 3959 | .fi |
| 3960 | .RE |
| 3961 | .LP |
| 3962 | Result: All cases generate HTML\-formatted documentation for the public and protected classes and interfaces in packages \f2java.awt\fP and \f2java.awt.event\fP and save the HTML files in the specified destination directory (\f2/home/html\fP). Because two or more packages are being generated, the document has three HTML frames \-\- for the list of packages, the list of classes, and the main class pages. |
| 3963 | .SS |
| 3964 | Documenting One or More Classes |
| 3965 | .LP |
| 3966 | The second way to run the Javadoc tool is by passing in one or more source files (\f2.java\fP). You can run javadoc either of the following two ways \-\- by changing directories (with \f2cd\fP) or by fully\-specifying the path to the \f2.java\fP files. Relative paths are relative to the current directory. The \f2\-sourcepath\fP option is ignored when passing in source files. You can use command line wildcards, such as asterisk (*), to specify groups of classes. |
| 3967 | .RS 3 |
| 3968 | .TP 2 |
| 3969 | o |
| 3970 | \f3Case 1 \- Changing to the source directory\fP \- Change to the directory holding the \f2.java\fP files. Then run javadoc, supplying names of one or more source files you want to document. |
| 3971 | .nf |
| 3972 | \f3 |
| 3973 | .fl |
| 3974 | % \fP\f3cd /home/src/java/awt\fP |
| 3975 | .fl |
| 3976 | % \f3javadoc \-d /home/html Button.java Canvas.java Graphics*.java\fP |
| 3977 | .fl |
| 3978 | .fi |
| 3979 | This example generates HTML\-formatted documentation for the classes \f2Button\fP, \f2Canvas\fP and classes beginning with \f2Graphics\fP. Because source files rather than package names were passed in as arguments to javadoc, the document has two frames \-\- for the list of classes and the main page. |
| 3980 | .TP 2 |
| 3981 | o |
| 3982 | \f3Case 2 \- Changing to the package root directory\fP \- This is useful for documenting individual source files from different subpackages off the same root. Change to the package root directory, and supply the source files with paths from the root. |
| 3983 | .nf |
| 3984 | \f3 |
| 3985 | .fl |
| 3986 | % \fP\f3cd /home/src/\fP |
| 3987 | .fl |
| 3988 | % \f3javadoc \-d /home/html java/awt/Button.java java/applet/Applet.java\fP |
| 3989 | .fl |
| 3990 | .fi |
| 3991 | This example generates HTML\-formatted documentation for the classes \f2Button\fP and \f2Applet\fP. |
| 3992 | .TP 2 |
| 3993 | o |
| 3994 | \f3Case 3 \- From any directory\fP \- In this case, it doesn't matter what the current directory is. Run javadoc supplying the absolute path (or path relative to the current directory) to the \f2.java\fP files you want to document. |
| 3995 | .nf |
| 3996 | \f3 |
| 3997 | .fl |
| 3998 | % \fP\f3javadoc \-d /home/html /home/src/java/awt/Button.java /home/src/java/awt/Graphics*.java\fP |
| 3999 | .fl |
| 4000 | .fi |
| 4001 | This example generates HTML\-formatted documentation for the class \f2Button\fP and classes beginning with \f2Graphics\fP. |
| 4002 | .RE |
| 4003 | .SS |
| 4004 | Documenting Both Packages and Classes |
| 4005 | .LP |
| 4006 | You can document entire packages and individual classes at the same time. Here's an example that mixes two of the previous examples. You can use \f2\-sourcepath\fP for the path to the packages but not for the path to the individual classes. |
| 4007 | .nf |
| 4008 | \f3 |
| 4009 | .fl |
| 4010 | % \fP\f3javadoc \-d /home/html \-sourcepath /home/src java.awt /home/src/java/applet/Applet.java\fP |
| 4011 | .fl |
| 4012 | .fi |
| 4013 | .LP |
| 4014 | This example generates HTML\-formatted documentation for the package \f2java.awt\fP and class \f2Applet\fP. (The Javadoc tool determines the package name for \f2Applet\fP from the package declaration, if any, in the \f2Applet.java\fP source file.) |
| 4015 | .SH "REAL WORLD EXAMPLE" |
| 4016 | .LP |
| 4017 | The Javadoc tool has many useful options, some of which are more commonly used than others. Here is effectively the command we use to run the Javadoc tool on the Java platform API. We use 180MB of memory to generate the documentation for the 1500 (approx.) public and protected classes in the Java SE Platform, Standard Edition, v1.2. |
| 4018 | .LP |
| 4019 | The same example is shown twice \-\- first as executed on the command line, then as executed from a makefile. It uses absolute paths in the option arguments, which enables the same \f2javadoc\fP command to be run from any directory. |
| 4020 | .SS |
| 4021 | Command Line Example |
| 4022 | .LP |
| 4023 | The following example may be too long for some shells such as DOS. You can use a command line argument file (or write a shell script) to workaround this limitation. |
| 4024 | .nf |
| 4025 | \f3 |
| 4026 | .fl |
| 4027 | % javadoc \-sourcepath /java/jdk/src/share/classes \\ |
| 4028 | .fl |
| 4029 | \-overview /java/jdk/src/share/classes/overview.html \\ |
| 4030 | .fl |
| 4031 | \-d /java/jdk/build/api \\ |
| 4032 | .fl |
| 4033 | \-use \\ |
| 4034 | .fl |
| 4035 | \-splitIndex \\ |
| 4036 | .fl |
| 4037 | \-windowtitle 'Java Platform, Standard Edition 7 API Specification' \\ |
| 4038 | .fl |
| 4039 | \-doctitle 'Java Platform, Standard Edition 7 API Specification' \\ |
| 4040 | .fl |
| 4041 | \-header '<b>Java(TM) SE 7</b>' \\ |
| 4042 | .fl |
| 4043 | \-bottom '<font size="\-1"> |
| 4044 | .fl |
| 4045 | <a href="http://bugreport.sun.com/bugreport/">Submit a bug or feature</a><br/> |
| 4046 | .fl |
| 4047 | Copyright © 1993, 2011, Oracle and/or its affiliates. All rights reserved.<br/> |
| 4048 | .fl |
| 4049 | Oracle is a registered trademark of Oracle Corporation and/or its affiliates. |
| 4050 | .fl |
| 4051 | Other names may be trademarks of their respective owners.</font>' \\ |
| 4052 | .fl |
| 4053 | \-group "Core Packages" "java.*:com.sun.java.*:org.omg.*" \\ |
| 4054 | .fl |
| 4055 | \-group "Extension Packages" "javax.*" \\ |
| 4056 | .fl |
| 4057 | \-J\-Xmx180m \\ |
| 4058 | .fl |
| 4059 | @packages |
| 4060 | .fl |
| 4061 | \fP |
| 4062 | .fi |
| 4063 | .LP |
| 4064 | where \f2packages\fP is the name of a file containing the packages to process, such as \f2java.applet java.lang\fP. None of the options should contain any newline characters between the single quotes. (For example, if you copy and paste this example, delete the newline characters from the \f2\-bottom\fP option.) See the other notes listed below. |
| 4065 | .SS |
| 4066 | Makefile Example |
| 4067 | .LP |
| 4068 | This is an example of a GNU makefile. For an example of a Windows makefile, see |
| 4069 | .na |
| 4070 | \f2creating a makefile for Windows\fP @ |
| 4071 | .fi |
| 4072 | http://java.sun.com/j2se/javadoc/faq/index.html#makefiles. |
| 4073 | .nf |
| 4074 | \f3 |
| 4075 | .fl |
| 4076 | javadoc \-\fP\f3sourcepath\fP\f3 $(SRCDIR) \\ /* Sets path for source files */ |
| 4077 | .fl |
| 4078 | \-\fP\f3overview\fP\f3 $(SRCDIR)/overview.html \\ /* Sets file for overview text */ |
| 4079 | .fl |
| 4080 | \-\fP\f3d\fP\f3 /java/jdk/build/api \\ /* Sets destination directory */ |
| 4081 | .fl |
| 4082 | \-\fP\f3use\fP\f3 \\ /* Adds "Use" files */ |
| 4083 | .fl |
| 4084 | \-\fP\f3splitIndex\fP\f3 \\ /* Splits index A\-Z */ |
| 4085 | .fl |
| 4086 | \-\fP\f3windowtitle\fP\f3 $(WINDOWTITLE) \\ /* Adds a window title */ |
| 4087 | .fl |
| 4088 | \-\fP\f3doctitle\fP\f3 $(DOCTITLE) \\ /* Adds a doc title */ |
| 4089 | .fl |
| 4090 | \-\fP\f3header\fP\f3 $(HEADER) \\ /* Adds running header text */ |
| 4091 | .fl |
| 4092 | \-\fP\f3bottom\fP\f3 $(BOTTOM) \\ /* Adds text at bottom */ |
| 4093 | .fl |
| 4094 | \-\fP\f3group\fP\f3 $(GROUPCORE) \\ /* 1st subhead on overview page */ |
| 4095 | .fl |
| 4096 | \-\fP\f3group\fP\f3 $(GROUPEXT) \\ /* 2nd subhead on overview page */ |
| 4097 | .fl |
| 4098 | \-\fP\f3J\fP\f3\-Xmx180m \\ /* Sets memory to 180MB */ |
| 4099 | .fl |
| 4100 | java.lang java.lang.reflect \\ /* Sets packages to document */ |
| 4101 | .fl |
| 4102 | java.util java.io java.net \\ |
| 4103 | .fl |
| 4104 | java.applet |
| 4105 | .fl |
| 4106 | |
| 4107 | .fl |
| 4108 | WINDOWTITLE = 'Java(TM) SE 7 API Specification' |
| 4109 | .fl |
| 4110 | DOCTITLE = 'Java(TM) Platform Standard Edition 7 API Specification' |
| 4111 | .fl |
| 4112 | HEADER = '<b>Java(TM) SE 7</font>' |
| 4113 | .fl |
| 4114 | BOTTOM = '<font size="\-1"> |
| 4115 | .fl |
| 4116 | <a href="http://bugreport.sun.com/bugreport/">Submit a bug or feature</a><br/> |
| 4117 | .fl |
| 4118 | Copyright © 1993, 2011, Oracle and/or its affiliates. All rights reserved.<br/> |
| 4119 | .fl |
| 4120 | Oracle is a registered trademark of Oracle Corporation and/or its affiliates. |
| 4121 | .fl |
| 4122 | Other names may be trademarks of their respective owners.</font>' |
| 4123 | .fl |
| 4124 | GROUPCORE = '"Core Packages" "java.*:com.sun.java.*:org.omg.*"' |
| 4125 | .fl |
| 4126 | GROUPEXT = '"Extension Packages" "javax.*"' |
| 4127 | .fl |
| 4128 | SRCDIR = '/java/jdk/1.7.0/src/share/classes' |
| 4129 | .fl |
| 4130 | \fP |
| 4131 | .fi |
| 4132 | .LP |
| 4133 | Single quotes are used to surround makefile arguments. |
| 4134 | .LP |
| 4135 | \f3NOTES\fP |
| 4136 | .RS 3 |
| 4137 | .TP 2 |
| 4138 | o |
| 4139 | If you omit the \f2\-windowtitle\fP option, the Javadoc tool copies the doc title to the window title. The \f2\-windowtitle\fP text is basically the same as the \f2\-doctitle\fP but without HTML tags, to prevent those tags from appearing as raw text in the window title. |
| 4140 | .TP 2 |
| 4141 | o |
| 4142 | If you omit the \f2\-footer\fP option, as done here, the Javadoc tool copies the header text to the footer. |
| 4143 | .TP 2 |
| 4144 | o |
| 4145 | Other important options you might want to use but not needed in this example are \-\f2classpath\fP and \-\f2link\fP. |
| 4146 | .RE |
| 4147 | .SH "TROUBLESHOOTING" |
| 4148 | .SS |
| 4149 | General Troubleshooting |
| 4150 | .RS 3 |
| 4151 | .TP 2 |
| 4152 | o |
| 4153 | \f3Javadoc FAQ\fP \- Commonly\-encountered bugs and troubleshooting tips can be found on the |
| 4154 | .na |
| 4155 | \f2Javadoc FAQ\fP @ |
| 4156 | .fi |
| 4157 | http://java.sun.com/j2se/javadoc/faq/index.html#B |
| 4158 | .TP 2 |
| 4159 | o |
| 4160 | \f3Bugs and Limitations\fP \- You can also see some bugs listed at Important Bug Fixes and Changes. |
| 4161 | .TP 2 |
| 4162 | o |
| 4163 | \f3Version number\fP \- See version numbers. |
| 4164 | .TP 2 |
| 4165 | o |
| 4166 | \f3Documents only legal classes\fP \- When documenting a package, javadoc only reads files whose names are composed of legal class names. You can prevent javadoc from parsing a file by including, for example, a hyphen "\-" in its filename. |
| 4167 | .RE |
| 4168 | .SS |
| 4169 | Errors and Warnings |
| 4170 | .LP |
| 4171 | Error and warning messages contain the filename and line number to the declaration line rather than to the particular line in the doc comment. |
| 4172 | .RS 3 |
| 4173 | .TP 2 |
| 4174 | o |
| 4175 | \f2"error: cannot read: Class1.java"\fP the Javadoc tool is trying to load the class Class1.java in the current directory. The class name is shown with its path (absolute or relative), which in this case is the same as \f2./Class1.java\fP. |
| 4176 | .RE |
| 4177 | .SH "ENVIRONMENT" |
| 4178 | .RS 3 |
| 4179 | .TP 3 |
| 4180 | CLASSPATH |
| 4181 | Environment variable that provides the path which javadoc uses to find user class files. This environment variable is overridden by the \f2\-classpath\fP option. Separate directories with a colon, for example: |
| 4182 | .:/home/classes:/usr/local/java/classes |
| 4183 | .RE |
| 4184 | .SH "SEE ALSO" |
| 4185 | .RS 3 |
| 4186 | .TP 2 |
| 4187 | o |
| 4188 | javac(1) |
| 4189 | .TP 2 |
| 4190 | o |
| 4191 | java(1) |
| 4192 | .TP 2 |
| 4193 | o |
| 4194 | jdb(1) |
| 4195 | .TP 2 |
| 4196 | o |
| 4197 | javah(1) |
| 4198 | .TP 2 |
| 4199 | o |
| 4200 | javap(1) |
| 4201 | .TP 2 |
| 4202 | o |
| 4203 | .na |
| 4204 | \f2Javadoc Home Page\fP @ |
| 4205 | .fi |
| 4206 | http://www.oracle.com/technetwork/java/javase/documentation/index\-jsp\-135444.html |
| 4207 | .TP 2 |
| 4208 | o |
| 4209 | .na |
| 4210 | \f2How to Write Doc Comments for Javadoc\fP @ |
| 4211 | .fi |
| 4212 | http://www.oracle.com/technetwork/java/javase/documentation/index\-137868.html |
| 4213 | .TP 2 |
| 4214 | o |
| 4215 | .na |
| 4216 | \f2Setting the Class Path\fP @ |
| 4217 | .fi |
| 4218 | http://download.oracle.com/javase/7/docs/technotes/tools/index.html#general |
| 4219 | .TP 2 |
| 4220 | o |
| 4221 | .na |
| 4222 | \f2How Javac and Javadoc Find Classes\fP @ |
| 4223 | .fi |
| 4224 | http://download.oracle.com/javase/7/docs/technotes/tools/findingclasses.html#srcfiles (tools.jar) |
| 4225 | .RE |
| 4226 | |