blob: e4332a15de0b62184a8514bcdbf9c4b2a9b746a1 [file] [log] [blame]
J. Duke319a3b92007-12-01 00:00:00 +00001.'" t
2."
3." Copyright 2000-2006 Sun Microsystems, Inc. All Rights Reserved.
4." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5."
6." This code is free software; you can redistribute it and/or modify it
7." under the terms of the GNU General Public License version 2 only, as
8." published by the Free Software Foundation.
9."
10." This code is distributed in the hope that it will be useful, but WITHOUT
11." ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12." FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
13." version 2 for more details (a copy is included in the LICENSE file that
14." accompanied this code).
15."
16." You should have received a copy of the GNU General Public License version
17." 2 along with this work; if not, write to the Free Software Foundation,
18." Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
19."
20." Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
21." CA 95054 USA or visit www.sun.com if you need additional information or
22." have any questions.
23."
24." `
25.TH javadoc 1 "07 Aug 2006"
26." Generated by html2man
27.SH NAME
28javadoc \- The Java API Documentation Generator
29.RS 3
30
31.LP
32.LP
33Generates HTML pages of API documentation from Java source files. This document contains Javadoc examples for Sun Solaris.
34.LP
35.RE
36.SH "SYNOPSIS"
37.LP
38.LP
39\f4javadoc\fP\f2\ [\ \fP\f2options\fP\f2\ ]\ [\ packagenames\ ]\ [\ sourcefilenames\ ]\ [\ \-subpackages\fP\ \f2pkg1:pkg2:...\fP\f2\ ]\ [\ \fP\f2@argfiles\fP\f2\ ]\fP
40.LP
41.LP
42Arguments 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.
43.LP
44.RS 3
45
46.LP
47.RS 3
48.TP 3
49options
50Command\-line options, as specified in this document. To see a typical use of javadoc options, see Real\-World Example.
51.TP 3
52packagenames
53A 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
54.TP 3
55sourcefilenames
56A 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
57.na
58\f2Identifiers\fP @
59.fi
60http://java.sun.com/docs/books/jls/second_edition/html/lexical.doc.html#40625). 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
61.TP 3
62\-subpackages pkg1:pkg2:...
63Generates documentation from source files in the specified packages and recursively in their subpackages. An alternative to supplying packagenames or sourcefilenames.
64.TP 3
65@argfiles
66One 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.
67.RE
68
69.LP
70.RE
71.SH "DESCRIPTION"
72.LP
73.LP
74The \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.
75.LP
76.LP
77You 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.
78.LP
79.SS
80Processing of source files
81.LP
82.LP
83The 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:
84.LP
85.RS 3
86.TP 2
87o
88Its name, after stripping off the "\f2.java\fP" suffix, is actually a legal class name (see
89.na
90\f2Identifiers\fP @
91.fi
92http://java.sun.com/docs/books/jls/second_edition/html/lexical.doc.html#40625 for legal characters)
93.TP 2
94o
95Its directory path relative to the root of the source tree is actually a legal package name (after converting its separators to dots)
96.TP 2
97o
98Its package statement contains the legal package name (specified in the previous bullet)
99.RE
100
101.LP
102.LP
103\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:
104.LP
105.RS 3
106.TP 2
107o
108Declarations (return types, argument types, field types)
109.TP 2
110o
111"See Also" sections generated from \f2@see\fP tags
112.TP 2
113o
114In\-line text generated from \f2{@link}\fP tags
115.TP 2
116o
117Exception names generated from \f2@throws\fP tags
118.TP 2
119o
120"Specified by" links to members in interfaces and "Overrides" links to members in classes
121.TP 2
122o
123Summary tables listing packages, classes and members
124.TP 2
125o
126Package and class inheritance trees
127.TP 2
128o
129The index
130.RE
131
132.LP
133.LP
134You 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.
135.LP
136.LP
137\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.
138.LP
139.LP
140As 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.
141.LP
142.LP
143In 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.
144.LP
145.LP
146Relying 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
147.na
148\f2default constructors\fP @
149.fi
150http://java.sun.com/docs/books/jls/second_edition/html/names.doc.html#36154 (section 8.6.7 of \f2Java Language Specification\fP) that are present in the \f2.class\fP files but not in the source code.
151.LP
152.LP
153In 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.
154.LP
155.LP
156When 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 How Classes Are Found. Generally speaking, classes you create must either be loaded as an extension or in the Javadoc tool's class path.
157.LP
158.SS
159Javadoc Doclets
160.LP
161.LP
162You 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:
163.LP
164.RS 3
165.TP 2
166o
167Javadoc Doclets
168.TP 2
169o
170The \f2\-doclet\fP command\-line option
171.RE
172
173.LP
174.LP
175When 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.
176.LP
177.SS
178Related Documentation and Doclets
179.LP
180.RS 3
181.TP 2
182o
183Javadoc Enhancements for details about improvements added in Javadoc.
184.TP 2
185o
186.na
187\f2Javadoc FAQ\fP @
188.fi
189http://java.sun.com/j2se/javadoc/faq/index.html for answers to common questions, information about Javadoc\-related tools, and workarounds for bugs.
190.TP 2
191o
192.na
193\f2How to Write Doc Comments for Javadoc\fP @
194.fi
195http://java.sun.com/j2se/javadoc/writingdoccomments/index.html for more information about Sun conventions for writing documentation comments.
196.TP 2
197o
198.na
199\f2Requirements for Writing API Specifications\fP @
200.fi
201http://java.sun.com/j2se/javadoc/writingapispecs/index.html \- Standard requirements used when writing the Java 2 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.
202.TP 2
203o
204.na
205\f2Documentation Comment Specification\fP @
206.fi
207http://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.)
208.TP 2
209o
210.na
211\f2DocCheck Doclet\fP @
212.fi
213http://java.sun.com/javadoc/doccheck \- Checks doc comments in source files and generates a report listing the errors and irregularities it finds. It is part of the Sun Doc Check Utilities.
214.TP 2
215o
216.na
217\f2MIF Doclet\fP @
218.fi
219http://java.sun.com/javadoc/mifdoclet \- Can automate the generation of API documentation in MIF, FrameMaker and PDF formats. MIF is Adobe FrameMaker's interchange format.
220.RE
221
222.LP
223.SS
224Terminology
225.LP
226.LP
227The 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:
228.LP
229.RS 3
230.TP 3
231generated document
232The 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.
233.LP
234.TP 3
235name
236A 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.
237.LP
238.TP 3
239documented classes
240The 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.
241.LP
242.TP 3
243included classes
244Classes and interfaces whose details are documented during a run of the Javadoc tool. Same as \f2documented classes\fP.
245.LP
246.TP 3
247excluded classes
248Classes and interfaces whose details are \f2not\fP documented during a run of the Javadoc tool.
249.LP
250.TP 3
251referenced classes
252The 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
253.na
254\f21.3\fP @
255.fi
256http://java.sun.com/j2se/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.
257.LP
258.TP 3
259external referenced classes
260The 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.
261.RE
262
263.LP
264.SH "SOURCE FILES"
265.LP
266.LP
267The 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.
268.LP
269.SS
270Class Source Code Files
271.LP
272.LP
273Each 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.
274.LP
275.SS
276Package Comment Files
277.LP
278.LP
279Each 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.
280.LP
281.LP
282To create a package comment file, you have a choice of two files to place your comments:
283.LP
284.RS 3
285.TP 2
286o
287\f2package\-info.java\fP \- Can contain a package declaration, package annotations, package comments and Javadoc tags. This file is new in JDK 5.0, and is preferred over package.html.
288.TP 2
289o
290\f2package.html\fP \- Can contain only package comments and Javadoc tags, no package annotations.
291.RE
292
293.LP
294.LP
295A 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.
296.LP
297.LP
298\f4package\-info.java\fP This file can contain a package comment of the following structure \-\- the comment is placed before the package declaration:
299.LP
300.LP
301File: \f2java/applet/package\-info.java\fP
302.LP
303.LP
304.TS
305.if \n+(b.=1 .nr d. \n(.c-\n(c.-1
306.de 35
307.ps \n(.s
308.vs \n(.vu
309.in \n(.iu
310.if \n(.u .fi
311.if \n(.j .ad
312.if \n(.j=0 .na
313..
314.nf
315.nr #~ 0
316.if n .nr #~ 0.6n
317.ds #d .d
318.if \(ts\n(.z\(ts\(ts .ds #d nl
319.fc
320.nr 33 \n(.s
321.rm 80
322.nr 34 \n(.lu
323.eo
324.am 80
325.br
326.di a+
327.35
328.ft \n(.f
329.ll \n(34u*1u/2u
330.if \n(.l<\n(80 .ll \n(80u
331.in 0
332.nf
333\f3
334.fl
335/**
336.fl
337 * Provides the classes necessary to create an
338.fl
339 * applet and the classes an applet uses
340.fl
341 * to communicate with its applet context.
342.fl
343 * <p>
344.fl
345 * The applet framework involves two entities:
346.fl
347 * the applet and the applet context.
348.fl
349 * An applet is an embeddable window (see the
350.fl
351 * {@link java.awt.Panel} class) with a few extra
352.fl
353 * methods that the applet context can use to
354.fl
355 * initialize, start, and stop the applet.
356.fl
357 *
358.fl
359 * @since 1.0
360.fl
361 * @see java.awt
362.fl
363 */
364.fl
365package java.lang.applet;
366.fl
367\fP
368.fi
369.br
370.di
371.nr a| \n(dn
372.nr a- \n(dl
373..
374.ec \
375.35
376.nf
377.ll \n(34u
378.nr 80 0
379.80
380.rm 80
381.nr 38 \n(a-
382.if \n(80<\n(38 .nr 80 \n(38
383.35
384.nf
385.ll \n(34u
386.nr 38 1n
387.nr 79 0
388.nr 40 \n(79+(0*\n(38)
389.nr 80 +\n(40
390.nr TW \n(80
391.if t .if \n(TW>\n(.li .tm Table at line 326 file Input is too wide - \n(TW units
392.fc  
393.nr #T 0-1
394.nr #a 0-1
395.eo
396.de T#
397.ds #d .d
398.if \(ts\n(.z\(ts\(ts .ds #d nl
399.mk ##
400.nr ## -1v
401.ls 1
402.ls
403..
404.ec
405.ne \n(a|u+\n(.Vu
406.if (\n(a|+\n(#^-1v)>\n(#- .nr #- +(\n(a|+\n(#^-\n(#--1v)
407.ta \n(80u
408.nr 31 \n(.f
409.nr 35 1m
410\&\h'|\n(40u'
411.mk ##
412.nr 31 \n(##
413.sp |\n(##u-1v
414.nr 37 \n(40u
415.in +\n(37u
416.a+
417.in -\n(37u
418.mk 32
419.if \n(32>\n(31 .nr 31 \n(32
420.sp |\n(31u
421.fc
422.nr T. 1
423.T# 1
424.35
425.rm a+
426.TE
427.if \n-(b.=0 .nr c. \n(.c-\n(d.-42
428
429.LP
430.LP
431Note that while the comment separators \f2/**\fP and \f2/*\fP must be present, the leading asterisks on the intermediate lines can be omitted.
432.LP
433.LP
434\f4package.html\fP \- This file can contain a package comment of the following structure \-\- the comment is placed in the \f2<body>\fP element:
435.LP
436.LP
437File: \f2java/applet/package.html\fP
438.LP
439.LP
440.TS
441.if \n+(b.=1 .nr d. \n(.c-\n(c.-1
442.de 35
443.ps \n(.s
444.vs \n(.vu
445.in \n(.iu
446.if \n(.u .fi
447.if \n(.j .ad
448.if \n(.j=0 .na
449..
450.nf
451.nr #~ 0
452.if n .nr #~ 0.6n
453.ds #d .d
454.if \(ts\n(.z\(ts\(ts .ds #d nl
455.fc
456.nr 33 \n(.s
457.rm 80
458.nr 34 \n(.lu
459.eo
460.am 80
461.br
462.di a+
463.35
464.ft \n(.f
465.ll \n(34u*1u/2u
466.if \n(.l<\n(80 .ll \n(80u
467.in 0
468.nf
469\f3
470.fl
471<HTML>
472.fl
473<BODY>
474.fl
475Provides the classes necessary to create an applet and the
476.fl
477classes an applet uses to communicate with its applet context.
478.fl
479<p>
480.fl
481The applet framework involves two entities: the applet
482.fl
483and the applet context. An applet is an embeddable
484.fl
485window (see the {@link java.awt.Panel} class) with a
486.fl
487few extra methods that the applet context can use to
488.fl
489initialize, start, and stop the applet.
490.fl
491
492.fl
493@since 1.0
494.fl
495@see java.awt
496.fl
497</BODY>
498.fl
499</HTML>
500.fl
501\fP
502.fi
503.br
504.di
505.nr a| \n(dn
506.nr a- \n(dl
507..
508.ec \
509.35
510.nf
511.ll \n(34u
512.nr 80 0
513.80
514.rm 80
515.nr 38 \n(a-
516.if \n(80<\n(38 .nr 80 \n(38
517.35
518.nf
519.ll \n(34u
520.nr 38 1n
521.nr 79 0
522.nr 40 \n(79+(0*\n(38)
523.nr 80 +\n(40
524.nr TW \n(80
525.if t .if \n(TW>\n(.li .tm Table at line 379 file Input is too wide - \n(TW units
526.fc  
527.nr #T 0-1
528.nr #a 0-1
529.eo
530.de T#
531.ds #d .d
532.if \(ts\n(.z\(ts\(ts .ds #d nl
533.mk ##
534.nr ## -1v
535.ls 1
536.ls
537..
538.ec
539.ne \n(a|u+\n(.Vu
540.if (\n(a|+\n(#^-1v)>\n(#- .nr #- +(\n(a|+\n(#^-\n(#--1v)
541.ta \n(80u
542.nr 31 \n(.f
543.nr 35 1m
544\&\h'|\n(40u'
545.mk ##
546.nr 31 \n(##
547.sp |\n(##u-1v
548.nr 37 \n(40u
549.in +\n(37u
550.a+
551.in -\n(37u
552.mk 32
553.if \n(32>\n(31 .nr 31 \n(32
554.sp |\n(31u
555.fc
556.nr T. 1
557.T# 1
558.35
559.rm a+
560.TE
561.if \n-(b.=0 .nr c. \n(.c-\n(d.-40
562
563.LP
564.LP
565Notice 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
566.na
567\f2example of \fP\f2package.html\fP @
568.fi
569http://java.sun.com/j2se/javadoc/writingdoccomments/index.html#packagecomments.
570.LP
571.LP
572\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:
573.LP
574.RS 3
575.TP 2
576o
577Copies 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.)
578.TP 2
579o
580Processes any package tags that are present.
581.TP 2
582o
583Inserts the processed text at the bottom of the package summary page it generates, as shown in Package Summary.
584.TP 2
585o
586Copies 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 Overview Summary. The end\-of\-sentence is determined by the same rules used for the end of the first sentence of class and member main descriptions.
587.RE
588
589.LP
590.SS
591Overview Comment File
592.LP
593.LP
594Each 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.
595.LP
596.LP
597To 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.
598.LP
599.LP
600Notice 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.
601.LP
602.LP
603The 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.
604.LP
605.LP
606When 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.
607.LP
608.RS 3
609.TP 2
610o
611Copies all content between \f2<body>\fP and \f2</body>\fP tags for processing.
612.TP 2
613o
614Processes any overview tags that are present.
615.TP 2
616o
617Inserts the processed text at the bottom of the overview page it generates, as shown in Overview Summary.
618.TP 2
619o
620Copies the first sentence of the overview comment to the top of the overview summary page.
621.RE
622
623.LP
624.SS
625Miscellaneous Unprocessed Files
626.LP
627.LP
628You 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.
629.LP
630.LP
631To 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.
632.LP
633.LP
634All 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:
635.LP
636.nf
637\f3
638.fl
639 /**
640.fl
641 * This button looks like this:
642.fl
643 * <img src="doc\-files/Button.gif">
644.fl
645 */
646.fl
647\fP
648.fi
649
650.LP
651.SS
652Test Files and Template Files
653.LP
654.LP
655Some 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.
656.LP
657.LP
658If 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.
659.LP
660.LP
661Test files differ from template files in that the former are legal, compilable source files, while the latter are not, but may end with ".java".
662.LP
663.LP
664\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):
665.LP
666.nf
667\f3
668.fl
669 com/package1/test\-files/
670.fl
671\fP
672.fi
673
674.LP
675.LP
676The test directory will be skipped by the Javadoc tool with no warnings.
677.LP
678.LP
679If 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.
680.LP
681.LP
682\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
683.na
684\f2Identifiers\fP @
685.fi
686http://java.sun.com/docs/books/jls/second_edition/html/lexical.doc.html#40625).
687.LP
688.SH "GENERATED FILES"
689.LP
690.LP
691By 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.
692.LP
693.LP
694\f3Basic Content Pages\fP
695.LP
696.RS 3
697.TP 2
698o
699One \f3class or interface page\fP (\f2classname\fP\f2.html\fP) for each class or interface it is documenting.
700.TP 2
701o
702One \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.
703.TP 2
704o
705One \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.)
706.RE
707
708.LP
709.LP
710\f3Cross\-Reference Pages\fP
711.LP
712.RS 3
713.TP 2
714o
715One \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".
716.TP 2
717o
718One \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.
719.TP 2
720o
721One \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.
722.TP 2
723o
724A \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.)
725.TP 2
726o
727A \f3constant field values page\fP (\f2constant\-values.html\fP) for the values of static fields.
728.TP 2
729o
730A \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.
731.TP 2
732o
733An \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).
734.RE
735
736.LP
737.LP
738\f3Support Files\fP
739.LP
740.RS 3
741.TP 2
742o
743A \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.
744.TP 2
745o
746One \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.
747.TP 2
748o
749Several \f3frame files\fP (\f2*\-frame.html\fP) containing lists of packages, classes and interfaces, used when HTML frames are being displayed.
750.TP 2
751o
752A \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.
753.TP 2
754o
755A \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.
756.TP 2
757o
758A \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.
759.RE
760
761.LP
762.LP
763\f3HTML Frames\fP
764.LP
765.LP
766The 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.
767.LP
768.LP
769If 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.
770.LP
771.nf
772\f3
773.fl
774 \-\-\-\-\-\-\-\-\-\-\-\- \-\-\-\-\-\-\-\-\-\-\-\-
775.fl
776 |C| Detail | |P| Detail |
777.fl
778 | | | | | |
779.fl
780 | | | |\-| |
781.fl
782 | | | |C| |
783.fl
784 | | | | | |
785.fl
786 | | | | | |
787.fl
788 \-\-\-\-\-\-\-\-\-\-\-\- \-\-\-\-\-\-\-\-\-\-\-\-
789.fl
790 javadoc *.java javadoc java.lang java.awt
791.fl
792\fP
793.fi
794
795.LP
796.LP
797Load one of the following two files as the starting page depending on whether you want HTML frames or not:
798.LP
799.RS 3
800.TP 2
801o
802\f2index.html\fP (for frames)
803.TP 2
804o
805\f2overview\-summary.html\fP (for no frames)
806.RE
807
808.LP
809.LP
810\f3Generated File Structure\fP
811.LP
812.LP
813The 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.
814.LP
815.LP
816For 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.
817.LP
818.RS 3
819
820.LP
821.LP
822NOTE \- 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.
823.LP
824.RE
825.nf
826\f3
827.fl
828
829.fl
830\fP\f3apidocs\fP Top directory
831.fl
832 index.html Initial page that sets up HTML frames
833.fl
834 * overview\-summary.html Lists all packages with first sentence summaries
835.fl
836 overview\-tree.html Lists class hierarchy for all packages
837.fl
838 deprecated\-list.html Lists deprecated API for all packages
839.fl
840 constant\-values.html Lists values of static fields for all packages
841.fl
842 serialized\-form.html Lists serialized form for all packages
843.fl
844 * overview\-frame.html Lists all packages, used in upper\-left frame
845.fl
846 allclasses\-frame.html Lists all classes for all packages, used in lower\-left frame
847.fl
848 help\-doc.html Lists user help for how these pages are organized
849.fl
850 index\-all.html Default index created without \-splitindex option
851.fl
852 \f3index\-files\fP Directory created with \-splitindex option
853.fl
854 index\-<number>.html Index files created with \-splitindex option
855.fl
856 package\-list Lists package names, used only for resolving external refs
857.fl
858 stylesheet.css HTML style sheet for defining fonts, colors and positions
859.fl
860 \f3java\fP Package directory
861.fl
862 \f3applet\fP Subpackage directory
863.fl
864 Applet.html Page for Applet class
865.fl
866 AppletContext.html Page for AppletContext interface
867.fl
868 AppletStub.html Page for AppletStub interface
869.fl
870 AudioClip.html Page for AudioClip interface
871.fl
872 * package\-summary.html Lists classes with first sentence summaries for this package
873.fl
874 * package\-frame.html Lists classes in this package, used in lower left\-hand frame
875.fl
876 * package\-tree.html Lists class hierarchy for this package
877.fl
878 package\-use Lists where this package is used
879.fl
880 \f3doc\-files\fP Directory holding image and example files
881.fl
882 \f3class\-use\fP Directory holding pages API is used
883.fl
884 Applet.html Page for uses of Applet class
885.fl
886 AppletContext.html Page for uses of AppletContext interface
887.fl
888 AppletStub.html Page for uses of AppletStub interface
889.fl
890 AudioClip.html Page for uses of AudioClip interface
891.fl
892 \f3src\-html\fP Source code directory
893.fl
894 \f3java\fP Package directory
895.fl
896 \f3applet\fP Subpackage directory
897.fl
898 Applet.html Page for Applet source code
899.fl
900 AppletContext.html Page for AppletContext source code
901.fl
902 AppletStub.html Page for AppletStub source code
903.fl
904 AudioClip.html Page for AudioClip source code
905.fl
906.fi
907
908.LP
909.SS
910a name="generatedapideclarations"/> Generated API Declarations
911.LP
912.LP
913The 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:
914.LP
915.LP
916\f2public final class Boolean\fP
917.br
918\f2extends Object\fP
919.br
920\f2implements Serializable\fP
921.LP
922.LP
923and the declaration for the \f2Boolean.valueOf\fPmethod is:
924.LP
925.LP
926\f2public static Boolean valueOf(String s)\fP
927.LP
928.LP
929The 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.
930.LP
931.LP
932Rather 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.
933.LP
934.SH "DOCUMENTATION COMMENTS"
935.LP
936.LP
937The original "Documentation Comment Specification" can be found under related documentation.
938.LP
939.SS
940Commenting the Source Code
941.LP
942.LP
943You 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.
944.LP
945.nf
946\f3
947.fl
948/**
949.fl
950 * This is the typical format of a simple documentation comment
951.fl
952 * that spans two lines.
953.fl
954 */
955.fl
956\fP
957.fi
958
959.LP
960.LP
961To save space you can put a comment on one line:
962.LP
963.nf
964\f3
965.fl
966/** This comment takes up only one line. */
967.fl
968\fP
969.fi
970
971.LP
972.LP
973\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.
974.LP
975.LP
976A 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.
977.LP
978.nf
979\f3
980.fl
981 /**
982.fl
983 * This is the class comment for the class Whatever.
984.fl
985 */
986.fl
987
988.fl
989 import com.sun; // MISTAKE \- Important not to put import statement here
990.fl
991
992.fl
993 public class Whatever {
994.fl
995 }
996.fl
997\fP
998.fi
999
1000.LP
1001.LP
1002\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:
1003.LP
1004.nf
1005\f3
1006.fl
1007/**
1008.fl
1009 * This sentence would hold the main description for this doc comment.
1010.fl
1011 * @see java.lang.Object
1012.fl
1013 */
1014.fl
1015\fP
1016.fi
1017
1018.LP
1019.LP
1020\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&#064;\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.
1021.LP
1022.nf
1023\f3
1024.fl
1025/**
1026.fl
1027 * @deprecated As of JDK 1.1, replaced by {@link #setBounds(int,int,int,int)}
1028.fl
1029 */
1030.fl
1031\fP
1032.fi
1033
1034.LP
1035.LP
1036\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.)
1037.LP
1038.LP
1039For 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.
1040.LP
1041.LP
1042Here is a doc comment:
1043.LP
1044.nf
1045\f3
1046.fl
1047/**
1048.fl
1049 * This is a <b>doc</b> comment.
1050.fl
1051 * @see java.lang.Object
1052.fl
1053 */
1054.fl
1055\fP
1056.fi
1057
1058.LP
1059.LP
1060\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).
1061.LP
1062.LP
1063\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.
1064.LP
1065.LP
1066\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:
1067.LP
1068.RS 3
1069
1070.LP
1071.nf
1072\f3
1073.fl
1074/**
1075.fl
1076 * The horizontal and vertical distances of point (x,y)
1077.fl
1078 */
1079.fl
1080public int x, y; // Avoid this
1081.fl
1082\fP
1083.fi
1084.RE
1085
1086.LP
1087.LP
1088The Javadoc tool generates the following documentation from the above code:
1089.LP
1090.RS 3
1091
1092.LP
1093.nf
1094\f3
1095.fl
1096public int \fP\f3x\fP
1097.fl
1098.fi
1099
1100.LP
1101.RS 3
1102The horizontal and vertical distances of point (x,y)
1103.RE
1104
1105.LP
1106.nf
1107\f3
1108.fl
1109public int \fP\f3y\fP
1110.fl
1111.fi
1112
1113.LP
1114.RS 3
1115The horizontal and vertical distances of point (x,y)
1116.RE
1117
1118.LP
1119.RE
1120.LP
1121\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.
1122.LP
1123.SS
1124Automatic Copying of Method Comments
1125.LP
1126.LP
1127The 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.
1128.LP
1129.RS 3
1130.TP 2
1131o
1132\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.
1133.LP
1134More 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.
1135.LP
1136This behavior contrasts with version 1.3 and earlier, where the presence of any main description or tag would prevent all comments from being inherited.
1137.TP 2
1138o
1139\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.
1140.RE
1141
1142.LP
1143.LP
1144The 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
1145.LP
1146.LP
1147\f3Inherit from classes and interfaces\fP \- Inheriting of comments occurs in all three possible cases of inheritance from classes and interfaces:
1148.LP
1149.RS 3
1150.TP 2
1151o
1152When a method in a class overrides a method in a superclass
1153.TP 2
1154o
1155When a method in an interface overrides a method in a superinterface
1156.TP 2
1157o
1158When a method in a class implements a method in an interface
1159.RE
1160
1161.LP
1162.LP
1163In 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.
1164.LP
1165.LP
1166In 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.
1167.LP
1168.LP
1169\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:
1170.LP
1171.RS 3
1172.TP 3
11731.
1174Look 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.
1175.TP 3
11762.
1177If 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.
1178.TP 3
11793.
1180If step 2 failed to find a doc comment and this is a class other than Object (not an interface):
1181.RS 3
1182.TP 3
1183a.
1184If the superclass has a doc comment for this method, use it.
1185.TP 3
1186b.
1187If step 3a failed to find a doc comment, recursively apply this entire algorithm to the superclass.
1188.RE
1189.RE
1190
1191.LP
1192.SH "JAVADOC TAGS"
1193.LP
1194.LP
1195The 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.
1196.LP
1197.LP
1198Tags come in two types:
1199.LP
1200.RS 3
1201.TP 2
1202o
1203\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.
1204.TP 2
1205o
1206\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.
1207.RE
1208
1209.LP
1210.LP
1211For information about tags we might introduce in future releases, see
1212.na
1213\f2Proposed Tags\fP @
1214.fi
1215http://java.sun.com/j2se/javadoc/proposed\-tags.html.
1216.LP
1217.LP
1218The current tags are:
1219.LP
1220.RS 3
1221
1222.LP
1223.LP
1224.TS
1225.if \n+(b.=1 .nr d. \n(.c-\n(c.-1
1226.de 35
1227.ps \n(.s
1228.vs \n(.vu
1229.in \n(.iu
1230.if \n(.u .fi
1231.if \n(.j .ad
1232.if \n(.j=0 .na
1233..
1234.nf
1235.nr #~ 0
1236.if n .nr #~ 0.6n
1237.ds #d .d
1238.if \(ts\n(.z\(ts\(ts .ds #d nl
1239.fc
1240.nr 33 \n(.s
1241.rm 80 81
1242.nr 80 0
1243.nr 38 \w\f3Tag\fP
1244.if \n(80<\n(38 .nr 80 \n(38
1245.nr 38 \w\f2@author\fP
1246.if \n(80<\n(38 .nr 80 \n(38
1247.nr 38 \w\f2{@code}\fP
1248.if \n(80<\n(38 .nr 80 \n(38
1249.nr 38 \w\f2{@docRoot}\fP
1250.if \n(80<\n(38 .nr 80 \n(38
1251.nr 38 \w\f2@deprecated\fP
1252.if \n(80<\n(38 .nr 80 \n(38
1253.nr 38 \w\f2@exception\fP
1254.if \n(80<\n(38 .nr 80 \n(38
1255.nr 38 \w\f2{@inheritDoc}\fP
1256.if \n(80<\n(38 .nr 80 \n(38
1257.nr 38 \w\f2{@link}\fP
1258.if \n(80<\n(38 .nr 80 \n(38
1259.nr 38 \w\f2{@linkplain}\fP
1260.if \n(80<\n(38 .nr 80 \n(38
1261.nr 38 \w\f2{@literal}\fP
1262.if \n(80<\n(38 .nr 80 \n(38
1263.nr 38 \w\f2@param\fP
1264.if \n(80<\n(38 .nr 80 \n(38
1265.nr 38 \w\f2@return\fP
1266.if \n(80<\n(38 .nr 80 \n(38
1267.nr 38 \w\f2@see\fP
1268.if \n(80<\n(38 .nr 80 \n(38
1269.nr 38 \w\f2@serial\fP
1270.if \n(80<\n(38 .nr 80 \n(38
1271.nr 38 \w\f2@serialData\fP
1272.if \n(80<\n(38 .nr 80 \n(38
1273.nr 38 \w\f2@serialField\fP
1274.if \n(80<\n(38 .nr 80 \n(38
1275.nr 38 \w\f2@since\fP
1276.if \n(80<\n(38 .nr 80 \n(38
1277.nr 38 \w\f2@throws\fP
1278.if \n(80<\n(38 .nr 80 \n(38
1279.nr 38 \w\f2{@value}\fP
1280.if \n(80<\n(38 .nr 80 \n(38
1281.nr 38 \w\f2@version\fP
1282.if \n(80<\n(38 .nr 80 \n(38
1283.80
1284.rm 80
1285.nr 81 0
1286.nr 38 \w\f3Introduced in JDK/SDK\fP
1287.if \n(81<\n(38 .nr 81 \n(38
1288.nr 38 \w1.0
1289.if \n(81<\n(38 .nr 81 \n(38
1290.nr 38 \w1.5
1291.if \n(81<\n(38 .nr 81 \n(38
1292.nr 38 \w1.3
1293.if \n(81<\n(38 .nr 81 \n(38
1294.nr 38 \w1.0
1295.if \n(81<\n(38 .nr 81 \n(38
1296.nr 38 \w1.0
1297.if \n(81<\n(38 .nr 81 \n(38
1298.nr 38 \w1.4
1299.if \n(81<\n(38 .nr 81 \n(38
1300.nr 38 \w1.2
1301.if \n(81<\n(38 .nr 81 \n(38
1302.nr 38 \w1.4
1303.if \n(81<\n(38 .nr 81 \n(38
1304.nr 38 \w1.5
1305.if \n(81<\n(38 .nr 81 \n(38
1306.nr 38 \w1.0
1307.if \n(81<\n(38 .nr 81 \n(38
1308.nr 38 \w1.0
1309.if \n(81<\n(38 .nr 81 \n(38
1310.nr 38 \w1.0
1311.if \n(81<\n(38 .nr 81 \n(38
1312.nr 38 \w1.2
1313.if \n(81<\n(38 .nr 81 \n(38
1314.nr 38 \w1.2
1315.if \n(81<\n(38 .nr 81 \n(38
1316.nr 38 \w1.2
1317.if \n(81<\n(38 .nr 81 \n(38
1318.nr 38 \w1.1
1319.if \n(81<\n(38 .nr 81 \n(38
1320.nr 38 \w1.2
1321.if \n(81<\n(38 .nr 81 \n(38
1322.nr 38 \w1.4
1323.if \n(81<\n(38 .nr 81 \n(38
1324.nr 38 \w1.0
1325.if \n(81<\n(38 .nr 81 \n(38
1326.81
1327.rm 81
1328.nr 38 1n
1329.nr 79 0
1330.nr 40 \n(79+(0*\n(38)
1331.nr 80 +\n(40
1332.nr 41 \n(80+(3*\n(38)
1333.nr 81 +\n(41
1334.nr TW \n(81
1335.if t .if \n(TW>\n(.li .tm Table at line 1084 file Input is too wide - \n(TW units
1336.fc  
1337.nr #T 0-1
1338.nr #a 0-1
1339.eo
1340.de T#
1341.ds #d .d
1342.if \(ts\n(.z\(ts\(ts .ds #d nl
1343.mk ##
1344.nr ## -1v
1345.ls 1
1346.ls
1347..
1348.ec
1349.ta \n(80u \n(81u
1350.nr 31 \n(.f
1351.nr 35 1m
1352\&\h'|\n(40u'\f3Tag\fP\h'|\n(41u'\f3Introduced in JDK/SDK\fP
1353.ta \n(80u \n(81u
1354.nr 31 \n(.f
1355.nr 35 1m
1356\&\h'|\n(40u'\f2@author\fP\h'|\n(41u'1.0
1357.ta \n(80u \n(81u
1358.nr 31 \n(.f
1359.nr 35 1m
1360\&\h'|\n(40u'\f2{@code}\fP\h'|\n(41u'1.5
1361.ta \n(80u \n(81u
1362.nr 31 \n(.f
1363.nr 35 1m
1364\&\h'|\n(40u'\f2{@docRoot}\fP\h'|\n(41u'1.3
1365.ta \n(80u \n(81u
1366.nr 31 \n(.f
1367.nr 35 1m
1368\&\h'|\n(40u'\f2@deprecated\fP\h'|\n(41u'1.0
1369.ta \n(80u \n(81u
1370.nr 31 \n(.f
1371.nr 35 1m
1372\&\h'|\n(40u'\f2@exception\fP\h'|\n(41u'1.0
1373.ta \n(80u \n(81u
1374.nr 31 \n(.f
1375.nr 35 1m
1376\&\h'|\n(40u'\f2{@inheritDoc}\fP\h'|\n(41u'1.4
1377.ta \n(80u \n(81u
1378.nr 31 \n(.f
1379.nr 35 1m
1380\&\h'|\n(40u'\f2{@link}\fP\h'|\n(41u'1.2
1381.ta \n(80u \n(81u
1382.nr 31 \n(.f
1383.nr 35 1m
1384\&\h'|\n(40u'\f2{@linkplain}\fP\h'|\n(41u'1.4
1385.ta \n(80u \n(81u
1386.nr 31 \n(.f
1387.nr 35 1m
1388\&\h'|\n(40u'\f2{@literal}\fP\h'|\n(41u'1.5
1389.ta \n(80u \n(81u
1390.nr 31 \n(.f
1391.nr 35 1m
1392\&\h'|\n(40u'\f2@param\fP\h'|\n(41u'1.0
1393.ta \n(80u \n(81u
1394.nr 31 \n(.f
1395.nr 35 1m
1396\&\h'|\n(40u'\f2@return\fP\h'|\n(41u'1.0
1397.ta \n(80u \n(81u
1398.nr 31 \n(.f
1399.nr 35 1m
1400\&\h'|\n(40u'\f2@see\fP\h'|\n(41u'1.0
1401.ta \n(80u \n(81u
1402.nr 31 \n(.f
1403.nr 35 1m
1404\&\h'|\n(40u'\f2@serial\fP\h'|\n(41u'1.2
1405.ta \n(80u \n(81u
1406.nr 31 \n(.f
1407.nr 35 1m
1408\&\h'|\n(40u'\f2@serialData\fP\h'|\n(41u'1.2
1409.ta \n(80u \n(81u
1410.nr 31 \n(.f
1411.nr 35 1m
1412\&\h'|\n(40u'\f2@serialField\fP\h'|\n(41u'1.2
1413.ta \n(80u \n(81u
1414.nr 31 \n(.f
1415.nr 35 1m
1416\&\h'|\n(40u'\f2@since\fP\h'|\n(41u'1.1
1417.ta \n(80u \n(81u
1418.nr 31 \n(.f
1419.nr 35 1m
1420\&\h'|\n(40u'\f2@throws\fP\h'|\n(41u'1.2
1421.ta \n(80u \n(81u
1422.nr 31 \n(.f
1423.nr 35 1m
1424\&\h'|\n(40u'\f2{@value}\fP\h'|\n(41u'1.4
1425.ta \n(80u \n(81u
1426.nr 31 \n(.f
1427.nr 35 1m
1428\&\h'|\n(40u'\f2@version\fP\h'|\n(41u'1.0
1429.fc
1430.nr T. 1
1431.T# 1
1432.35
1433.TE
1434.if \n-(b.=0 .nr c. \n(.c-\n(d.-42
1435
1436.LP
1437.LP
1438For custom tags, see the \-tag option.
1439.LP
1440.RE
1441.RS 3
1442.TP 3
1443@author\ name\-text
1444Adds 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.
1445.LP
1446For more details, see Where Tags Can Be Used and
1447.na
1448\f2writing @author tags\fP @
1449.fi
1450http://java.sun.com/j2se/javadoc/writingdoccomments/index.html#@author.
1451.LP
1452.TP 3
1453@deprecated\ deprecated\-text
1454.RS 3
1455
1456.LP
1457.LP
1458Note: Starting with JDK 5.0, you can deprecate a program element using the @Deprecated annotation.
1459.LP
1460.RE
1461.LP
1462Adds 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.
1463.LP
1464The 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:
1465.LP
1466For more details, see
1467.na
1468\f2writing @deprecated tags\fP @
1469.fi
1470http://java.sun.com/j2se/javadoc/writingdoccomments/index.html#@deprecated.
1471.RS 3
1472.TP 2
1473o
1474For Javadoc 1.2 and later, use a \f2{@link}\fP tag. This creates the link in\-line, where you want it. For example:
1475.nf
1476\f3
1477.fl
1478/**
1479.fl
1480 * @deprecated As of JDK 1.1, replaced by {@link #setBounds(int,int,int,int)}
1481.fl
1482 */
1483.fl
1484\fP
1485.fi
1486.TP 2
1487o
1488For 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.
1489.RE
1490.LP
1491For more about deprecation, see The @deprecated tag.
1492.LP
1493.TP 3
1494{@code\ text}
1495Equivalent to \f2<code>{@literal}</code>\fP.
1496.LP
1497Displays \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:
1498.nf
1499\f3
1500.fl
1501 \fP\f4{@code A<B>C}\fP\f3
1502.fl
1503\fP
1504.fi
1505displays in the generated HTML page unchanged, as:
1506.nf
1507\f3
1508.fl
1509 \fP\f4A<B>C\fP\f3
1510.fl
1511\fP
1512.fi
1513The noteworthy point is that the \f2<B>\fP is not interpreted as bold and is in code font.
1514.LP
1515If you want the same functionality without the code font, use \f2{@literal}\fP.
1516.LP
1517.TP 3
1518{@docRoot}
1519Represents 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.
1520.LP
1521This \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).
1522.RS 3
1523.TP 3
15241.
1525On the command line, where the header/footer/bottom are defined:
1526.nf
1527\f3
1528.fl
1529 javadoc \-bottom '<a href="{@docRoot}/copyright.html">Copyright</a>'
1530.fl
1531\fP
1532.fi
1533NOTE \- 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).
1534.TP 3
15352.
1536In a doc comment:
1537.nf
1538\f3
1539.fl
1540 /**
1541.fl
1542 * See the <a href="{@docRoot}/copyright.html">Copyright</a>.
1543.fl
1544 */
1545.fl
1546\fP
1547.fi
1548.RE
1549The reason this tag is needed is because the generated docs are in hierarchical directories, as deep as the number of subpackages. This expression:
1550.nf
1551\f3
1552.fl
1553 <a href="{@docRoot}/copyright.html">
1554.fl
1555\fP
1556.fi
1557would resolve to:
1558.nf
1559\f3
1560.fl
1561 <a href="../../copyright.html"> for java/lang/Object.java
1562.fl
1563\fP
1564.fi
1565and
1566.nf
1567\f3
1568.fl
1569 <a href="../../../copyright.html"> for java/lang/ref/Reference.java
1570.fl
1571\fP
1572.fi
1573.LP
1574.TP 3
1575@exception\ class\-name\ description
1576The \f2@exception\fP tag is a synonym for \f2@throws\fP.
1577.LP
1578.TP 3
1579{@inheritDoc}\
1580Inherits (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.
1581.LP
1582This tag is valid only in these places in a doc comment:
1583.RS 3
1584.TP 2
1585o
1586In the main description block of a method. In this case, the main description is copied from a class or interface up the hierarchy.
1587.TP 2
1588o
1589In 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.
1590.RE
1591.LP
1592See 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.
1593.LP
1594.TP 3
1595{@link\ package.class#member\ label}
1596Inserts 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).
1597.LP
1598This 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 &#125;
1599.LP
1600There 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).
1601.LP
1602For example, here is a comment that refers to the \f2getComponentAt(int, int)\fP method:
1603.nf
1604\f3
1605.fl
1606Use the {@link #getComponentAt(int, int) getComponentAt} method.
1607.fl
1608\fP
1609.fi
1610From this, the standard doclet would generate the following HTML (assuming it refers to another class in the same package):
1611.nf
1612\f3
1613.fl
1614Use the <a href="Component.html#getComponentAt(int, int)">getComponentAt</a> method.
1615.fl
1616\fP
1617.fi
1618Which appears on the web page as:
1619.nf
1620\f3
1621.fl
1622Use the getComponentAt method.
1623.fl
1624\fP
1625.fi
1626You can extend \f2{@link}\fP to link to classes not being documented by using the \f2\-link\fP option.
1627.LP
1628For more details, see
1629.na
1630\f2writing {@link} tags\fP @
1631.fi
1632http://java.sun.com/j2se/javadoc/writingdoccomments/index.html#{@link}.
1633.LP
1634.TP 3
1635{@linkplain\ package.class#member\ label}
1636Identical 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:
1637.nf
1638\f3
1639.fl
1640 Refer to {@linkplain add() the overridden method}.
1641.fl
1642\fP
1643.fi
1644This would display as:
1645.RS 3
1646.LP
1647Refer to the overridden method.
1648.LP
1649.RE
1650.TP 3
1651{@literal\ text}
1652Displays \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:
1653.nf
1654\f3
1655.fl
1656 \fP\f4{@literal A<B>C}\fP\f3
1657.fl
1658\fP
1659.fi
1660displays unchanged in the generated HTML page in your browser, as:
1661.LP
1662\f2\ \ \ \ \ \fPA<B>C The noteworthy point is that the \f2<B>\fP is not interpreted as bold (and it is not in code font).
1663.LP
1664If you want the same functionality but with the text in code font, use \f2{@code}\fP.
1665.LP
1666.TP 3
1667@param\ parameter\-name description
1668Adds 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.
1669.LP
1670The \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.
1671.LP
1672Example of a type parameter of a class:
1673.nf
1674\f3
1675.fl
1676 /**
1677.fl
1678 * @param <E> Type of element stored in a list
1679.fl
1680 */
1681.fl
1682 public interface List<E> extends Collection<E> {
1683.fl
1684 }
1685.fl
1686\fP
1687.fi
1688.LP
1689Example of a type parameter of a method:
1690.nf
1691\f3
1692.fl
1693 /**
1694.fl
1695 * @param string the string to be converted
1696.fl
1697 * @param type the type to convert the string to
1698.fl
1699 * @param <T> the type of the element
1700.fl
1701 * @param <V> the value of the element
1702.fl
1703 */
1704.fl
1705 <T, V extends T> V convert(String string, Class<T> type) {
1706.fl
1707 }
1708.fl
1709\fP
1710.fi
1711For more details, see
1712.na
1713\f2writing @param tags\fP @
1714.fi
1715http://java.sun.com/j2se/javadoc/writingdoccomments/index.html#@param.
1716.LP
1717.TP 3
1718@return\ description
1719Adds 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.
1720.LP
1721For more details, see
1722.na
1723\f2writing @return tags\fP @
1724.fi
1725http://java.sun.com/j2se/javadoc/writingdoccomments/index.html#@return.
1726.LP
1727.TP 3
1728@see\ reference
1729Adds 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.
1730.RS 3
1731.TP 3
1732@see "string"
1733Adds 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:
1734.nf
1735\f3
1736.fl
1737 @see "The Java Programming Language"
1738.fl
1739\fP
1740.fi
1741This generates text such as:
1742.RS 3
1743.RS 3
1744.TP 3
1745See Also:
1746"The Java Programming Language"
1747.RE
1748
1749.LP
1750.RE
1751.TP 3
1752@see <a href="URL#value">label</a>
1753Adds 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:
1754.nf
1755\f3
1756.fl
1757 @see <a href="spec.html#section">Java Spec</a>
1758.fl
1759\fP
1760.fi
1761This generates a link such as:
1762.RS 3
1763.RS 3
1764.TP 3
1765See Also:
1766Java Spec
1767.RE
1768
1769.LP
1770.RE
1771.TP 3
1772@see\ package.class#member\ label
1773Adds 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.
1774.LP
1775Only 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.
1776.LP
1777.RS 3
1778.TP 2
1779o
1780\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.
1781.TP 2
1782o
1783\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.
1784.TP 2
1785o
1786A 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.
1787.RE
1788.LP
1789\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".
1790.RS 3
1791.nf
1792\f3
1793.fl
1794 /**
1795.fl
1796 * @see String#equals(Object) equals
1797.fl
1798 */
1799.fl
1800\fP
1801.fi
1802.RE
1803The standard doclet produces HTML something like this:
1804.RS 3
1805
1806.LP
1807.nf
1808\f3
1809.fl
1810<dl>
1811.fl
1812<dt><b>See Also:</b>
1813.fl
1814<dd><a href="../../java/lang/String#equals(java.lang.Object)"><code>equals<code></a>
1815.fl
1816</dl>
1817.fl
1818\fP
1819.fi
1820.RE
1821Which looks something like this in a browser, where the label is the visible link text:
1822.RS 3
1823
1824.LP
1825.RS 3
1826.TP 3
1827See Also:
1828equals
1829.RE
1830
1831.LP
1832.RE
1833.LP
1834\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.
1835.LP
1836Of 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.
1837.LP
1838.LP
1839.TS
1840.if \n+(b.=1 .nr d. \n(.c-\n(c.-1
1841.de 35
1842.ps \n(.s
1843.vs \n(.vu
1844.in \n(.iu
1845.if \n(.u .fi
1846.if \n(.j .ad
1847.if \n(.j=0 .na
1848..
1849.nf
1850.nr #~ 0
1851.if n .nr #~ 0.6n
1852.ds #d .d
1853.if \(ts\n(.z\(ts\(ts .ds #d nl
1854.fc
1855.nr 33 \n(.s
1856.rm 80
1857.nr 34 \n(.lu
1858.eo
1859.am 80
1860.br
1861.di a+
1862.35
1863.ft \n(.f
1864.ll \n(34u*1u/2u
1865.if \n(.l<\n(80 .ll \n(80u
1866.in 0
1867\f3Typical\ forms\ for\ \fP\f4@see\fP\f3\ \fP\f4package.class#member\fP
1868.br
1869.di
1870.nr a| \n(dn
1871.nr a- \n(dl
1872..
1873.ec \
1874.eo
1875.am 80
1876.br
1877.di b+
1878.35
1879.ft \n(.f
1880.ll \n(34u*1u/2u
1881.if \n(.l<\n(80 .ll \n(80u
1882.in 0
1883\f3Referencing\ a\ member\ of\ the\ current\ class\fP
1884.br
1885\f2@see\fP\ \f2#\fP\f2field\fP
1886.br
1887\f2@see\fP\ \f2#\fP\f2method(Type,\ Type,...)\fP
1888.br
1889\f2@see\fP\ \f2#\fP\f2method(Type\ argname,\ Type\ argname,...)\fP
1890.br
1891\f2@see\fP\ \f2#\fP\f2constructor(Type,\ Type,...)\fP
1892.br
1893\f2@see\fP\ \f2#\fP\f2constructor(Type\ argname,\ Type\ argname,...)\fP
1894.br
1895.di
1896.nr b| \n(dn
1897.nr b- \n(dl
1898..
1899.ec \
1900.eo
1901.am 80
1902.br
1903.di c+
1904.35
1905.ft \n(.f
1906.ll \n(34u*1u/2u
1907.if \n(.l<\n(80 .ll \n(80u
1908.in 0
1909\f3Referencing\ another\ class\ in\ the\ current\ or\ imported\ packages\fP
1910.br
1911\f2@see\fP\ \f2Class\fP\f2#\fP\f2field\fP
1912.br
1913\f2@see\fP\ \f2Class\fP\f2#\fP\f2method(Type,\ Type,...)\fP
1914.br
1915\f2@see\fP\ \f2Class\fP\f2#\fP\f2method(Type\ argname,\ Type\ argname,...)\fP
1916.br
1917\f2@see\fP\ \f2Class\fP\f2#\fP\f2constructor(Type,\ Type,...)\fP
1918.br
1919\f2@see\fP\ \f2Class\fP\f2#\fP\f2constructor(Type\ argname,\ Type\ argname,...)\fP
1920.br
1921\f2@see\fP\ \f2Class.NestedClass\fP
1922.br
1923\f2@see\fP\ \f2Class\fP
1924.br
1925.di
1926.nr c| \n(dn
1927.nr c- \n(dl
1928..
1929.ec \
1930.eo
1931.am 80
1932.br
1933.di d+
1934.35
1935.ft \n(.f
1936.ll \n(34u*1u/2u
1937.if \n(.l<\n(80 .ll \n(80u
1938.in 0
1939\f3Referencing\ an\ element\ in\ another\ package\fP\ (fully qualified)
1940.br
1941\f2@see\fP\ \f2package.Class\fP\f2#\fP\f2field\fP
1942.br
1943\f2@see\fP\ \f2package.Class\fP\f2#\fP\f2method(Type,\ Type,...)\fP
1944.br
1945\f2@see\fP\ \f2package.Class\fP\f2#\fP\f2method(Type\ argname,\ Type\ argname,...)\fP
1946.br
1947\f2@see\fP\ \f2package.Class\fP\f2#\fP\f2constructor(Type,\ Type,...)\fP
1948.br
1949\f2@see\fP\ \f2package.Class\fP\f2#\fP\f2constructor(Type\ argname,\ Type\ argname,...)\fP
1950.br
1951\f2@see\fP\ \f2package.Class.NestedClass\fP
1952.br
1953\f2@see\fP\ \f2package.Class\fP
1954.br
1955\f2@see\fP\ \f2package\fP
1956.br
1957.di
1958.nr d| \n(dn
1959.nr d- \n(dl
1960..
1961.ec \
1962.35
1963.nf
1964.ll \n(34u
1965.nr 80 0
1966.80
1967.rm 80
1968.nr 38 \n(a-
1969.if \n(80<\n(38 .nr 80 \n(38
1970.nr 38 \n(b-
1971.if \n(80<\n(38 .nr 80 \n(38
1972.nr 38 \n(c-
1973.if \n(80<\n(38 .nr 80 \n(38
1974.nr 38 \n(d-
1975.if \n(80<\n(38 .nr 80 \n(38
1976.35
1977.nf
1978.ll \n(34u
1979.nr 38 1n
1980.nr 79 0
1981.nr 40 \n(79+(0*\n(38)
1982.nr 80 +\n(40
1983.nr TW \n(80
1984.if t .if \n(TW>\n(.li .tm Table at line 1547 file Input is too wide - \n(TW units
1985.fc  
1986.nr #T 0-1
1987.nr #a 0-1
1988.eo
1989.de T#
1990.ds #d .d
1991.if \(ts\n(.z\(ts\(ts .ds #d nl
1992.mk ##
1993.nr ## -1v
1994.ls 1
1995.ls
1996..
1997.ec
1998.ne \n(a|u+\n(.Vu
1999.if (\n(a|+\n(#^-1v)>\n(#- .nr #- +(\n(a|+\n(#^-\n(#--1v)
2000.ta \n(80u
2001.nr 31 \n(.f
2002.nr 35 1m
2003\&\h'|\n(40u'
2004.mk ##
2005.nr 31 \n(##
2006.sp |\n(##u-1v
2007.nr 37 \n(40u
2008.in +\n(37u
2009.a+
2010.in -\n(37u
2011.mk 32
2012.if \n(32>\n(31 .nr 31 \n(32
2013.sp |\n(31u
2014.ne \n(b|u+\n(.Vu
2015.if (\n(b|+\n(#^-1v)>\n(#- .nr #- +(\n(b|+\n(#^-\n(#--1v)
2016.ta \n(80u
2017.nr 31 \n(.f
2018.nr 35 1m
2019\&\h'|\n(40u'
2020.mk ##
2021.nr 31 \n(##
2022.sp |\n(##u-1v
2023.nr 37 \n(40u
2024.in +\n(37u
2025.b+
2026.in -\n(37u
2027.mk 32
2028.if \n(32>\n(31 .nr 31 \n(32
2029.sp |\n(31u
2030.ne \n(c|u+\n(.Vu
2031.if (\n(c|+\n(#^-1v)>\n(#- .nr #- +(\n(c|+\n(#^-\n(#--1v)
2032.ta \n(80u
2033.nr 31 \n(.f
2034.nr 35 1m
2035\&\h'|\n(40u'
2036.mk ##
2037.nr 31 \n(##
2038.sp |\n(##u-1v
2039.nr 37 \n(40u
2040.in +\n(37u
2041.c+
2042.in -\n(37u
2043.mk 32
2044.if \n(32>\n(31 .nr 31 \n(32
2045.sp |\n(31u
2046.ne \n(d|u+\n(.Vu
2047.if (\n(d|+\n(#^-1v)>\n(#- .nr #- +(\n(d|+\n(#^-\n(#--1v)
2048.ta \n(80u
2049.nr 31 \n(.f
2050.nr 35 1m
2051\&\h'|\n(40u'
2052.mk ##
2053.nr 31 \n(##
2054.sp |\n(##u-1v
2055.nr 37 \n(40u
2056.in +\n(37u
2057.d+
2058.in -\n(37u
2059.mk 32
2060.if \n(32>\n(31 .nr 31 \n(32
2061.sp |\n(31u
2062.fc
2063.nr T. 1
2064.T# 1
2065.35
2066.rm a+
2067.rm b+
2068.rm c+
2069.rm d+
2070.TE
2071.if \n-(b.=0 .nr c. \n(.c-\n(d.-58
2072.LP
2073The following notes apply to the above table:
2074.RS 3
2075.TP 2
2076o
2077The 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).
2078.TP 2
2079o
2080If 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.
2081.TP 2
2082o
2083Nested classes must be specified as \f2outer\fP\f2.\fP\f2inner\fP, not simply \f2inner\fP, for all forms.
2084.TP 2
2085o
2086As 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.
2087.RE
2088.LP
2089\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.
2090.LP
2091When 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 Chapter 6, "Names" of the \f2Java Language Specification\fP, Second Edition. The Javadoc tool searches for that name through all related and imported classes and packages. In particular, it searches in this order:
2092.RS 3
2093.TP 3
20941.
2095the current class or interface
2096.TP 3
20972.
2098any enclosing classes and interfaces, searching closest first
2099.TP 3
21003.
2101any superclasses and superinterfaces, searching closest first
2102.TP 3
21034.
2104the current package
2105.TP 3
21065.
2107any imported packages, classes and interfaces, searching in the order of the import statement
2108.RE
2109.LP
2110The 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.
2111.LP
2112The 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.
2113.LP
2114\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.
2115.LP
2116Use \-noqualifier to globally remove the package names.
2117.br
2118.LP
2119.TS
2120.if \n+(b.=1 .nr d. \n(.c-\n(c.-1
2121.de 35
2122.ps \n(.s
2123.vs \n(.vu
2124.in \n(.iu
2125.if \n(.u .fi
2126.if \n(.j .ad
2127.if \n(.j=0 .na
2128..
2129.nf
2130.nr #~ 0
2131.if n .nr #~ 0.6n
2132.ds #d .d
2133.if \(ts\n(.z\(ts\(ts .ds #d nl
2134.fc
2135.nr 33 \n(.s
2136.rm 80 81 82
2137.nr 34 \n(.lu
2138.eo
2139.am 81
2140.br
2141.di a+
2142.35
2143.ft \n(.f
2144.ll \n(34u*1u/4u
2145.if \n(.l<\n(81 .ll \n(81u
2146.in 0
2147\f3Example in \fP\f4String.toUpperCase()\fP
2148.br
2149.di
2150.nr a| \n(dn
2151.nr a- \n(dl
2152..
2153.ec \
2154.eo
2155.am 80
2156.br
2157.di b+
2158.35
2159.ft \n(.f
2160.ll \n(34u*1u/4u
2161.if \n(.l<\n(80 .ll \n(80u
2162.in 0
2163\f2@see\fP tag refers to member of the same class, same package
2164.br
2165.di
2166.nr b| \n(dn
2167.nr b- \n(dl
2168..
2169.ec \
2170.eo
2171.am 82
2172.br
2173.di c+
2174.35
2175.ft \n(.f
2176.ll \n(34u*1u/4u
2177.if \n(.l<\n(82 .ll \n(82u
2178.in 0
2179\f2toLowerCase()\fP (omits the package and class names)
2180.br
2181.di
2182.nr c| \n(dn
2183.nr c- \n(dl
2184..
2185.ec \
2186.eo
2187.am 80
2188.br
2189.di d+
2190.35
2191.ft \n(.f
2192.ll \n(34u*1u/4u
2193.if \n(.l<\n(80 .ll \n(80u
2194.in 0
2195\f2@see\fP tag refers to member of a different class, same package
2196.br
2197.di
2198.nr d| \n(dn
2199.nr d- \n(dl
2200..
2201.ec \
2202.eo
2203.am 81
2204.br
2205.di e+
2206.35
2207.ft \n(.f
2208.ll \n(34u*1u/4u
2209.if \n(.l<\n(81 .ll \n(81u
2210.in 0
2211\f2@see Character#toLowerCase(char)\fP
2212.br
2213.di
2214.nr e| \n(dn
2215.nr e- \n(dl
2216..
2217.ec \
2218.eo
2219.am 82
2220.br
2221.di f+
2222.35
2223.ft \n(.f
2224.ll \n(34u*1u/4u
2225.if \n(.l<\n(82 .ll \n(82u
2226.in 0
2227\f2Character.toLowerCase(char)\fP (omits the package name, includes the class name)
2228.br
2229.di
2230.nr f| \n(dn
2231.nr f- \n(dl
2232..
2233.ec \
2234.eo
2235.am 80
2236.br
2237.di g+
2238.35
2239.ft \n(.f
2240.ll \n(34u*1u/4u
2241.if \n(.l<\n(80 .ll \n(80u
2242.in 0
2243\f2@see\fP tag refers to member of a different class, different package
2244.br
2245.di
2246.nr g| \n(dn
2247.nr g- \n(dl
2248..
2249.ec \
2250.eo
2251.am 81
2252.br
2253.di h+
2254.35
2255.ft \n(.f
2256.ll \n(34u*1u/4u
2257.if \n(.l<\n(81 .ll \n(81u
2258.in 0
2259\f2@see java.io.File#exists()\fP
2260.br
2261.di
2262.nr h| \n(dn
2263.nr h- \n(dl
2264..
2265.ec \
2266.eo
2267.am 82
2268.br
2269.di i+
2270.35
2271.ft \n(.f
2272.ll \n(34u*1u/4u
2273.if \n(.l<\n(82 .ll \n(82u
2274.in 0
2275\f2java.io.File.exists()\fP (includes the package and class names)
2276.br
2277.di
2278.nr i| \n(dn
2279.nr i- \n(dl
2280..
2281.ec \
2282.35
2283.nf
2284.ll \n(34u
2285.nr 80 0
2286.nr 38 \w\f3Type of Reference\fP
2287.if \n(80<\n(38 .nr 80 \n(38
2288.80
2289.rm 80
2290.nr 38 \n(b-
2291.if \n(80<\n(38 .nr 80 \n(38
2292.nr 38 \n(d-
2293.if \n(80<\n(38 .nr 80 \n(38
2294.nr 38 \n(g-
2295.if \n(80<\n(38 .nr 80 \n(38
2296.nr 81 0
2297.nr 38 \w\f2@see String#toLowerCase()\fP
2298.if \n(81<\n(38 .nr 81 \n(38
2299.81
2300.rm 81
2301.nr 38 \n(a-
2302.if \n(81<\n(38 .nr 81 \n(38
2303.nr 38 \n(e-
2304.if \n(81<\n(38 .nr 81 \n(38
2305.nr 38 \n(h-
2306.if \n(81<\n(38 .nr 81 \n(38
2307.nr 82 0
2308.nr 38 \w\f3Displays As\fP
2309.if \n(82<\n(38 .nr 82 \n(38
2310.82
2311.rm 82
2312.nr 38 \n(c-
2313.if \n(82<\n(38 .nr 82 \n(38
2314.nr 38 \n(f-
2315.if \n(82<\n(38 .nr 82 \n(38
2316.nr 38 \n(i-
2317.if \n(82<\n(38 .nr 82 \n(38
2318.35
2319.nf
2320.ll \n(34u
2321.nr 38 1n
2322.nr 79 0
2323.nr 40 \n(79+(0*\n(38)
2324.nr 80 +\n(40
2325.nr 41 \n(80+(3*\n(38)
2326.nr 81 +\n(41
2327.nr 42 \n(81+(3*\n(38)
2328.nr 82 +\n(42
2329.nr TW \n(82
2330.if t .if \n(TW>\n(.li .tm Table at line 1623 file Input is too wide - \n(TW units
2331.fc  
2332.nr #T 0-1
2333.nr #a 0-1
2334.eo
2335.de T#
2336.ds #d .d
2337.if \(ts\n(.z\(ts\(ts .ds #d nl
2338.mk ##
2339.nr ## -1v
2340.ls 1
2341.ls
2342..
2343.ec
2344.ne \n(a|u+\n(.Vu
2345.if (\n(a|+\n(#^-1v)>\n(#- .nr #- +(\n(a|+\n(#^-\n(#--1v)
2346.ta \n(80u \n(81u \n(82u
2347.nr 31 \n(.f
2348.nr 35 1m
2349\&\h'|\n(40u'\f3Type of Reference\fP\h'|\n(41u'\h'|\n(42u'\f3Displays As\fP
2350.mk ##
2351.nr 31 \n(##
2352.sp |\n(##u-1v
2353.nr 37 \n(41u
2354.in +\n(37u
2355.a+
2356.in -\n(37u
2357.mk 32
2358.if \n(32>\n(31 .nr 31 \n(32
2359.sp |\n(31u
2360.ne \n(b|u+\n(.Vu
2361.ne \n(c|u+\n(.Vu
2362.if (\n(b|+\n(#^-1v)>\n(#- .nr #- +(\n(b|+\n(#^-\n(#--1v)
2363.if (\n(c|+\n(#^-1v)>\n(#- .nr #- +(\n(c|+\n(#^-\n(#--1v)
2364.ta \n(80u \n(81u \n(82u
2365.nr 31 \n(.f
2366.nr 35 1m
2367\&\h'|\n(40u'\h'|\n(41u'\f2@see String#toLowerCase()\fP\h'|\n(42u'
2368.mk ##
2369.nr 31 \n(##
2370.sp |\n(##u-1v
2371.nr 37 \n(40u
2372.in +\n(37u
2373.b+
2374.in -\n(37u
2375.mk 32
2376.if \n(32>\n(31 .nr 31 \n(32
2377.sp |\n(##u-1v
2378.nr 37 \n(42u
2379.in +\n(37u
2380.c+
2381.in -\n(37u
2382.mk 32
2383.if \n(32>\n(31 .nr 31 \n(32
2384.sp |\n(31u
2385.ne \n(d|u+\n(.Vu
2386.ne \n(e|u+\n(.Vu
2387.ne \n(f|u+\n(.Vu
2388.if (\n(d|+\n(#^-1v)>\n(#- .nr #- +(\n(d|+\n(#^-\n(#--1v)
2389.if (\n(e|+\n(#^-1v)>\n(#- .nr #- +(\n(e|+\n(#^-\n(#--1v)
2390.if (\n(f|+\n(#^-1v)>\n(#- .nr #- +(\n(f|+\n(#^-\n(#--1v)
2391.ta \n(80u \n(81u \n(82u
2392.nr 31 \n(.f
2393.nr 35 1m
2394\&\h'|\n(40u'\h'|\n(41u'\h'|\n(42u'
2395.mk ##
2396.nr 31 \n(##
2397.sp |\n(##u-1v
2398.nr 37 \n(40u
2399.in +\n(37u
2400.d+
2401.in -\n(37u
2402.mk 32
2403.if \n(32>\n(31 .nr 31 \n(32
2404.sp |\n(##u-1v
2405.nr 37 \n(41u
2406.in +\n(37u
2407.e+
2408.in -\n(37u
2409.mk 32
2410.if \n(32>\n(31 .nr 31 \n(32
2411.sp |\n(##u-1v
2412.nr 37 \n(42u
2413.in +\n(37u
2414.f+
2415.in -\n(37u
2416.mk 32
2417.if \n(32>\n(31 .nr 31 \n(32
2418.sp |\n(31u
2419.ne \n(g|u+\n(.Vu
2420.ne \n(h|u+\n(.Vu
2421.ne \n(i|u+\n(.Vu
2422.if (\n(g|+\n(#^-1v)>\n(#- .nr #- +(\n(g|+\n(#^-\n(#--1v)
2423.if (\n(h|+\n(#^-1v)>\n(#- .nr #- +(\n(h|+\n(#^-\n(#--1v)
2424.if (\n(i|+\n(#^-1v)>\n(#- .nr #- +(\n(i|+\n(#^-\n(#--1v)
2425.ta \n(80u \n(81u \n(82u
2426.nr 31 \n(.f
2427.nr 35 1m
2428\&\h'|\n(40u'\h'|\n(41u'\h'|\n(42u'
2429.mk ##
2430.nr 31 \n(##
2431.sp |\n(##u-1v
2432.nr 37 \n(40u
2433.in +\n(37u
2434.g+
2435.in -\n(37u
2436.mk 32
2437.if \n(32>\n(31 .nr 31 \n(32
2438.sp |\n(##u-1v
2439.nr 37 \n(41u
2440.in +\n(37u
2441.h+
2442.in -\n(37u
2443.mk 32
2444.if \n(32>\n(31 .nr 31 \n(32
2445.sp |\n(##u-1v
2446.nr 37 \n(42u
2447.in +\n(37u
2448.i+
2449.in -\n(37u
2450.mk 32
2451.if \n(32>\n(31 .nr 31 \n(32
2452.sp |\n(31u
2453.fc
2454.nr T. 1
2455.T# 1
2456.35
2457.rm a+
2458.rm b+
2459.rm c+
2460.rm d+
2461.rm e+
2462.rm f+
2463.rm g+
2464.rm h+
2465.rm i+
2466.TE
2467.if \n-(b.=0 .nr c. \n(.c-\n(d.-28
2468.LP
2469\f3Examples of @see\fP
2470.br
2471The 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.
2472.nf
2473\f3
2474.fl
2475 See also:
2476.fl
2477@see java.lang.String // String \fP\f3
2478.fl
2479@see java.lang.String The String class // The String class \fP\f3
2480.fl
2481@see String // String \fP\f3
2482.fl
2483@see String#equals(Object) // String.equals(Object) \fP\f3
2484.fl
2485@see String#equals // String.equals(java.lang.Object) \fP\f3
2486.fl
2487@see java.lang.Object#wait(long) // java.lang.Object.wait(long) \fP\f3
2488.fl
2489@see Character#MAX_RADIX // Character.MAX_RADIX \fP\f3
2490.fl
2491@see <a href="spec.html">Java Spec</a> // Java Spec \fP\f3
2492.fl
2493@see "The Java Programming Language" // "The Java Programming Language" \fP\f3
2494.fl
2495\fP
2496.fi
2497You can extend \f2@see\fP to link to classes not being documented by using the \f2\-link\fP option.
2498.LP
2499For more details, see
2500.na
2501\f2writing @see tags\fP @
2502.fi
2503http://java.sun.com/j2se/javadoc/writingdoccomments/index.html#@see.
2504.RE
2505.TP 3
2506@serial\ field\-description | include | exclude
2507Used in the doc comment for a default serializable field.
2508.LP
2509An 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.
2510.LP
2511If 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.
2512.LP
2513The \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:
2514.RS 3
2515.TP 2
2516o
2517A public or protected class that implements \f2Serializable\fP is \f2included\fP unless that class (or its package) is marked \f2@serial exclude\fP.
2518.TP 2
2519o
2520A private or package\-private class that implements \f2Serializable\fP is \f2excluded\fP unless that class (or its package) is marked \f2@serial include\fP.
2521.RE
2522.LP
2523Examples: 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.
2524.LP
2525The tag @serial at a class level overrides @serial at a package level.
2526.LP
2527For more information about how to use these tags, along with an example, see "Documenting Serializable Fields and Data for a Class," Section 1.6 of the \f2Java Object Serialization Specification\fP. Also see the
2528.na
2529\f2Serialization FAQ\fP @
2530.fi
2531http://java.sun.com/products/jdk/serialization/faq/#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
2532.na
2533\f2Sun's criteria\fP @
2534.fi
2535http://java.sun.com/j2se/javadoc/writingapispecs/serialized\-criteria.html for including classes in the serialized form specification.
2536.LP
2537.TP 3
2538@serialField\ field\-name\ field\-type\ field\-description
2539Documents 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.
2540.LP
2541.TP 3
2542@serialData\ data\-description
2543The \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.
2544.LP
2545The \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.
2546.LP
2547.TP 3
2548@since\ since\-text
2549Adds 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:
2550.nf
2551\f3
2552.fl
2553 @since 1.5
2554.fl
2555\fP
2556.fi
2557For 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.
2558.LP
2559.TP 3
2560@throws\ class\-name\ description
2561The \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.
2562.LP
2563To 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.
2564.LP
2565The \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.
2566.LP
2567For more details, see
2568.na
2569\f2writing @throws tags\fP @
2570.fi
2571http://java.sun.com/j2se/javadoc/writingdoccomments/index.html#@exception.
2572.LP
2573.TP 3
2574{@value\ package.class#field}
2575When \f2{@value}\fP is used (without any argument) in the doc comment of a static field, it displays the value of that constant:
2576.nf
2577\f3
2578.fl
2579 /**
2580.fl
2581 * The value of this constant is {@value}.
2582.fl
2583 */
2584.fl
2585 public static final String SCRIPT_START = "<script>"
2586.fl
2587\fP
2588.fi
2589When used with argument \f2package.class#field\fP in any doc comment, it displays the value of the specified constant:
2590.nf
2591\f3
2592.fl
2593 /**
2594.fl
2595 * Evaluates the script starting with {@value #SCRIPT_START}.
2596.fl
2597 */
2598.fl
2599 public String evalScript(String script) {
2600.fl
2601 }
2602.fl
2603\fP
2604.fi
2605The argument \f2package.class#field\fP takes a form identical to that of the @see argument, except that the member must be a static field.
2606.LP
2607These values of these constants are also displayed on the Constant Field Values page.
2608.LP
2609.TP 3
2610@version\ version\-text
2611Adds 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.
2612.LP
2613A 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.
2614.LP
2615For more details, see
2616.na
2617\f2writing @version tags\fP @
2618.fi
2619http://java.sun.com/j2se/javadoc/writingdoccomments/index.html#@version.
2620.RE
2621.SS
2622Where Tags Can Be Used
2623.LP
2624.LP
2625The 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.
2626.LP
2627.RS 3
2628
2629.LP
2630.SS
2631Overview Documentation Tags
2632.LP
2633.LP
2634Overview 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.
2635.LP
2636.LP
2637\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.
2638.LP
2639.LP
2640.TS
2641.if \n+(b.=1 .nr d. \n(.c-\n(c.-1
2642.de 35
2643.ps \n(.s
2644.vs \n(.vu
2645.in \n(.iu
2646.if \n(.u .fi
2647.if \n(.j .ad
2648.if \n(.j=0 .na
2649..
2650.nf
2651.nr #~ 0
2652.if n .nr #~ 0.6n
2653.ds #d .d
2654.if \(ts\n(.z\(ts\(ts .ds #d nl
2655.fc
2656.nr 33 \n(.s
2657.rm 80
2658.nr 34 \n(.lu
2659.eo
2660.am 80
2661.br
2662.di a+
2663.35
2664.ft \n(.f
2665.ll \n(34u*1u/2u
2666.if \n(.l<\n(80 .ll \n(80u
2667.in 0
2668\f2@see\fP
2669.br
2670\f2@since\fP
2671.br
2672\f2@author\fP
2673.br
2674\f2@version\fP
2675.br
2676\f2{@link}\fP
2677.br
2678\f2{@linkplain}\fP
2679.br
2680\f2{@docRoot}\fP
2681.br
2682.di
2683.nr a| \n(dn
2684.nr a- \n(dl
2685..
2686.ec \
2687.35
2688.nf
2689.ll \n(34u
2690.nr 80 0
2691.nr 38 \w\f3Overview Tags\fP
2692.if \n(80<\n(38 .nr 80 \n(38
2693.80
2694.rm 80
2695.nr 38 \n(a-
2696.if \n(80<\n(38 .nr 80 \n(38
2697.35
2698.nf
2699.ll \n(34u
2700.nr 38 1n
2701.nr 79 0
2702.nr 40 \n(79+(0*\n(38)
2703.nr 80 +\n(40
2704.nr TW \n(80
2705.if t .if \n(TW>\n(.li .tm Table at line 1816 file Input is too wide - \n(TW units
2706.fc  
2707.nr #T 0-1
2708.nr #a 0-1
2709.eo
2710.de T#
2711.ds #d .d
2712.if \(ts\n(.z\(ts\(ts .ds #d nl
2713.mk ##
2714.nr ## -1v
2715.ls 1
2716.ls
2717..
2718.ec
2719.ta \n(80u
2720.nr 31 \n(.f
2721.nr 35 1m
2722\&\h'|\n(40u'\f3Overview Tags\fP
2723.ne \n(a|u+\n(.Vu
2724.if (\n(a|+\n(#^-1v)>\n(#- .nr #- +(\n(a|+\n(#^-\n(#--1v)
2725.ta \n(80u
2726.nr 31 \n(.f
2727.nr 35 1m
2728\&\h'|\n(40u'
2729.mk ##
2730.nr 31 \n(##
2731.sp |\n(##u-1v
2732.nr 37 \n(40u
2733.in +\n(37u
2734.a+
2735.in -\n(37u
2736.mk 32
2737.if \n(32>\n(31 .nr 31 \n(32
2738.sp |\n(31u
2739.fc
2740.nr T. 1
2741.T# 1
2742.35
2743.rm a+
2744.TE
2745.if \n-(b.=0 .nr c. \n(.c-\n(d.-20
2746
2747.LP
2748.SS
2749Package Documentation Tags
2750.LP
2751.LP
2752Package 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.
2753.LP
2754.LP
2755.TS
2756.if \n+(b.=1 .nr d. \n(.c-\n(c.-1
2757.de 35
2758.ps \n(.s
2759.vs \n(.vu
2760.in \n(.iu
2761.if \n(.u .fi
2762.if \n(.j .ad
2763.if \n(.j=0 .na
2764..
2765.nf
2766.nr #~ 0
2767.if n .nr #~ 0.6n
2768.ds #d .d
2769.if \(ts\n(.z\(ts\(ts .ds #d nl
2770.fc
2771.nr 33 \n(.s
2772.rm 80
2773.nr 34 \n(.lu
2774.eo
2775.am 80
2776.br
2777.di a+
2778.35
2779.ft \n(.f
2780.ll \n(34u*1u/2u
2781.if \n(.l<\n(80 .ll \n(80u
2782.in 0
2783\f2@see\fP
2784.br
2785\f2@since\fP
2786.br
2787\f2@serial\fP
2788.br
2789\f2@author\fP
2790.br
2791\f2@version\fP
2792.br
2793\f2{@link}\fP
2794.br
2795\f2{@linkplain}\fP
2796.br
2797\f2{@docRoot}\fP
2798.br
2799.di
2800.nr a| \n(dn
2801.nr a- \n(dl
2802..
2803.ec \
2804.35
2805.nf
2806.ll \n(34u
2807.nr 80 0
2808.nr 38 \w\f3Package Tags\fP
2809.if \n(80<\n(38 .nr 80 \n(38
2810.80
2811.rm 80
2812.nr 38 \n(a-
2813.if \n(80<\n(38 .nr 80 \n(38
2814.35
2815.nf
2816.ll \n(34u
2817.nr 38 1n
2818.nr 79 0
2819.nr 40 \n(79+(0*\n(38)
2820.nr 80 +\n(40
2821.nr TW \n(80
2822.if t .if \n(TW>\n(.li .tm Table at line 1848 file Input is too wide - \n(TW units
2823.fc  
2824.nr #T 0-1
2825.nr #a 0-1
2826.eo
2827.de T#
2828.ds #d .d
2829.if \(ts\n(.z\(ts\(ts .ds #d nl
2830.mk ##
2831.nr ## -1v
2832.ls 1
2833.ls
2834..
2835.ec
2836.ta \n(80u
2837.nr 31 \n(.f
2838.nr 35 1m
2839\&\h'|\n(40u'\f3Package Tags\fP
2840.ne \n(a|u+\n(.Vu
2841.if (\n(a|+\n(#^-1v)>\n(#- .nr #- +(\n(a|+\n(#^-\n(#--1v)
2842.ta \n(80u
2843.nr 31 \n(.f
2844.nr 35 1m
2845\&\h'|\n(40u'
2846.mk ##
2847.nr 31 \n(##
2848.sp |\n(##u-1v
2849.nr 37 \n(40u
2850.in +\n(37u
2851.a+
2852.in -\n(37u
2853.mk 32
2854.if \n(32>\n(31 .nr 31 \n(32
2855.sp |\n(31u
2856.fc
2857.nr T. 1
2858.T# 1
2859.35
2860.rm a+
2861.TE
2862.if \n-(b.=0 .nr c. \n(.c-\n(d.-22
2863
2864.LP
2865.SS
2866Class and Interface Documentation Tags
2867.LP
2868.LP
2869The 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.
2870.LP
2871.LP
2872.TS
2873.if \n+(b.=1 .nr d. \n(.c-\n(c.-1
2874.de 35
2875.ps \n(.s
2876.vs \n(.vu
2877.in \n(.iu
2878.if \n(.u .fi
2879.if \n(.j .ad
2880.if \n(.j=0 .na
2881..
2882.nf
2883.nr #~ 0
2884.if n .nr #~ 0.6n
2885.ds #d .d
2886.if \(ts\n(.z\(ts\(ts .ds #d nl
2887.fc
2888.nr 33 \n(.s
2889.rm 80
2890.nr 34 \n(.lu
2891.eo
2892.am 80
2893.br
2894.di a+
2895.35
2896.ft \n(.f
2897.ll \n(34u*1u/2u
2898.if \n(.l<\n(80 .ll \n(80u
2899.in 0
2900\f2@see\fP
2901.br
2902\f2@since\fP
2903.br
2904\f2@deprecated\fP
2905.br
2906\f2@serial\fP
2907.br
2908\f2@author\fP
2909.br
2910\f2@version\fP
2911.br
2912\f2{@link}\fP
2913.br
2914\f2{@linkplain}\fP
2915.br
2916\f2{@docRoot}\fP
2917.br
2918.di
2919.nr a| \n(dn
2920.nr a- \n(dl
2921..
2922.ec \
2923.35
2924.nf
2925.ll \n(34u
2926.nr 80 0
2927.nr 38 \w\f3Class/Interface Tags\fP
2928.if \n(80<\n(38 .nr 80 \n(38
2929.80
2930.rm 80
2931.nr 38 \n(a-
2932.if \n(80<\n(38 .nr 80 \n(38
2933.35
2934.nf
2935.ll \n(34u
2936.nr 38 1n
2937.nr 79 0
2938.nr 40 \n(79+(0*\n(38)
2939.nr 80 +\n(40
2940.nr TW \n(80
2941.if t .if \n(TW>\n(.li .tm Table at line 1882 file Input is too wide - \n(TW units
2942.fc  
2943.nr #T 0-1
2944.nr #a 0-1
2945.eo
2946.de T#
2947.ds #d .d
2948.if \(ts\n(.z\(ts\(ts .ds #d nl
2949.mk ##
2950.nr ## -1v
2951.ls 1
2952.ls
2953..
2954.ec
2955.ta \n(80u
2956.nr 31 \n(.f
2957.nr 35 1m
2958\&\h'|\n(40u'\f3Class/Interface Tags\fP
2959.ne \n(a|u+\n(.Vu
2960.if (\n(a|+\n(#^-1v)>\n(#- .nr #- +(\n(a|+\n(#^-\n(#--1v)
2961.ta \n(80u
2962.nr 31 \n(.f
2963.nr 35 1m
2964\&\h'|\n(40u'
2965.mk ##
2966.nr 31 \n(##
2967.sp |\n(##u-1v
2968.nr 37 \n(40u
2969.in +\n(37u
2970.a+
2971.in -\n(37u
2972.mk 32
2973.if \n(32>\n(31 .nr 31 \n(32
2974.sp |\n(31u
2975.fc
2976.nr T. 1
2977.T# 1
2978.35
2979.rm a+
2980.TE
2981.if \n-(b.=0 .nr c. \n(.c-\n(d.-24
2982
2983.LP
2984\f3An example of a class comment:\fP
2985.LP
2986.nf
2987\f3
2988.fl
2989/**
2990.fl
2991 * A class representing a window on the screen.
2992.fl
2993 * For example:
2994.fl
2995 * <pre>
2996.fl
2997 * Window win = new Window(parent);
2998.fl
2999 * win.show();
3000.fl
3001 * </pre>
3002.fl
3003 *
3004.fl
3005 * @author Sami Shaio
3006.fl
3007 * @version 1.13, 06/08/06
3008.fl
3009 * @see java.awt.BaseWindow
3010.fl
3011 * @see java.awt.Button
3012.fl
3013 */
3014.fl
3015class Window extends BaseWindow {
3016.fl
3017 ...
3018.fl
3019}
3020.fl
3021\fP
3022.fi
3023
3024.LP
3025.SS
3026Field Documentation Tags
3027.LP
3028.LP
3029The following are the tags that can appear in the documentation comment for a field.
3030.LP
3031.LP
3032.TS
3033.if \n+(b.=1 .nr d. \n(.c-\n(c.-1
3034.de 35
3035.ps \n(.s
3036.vs \n(.vu
3037.in \n(.iu
3038.if \n(.u .fi
3039.if \n(.j .ad
3040.if \n(.j=0 .na
3041..
3042.nf
3043.nr #~ 0
3044.if n .nr #~ 0.6n
3045.ds #d .d
3046.if \(ts\n(.z\(ts\(ts .ds #d nl
3047.fc
3048.nr 33 \n(.s
3049.rm 80
3050.nr 34 \n(.lu
3051.eo
3052.am 80
3053.br
3054.di a+
3055.35
3056.ft \n(.f
3057.ll \n(34u*1u/2u
3058.if \n(.l<\n(80 .ll \n(80u
3059.in 0
3060\f2@see\fP
3061.br
3062\f2@since\fP
3063.br
3064\f2@deprecated\fP
3065.br
3066\f2@serial\fP
3067.br
3068\f2@serialField\fP
3069.br
3070\f2{@link}\fP
3071.br
3072\f2{@linkplain}\fP
3073.br
3074\f2{@docRoot}\fP
3075.br
3076\f2{@value}\fP
3077.br
3078.di
3079.nr a| \n(dn
3080.nr a- \n(dl
3081..
3082.ec \
3083.35
3084.nf
3085.ll \n(34u
3086.nr 80 0
3087.nr 38 \w\f3Field Tags\fP
3088.if \n(80<\n(38 .nr 80 \n(38
3089.80
3090.rm 80
3091.nr 38 \n(a-
3092.if \n(80<\n(38 .nr 80 \n(38
3093.35
3094.nf
3095.ll \n(34u
3096.nr 38 1n
3097.nr 79 0
3098.nr 40 \n(79+(0*\n(38)
3099.nr 80 +\n(40
3100.nr TW \n(80
3101.if t .if \n(TW>\n(.li .tm Table at line 1957 file Input is too wide - \n(TW units
3102.fc  
3103.nr #T 0-1
3104.nr #a 0-1
3105.eo
3106.de T#
3107.ds #d .d
3108.if \(ts\n(.z\(ts\(ts .ds #d nl
3109.mk ##
3110.nr ## -1v
3111.ls 1
3112.ls
3113..
3114.ec
3115.ta \n(80u
3116.nr 31 \n(.f
3117.nr 35 1m
3118\&\h'|\n(40u'\f3Field Tags\fP
3119.ne \n(a|u+\n(.Vu
3120.if (\n(a|+\n(#^-1v)>\n(#- .nr #- +(\n(a|+\n(#^-\n(#--1v)
3121.ta \n(80u
3122.nr 31 \n(.f
3123.nr 35 1m
3124\&\h'|\n(40u'
3125.mk ##
3126.nr 31 \n(##
3127.sp |\n(##u-1v
3128.nr 37 \n(40u
3129.in +\n(37u
3130.a+
3131.in -\n(37u
3132.mk 32
3133.if \n(32>\n(31 .nr 31 \n(32
3134.sp |\n(31u
3135.fc
3136.nr T. 1
3137.T# 1
3138.35
3139.rm a+
3140.TE
3141.if \n-(b.=0 .nr c. \n(.c-\n(d.-24
3142
3143.LP
3144\f3An example of a field comment:\fP
3145.LP
3146.nf
3147\f3
3148.fl
3149 /**
3150.fl
3151 * The X\-coordinate of the component.
3152.fl
3153 *
3154.fl
3155 * @see #getLocation()
3156.fl
3157 */
3158.fl
3159 int x = 1263732;
3160.fl
3161\fP
3162.fi
3163
3164.LP
3165.SS
3166Constructor and Method Documentation Tags
3167.LP
3168.LP
3169The 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.
3170.LP
3171.LP
3172.TS
3173.if \n+(b.=1 .nr d. \n(.c-\n(c.-1
3174.de 35
3175.ps \n(.s
3176.vs \n(.vu
3177.in \n(.iu
3178.if \n(.u .fi
3179.if \n(.j .ad
3180.if \n(.j=0 .na
3181..
3182.nf
3183.nr #~ 0
3184.if n .nr #~ 0.6n
3185.ds #d .d
3186.if \(ts\n(.z\(ts\(ts .ds #d nl
3187.fc
3188.nr 33 \n(.s
3189.rm 80
3190.nr 34 \n(.lu
3191.eo
3192.am 80
3193.br
3194.di a+
3195.35
3196.ft \n(.f
3197.ll \n(34u*1u/2u
3198.if \n(.l<\n(80 .ll \n(80u
3199.in 0
3200\f2@see\fP
3201.br
3202\f2@since\fP
3203.br
3204\f2@deprecated\fP
3205.br
3206\f2@param\fP
3207.br
3208\f2@return\fP
3209.br
3210\f2@throws\fP and \f2@exception\fP
3211.br
3212\f2@serialData\fP
3213.br
3214\f2{@link}\fP
3215.br
3216\f2{@linkplain}\fP
3217.br
3218\f2{@inheritDoc}\fP
3219.br
3220\f2{@docRoot}\fP
3221.br
3222.di
3223.nr a| \n(dn
3224.nr a- \n(dl
3225..
3226.ec \
3227.35
3228.nf
3229.ll \n(34u
3230.nr 80 0
3231.nr 38 \w\f3Method/Constructor Tags\fP
3232.if \n(80<\n(38 .nr 80 \n(38
3233.80
3234.rm 80
3235.nr 38 \n(a-
3236.if \n(80<\n(38 .nr 80 \n(38
3237.35
3238.nf
3239.ll \n(34u
3240.nr 38 1n
3241.nr 79 0
3242.nr 40 \n(79+(0*\n(38)
3243.nr 80 +\n(40
3244.nr TW \n(80
3245.if t .if \n(TW>\n(.li .tm Table at line 2016 file Input is too wide - \n(TW units
3246.fc  
3247.nr #T 0-1
3248.nr #a 0-1
3249.eo
3250.de T#
3251.ds #d .d
3252.if \(ts\n(.z\(ts\(ts .ds #d nl
3253.mk ##
3254.nr ## -1v
3255.ls 1
3256.ls
3257..
3258.ec
3259.ta \n(80u
3260.nr 31 \n(.f
3261.nr 35 1m
3262\&\h'|\n(40u'\f3Method/Constructor Tags\fP
3263.ne \n(a|u+\n(.Vu
3264.if (\n(a|+\n(#^-1v)>\n(#- .nr #- +(\n(a|+\n(#^-\n(#--1v)
3265.ta \n(80u
3266.nr 31 \n(.f
3267.nr 35 1m
3268\&\h'|\n(40u'
3269.mk ##
3270.nr 31 \n(##
3271.sp |\n(##u-1v
3272.nr 37 \n(40u
3273.in +\n(37u
3274.a+
3275.in -\n(37u
3276.mk 32
3277.if \n(32>\n(31 .nr 31 \n(32
3278.sp |\n(31u
3279.fc
3280.nr T. 1
3281.T# 1
3282.35
3283.rm a+
3284.TE
3285.if \n-(b.=0 .nr c. \n(.c-\n(d.-28
3286
3287.LP
3288\f3An example of a method doc comment:\fP
3289.LP
3290.nf
3291\f3
3292.fl
3293 /**
3294.fl
3295 * Returns the character at the specified index. An index
3296.fl
3297 * ranges from <code>0</code> to <code>length() \- 1</code>.
3298.fl
3299 *
3300.fl
3301 * @param index the index of the desired character.
3302.fl
3303 * @return the desired character.
3304.fl
3305 * @exception StringIndexOutOfRangeException
3306.fl
3307 * if the index is not in the range <code>0</code>
3308.fl
3309 * to <code>length()\-1</code>.
3310.fl
3311 * @see java.lang.Character#charValue()
3312.fl
3313 */
3314.fl
3315 public char charAt(int index) {
3316.fl
3317 ...
3318.fl
3319 }
3320.fl
3321\fP
3322.fi
3323.RE
3324
3325.LP
3326.SH "OPTIONS"
3327.LP
3328.LP
3329The 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.
3330.LP
3331.LP
3332The options are:
3333.LP
3334.RS 3
3335
3336.LP
3337.LP
3338.TS
3339.if \n+(b.=1 .nr d. \n(.c-\n(c.-1
3340.de 35
3341.ps \n(.s
3342.vs \n(.vu
3343.in \n(.iu
3344.if \n(.u .fi
3345.if \n(.j .ad
3346.if \n(.j=0 .na
3347..
3348.nf
3349.nr #~ 0
3350.if n .nr #~ 0.6n
3351.ds #d .d
3352.if \(ts\n(.z\(ts\(ts .ds #d nl
3353.fc
3354.nr 33 \n(.s
3355.rm 80 81 82
3356.nr 34 \n(.lu
3357.eo
3358.am 80
3359.br
3360.di a+
3361.35
3362.ft \n(.f
3363.ll \n(34u*1u/4u
3364.if \n(.l<\n(80 .ll \n(80u
3365.in 0
3366\-\f21.1\fP
3367.br
3368\-author
3369.br
3370\-\f2bootclasspath\fP
3371.br
3372\-bottom
3373.br
3374\-\f2breakiterator\fP
3375.br
3376\-charset
3377.br
3378\-\f2classpath\fP
3379.br
3380\-d
3381.br
3382\-docencoding
3383.br
3384\-docfilessubdirs
3385.br
3386\-\f2doclet\fP
3387.br
3388\-\f2docletpath\fP
3389.br
3390\-doctitle
3391.br
3392\-\f2encoding\fP
3393.br
3394\-\f2exclude\fP
3395.br
3396\-excludedocfilessubdir
3397.br
3398\-\f2extdirs\fP
3399.br
3400\-footer
3401.br
3402\-group
3403.br
3404.br
3405.di
3406.nr a| \n(dn
3407.nr a- \n(dl
3408..
3409.ec \
3410.eo
3411.am 81
3412.br
3413.di b+
3414.35
3415.ft \n(.f
3416.ll \n(34u*1u/4u
3417.if \n(.l<\n(81 .ll \n(81u
3418.in 0
3419\-header
3420.br
3421\-\f2help\fP
3422.br
3423\-helpfile
3424.br
3425\-\f2J\fP
3426.br
3427\-keywords
3428.br
3429\-link
3430.br
3431\-linkoffline
3432.br
3433\-linksource
3434.br
3435\-\f2locale\fP
3436.br
3437\-nocomment
3438.br
3439\-nodeprecated
3440.br
3441\-nodeprecatedlist
3442.br
3443\-nohelp
3444.br
3445\-noindex
3446.br
3447\-nonavbar
3448.br
3449\-noqualifier
3450.br
3451\-nosince
3452.br
3453\-notimestamp
3454.br
3455\-notree
3456.br
3457\-\f2overview\fP
3458.br
3459\-\f2package\fP
3460.br
3461.br
3462.di
3463.nr b| \n(dn
3464.nr b- \n(dl
3465..
3466.ec \
3467.eo
3468.am 82
3469.br
3470.di c+
3471.35
3472.ft \n(.f
3473.ll \n(34u*1u/4u
3474.if \n(.l<\n(82 .ll \n(82u
3475.in 0
3476\-\f2private\fP
3477.br
3478\-\f2protected\fP
3479.br
3480\-\f2public\fP
3481.br
3482\-\f2quiet\fP
3483.br
3484\-serialwarn
3485.br
3486\-\f2source\fP
3487.br
3488\-\f2sourcepath\fP
3489.br
3490\-splitindex
3491.br
3492\-stylesheetfile
3493.br
3494\-\f2subpackages\fP
3495.br
3496\-tag
3497.br
3498\-taglet
3499.br
3500\-tagletpath
3501.br
3502\-title
3503.br
3504\-use
3505.br
3506\-\f2verbose\fP
3507.br
3508\-version
3509.br
3510\-windowtitle
3511.br
3512.br
3513.di
3514.nr c| \n(dn
3515.nr c- \n(dl
3516..
3517.ec \
3518.35
3519.nf
3520.ll \n(34u
3521.nr 80 0
3522.80
3523.rm 80
3524.nr 38 \n(a-
3525.if \n(80<\n(38 .nr 80 \n(38
3526.nr 81 0
3527.81
3528.rm 81
3529.nr 38 \n(b-
3530.if \n(81<\n(38 .nr 81 \n(38
3531.nr 82 0
3532.82
3533.rm 82
3534.nr 38 \n(c-
3535.if \n(82<\n(38 .nr 82 \n(38
3536.35
3537.nf
3538.ll \n(34u
3539.nr 38 1n
3540.nr 79 0
3541.nr 40 \n(79+(0*\n(38)
3542.nr 80 +\n(40
3543.nr 41 \n(80+(3*\n(38)
3544.nr 81 +\n(41
3545.nr 42 \n(81+(3*\n(38)
3546.nr 82 +\n(42
3547.nr TW \n(82
3548.if t .if \n(TW>\n(.li .tm Table at line 2192 file Input is too wide - \n(TW units
3549.fc  
3550.nr #T 0-1
3551.nr #a 0-1
3552.eo
3553.de T#
3554.ds #d .d
3555.if \(ts\n(.z\(ts\(ts .ds #d nl
3556.mk ##
3557.nr ## -1v
3558.ls 1
3559.ls
3560..
3561.ec
3562.ne \n(a|u+\n(.Vu
3563.ne \n(b|u+\n(.Vu
3564.ne \n(c|u+\n(.Vu
3565.if (\n(a|+\n(#^-1v)>\n(#- .nr #- +(\n(a|+\n(#^-\n(#--1v)
3566.if (\n(b|+\n(#^-1v)>\n(#- .nr #- +(\n(b|+\n(#^-\n(#--1v)
3567.if (\n(c|+\n(#^-1v)>\n(#- .nr #- +(\n(c|+\n(#^-\n(#--1v)
3568.ta \n(80u \n(81u \n(82u
3569.nr 31 \n(.f
3570.nr 35 1m
3571\&\h'|\n(40u'\h'|\n(41u'\h'|\n(42u'
3572.mk ##
3573.nr 31 \n(##
3574.sp |\n(##u-1v
3575.nr 37 \n(40u
3576.in +\n(37u
3577.a+
3578.in -\n(37u
3579.mk 32
3580.if \n(32>\n(31 .nr 31 \n(32
3581.sp |\n(##u-1v
3582.nr 37 \n(41u
3583.in +\n(37u
3584.b+
3585.in -\n(37u
3586.mk 32
3587.if \n(32>\n(31 .nr 31 \n(32
3588.sp |\n(##u-1v
3589.nr 37 \n(42u
3590.in +\n(37u
3591.c+
3592.in -\n(37u
3593.mk 32
3594.if \n(32>\n(31 .nr 31 \n(32
3595.sp |\n(31u
3596.fc
3597.nr T. 1
3598.T# 1
3599.35
3600.rm a+
3601.rm b+
3602.rm c+
3603.TE
3604.if \n-(b.=0 .nr c. \n(.c-\n(d.-123
3605
3606.LP
3607.RE
3608.LP
3609Options 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.
3610.LP
3611.SS
3612Javadoc Options
3613.LP
3614.RS 3
3615.TP 3
3616\-overview \ path/filename
3617Specifies 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 \f2\-sourcepath\fP.
3618.LP
3619While 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.
3620.LP
3621For information about the file specified by \f2path/filename\fP, see overview comment file.
3622.LP
3623Note that the overview page is created only if you pass into javadoc two or more package names. For further explanation, see HTML Frames.)
3624.LP
3625The title on the overview page is set by \f2\-doctitle\fP.
3626.LP
3627.TP 3
3628\-public
3629Shows only public classes and members.
3630.LP
3631.TP 3
3632\-protected
3633Shows only protected and public classes and members. This is the default.
3634.LP
3635.TP 3
3636\-package
3637Shows only package, protected, and public classes and members.
3638.LP
3639.TP 3
3640\-private
3641Shows all classes and members.
3642.LP
3643.TP 3
3644\-help
3645Displays the online help, which lists these javadoc and doclet command line options.
3646.LP
3647.TP 3
3648\-doclet\ class
3649Specifies 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.
3650.LP
3651For example, to call the MIF doclet, use:
3652.nf
3653\f3
3654.fl
3655 \-doclet com.sun.tools.doclets.mif.MIFDoclet
3656.fl
3657\fP
3658.fi
3659.LP
3660For full, working examples of running a particular doclet, see
3661.na
3662\f2Running the MIF Doclet\fP @
3663.fi
3664http://java.sun.com/j2se/javadoc/mifdoclet/docs/mifdoclet.html#runningmifdoclet.
3665.LP
3666.TP 3
3667\-docletpath\ classpathlist
3668Specifies 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.
3669.LP
3670Example of path to jar file that contains the starting doclet class file. Notice the jar filename is included.
3671.nf
3672\f3
3673.fl
3674 \-docletpath /home/user/mifdoclet/lib/mifdoclet.jar
3675.fl
3676\fP
3677.fi
3678Example of path to starting doclet class file. Notice the class filename is omitted.
3679.nf
3680\f3
3681.fl
3682 \-docletpath /home/user/mifdoclet/classes/com/sun/tools/doclets/mif/
3683.fl
3684\fP
3685.fi
3686For full, working examples of running a particular doclet, see
3687.na
3688\f2Running the MIF Doclet\fP @
3689.fi
3690http://java.sun.com/j2se/javadoc/mifdoclet/docs/mifdoclet.html#runningmifdoclet.
3691.LP
3692.TP 3
3693\-1.1
3694\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
3695.LP
3696.TP 3
3697\-source release
3698Specifies the version of source code accepted. The following values for \f2release\fP are allowed:
3699.LP
3700.TS
3701.if \n+(b.=1 .nr d. \n(.c-\n(c.-1
3702.de 35
3703.ps \n(.s
3704.vs \n(.vu
3705.in \n(.iu
3706.if \n(.u .fi
3707.if \n(.j .ad
3708.if \n(.j=0 .na
3709..
3710.nf
3711.nr #~ 0
3712.if n .nr #~ 0.6n
3713.ds #d .d
3714.if \(ts\n(.z\(ts\(ts .ds #d nl
3715.fc
3716.nr 33 \n(.s
3717.rm 80 81
3718.nr 34 \n(.lu
3719.eo
3720.am 81
3721.br
3722.di a+
3723.35
3724.ft \n(.f
3725.ll \n(34u*1u/3u
3726.if \n(.l<\n(81 .ll \n(81u
3727.in 0
3728javadoc 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.
3729.br
3730.di
3731.nr a| \n(dn
3732.nr a- \n(dl
3733..
3734.ec \
3735.eo
3736.am 81
3737.br
3738.di b+
3739.35
3740.ft \n(.f
3741.ll \n(34u*1u/3u
3742.if \n(.l<\n(81 .ll \n(81u
3743.in 0
3744javadoc accepts code containing assertions, which were introduced in JDK 1.4.
3745.br
3746.di
3747.nr b| \n(dn
3748.nr b- \n(dl
3749..
3750.ec \
3751.eo
3752.am 81
3753.br
3754.di c+
3755.35
3756.ft \n(.f
3757.ll \n(34u*1u/3u
3758.if \n(.l<\n(81 .ll \n(81u
3759.in 0
3760javadoc does \f2not\fP support assertions, generics, or other language features introduced after JDK 1.3.
3761.br
3762.di
3763.nr c| \n(dn
3764.nr c- \n(dl
3765..
3766.ec \
3767.35
3768.nf
3769.ll \n(34u
3770.nr 80 0
3771.nr 31 0
3772.nr 32 0
3773.nr 38 \w\f31
3774.if \n(31<\n(38 .nr 31 \n(38
3775.nr 38 \w.5\fP
3776.if \n(32<\n(38 .nr 32 \n(38
3777.nr 38 \w\f31
3778.if \n(31<\n(38 .nr 31 \n(38
3779.nr 38 \w.4\fP
3780.if \n(32<\n(38 .nr 32 \n(38
3781.nr 38 \w\f31
3782.if \n(31<\n(38 .nr 31 \n(38
3783.nr 38 \w.3\fP
3784.if \n(32<\n(38 .nr 32 \n(38
3785.80
3786.rm 80
3787.nr 60 \n(31
3788.nr 38 \n(60+\n(32
3789.if \n(38>\n(80 .nr 80 \n(38
3790.if \n(38<\n(80 .nr 60 +(\n(80-\n(38)/2
3791.nr 81 0
3792.81
3793.rm 81
3794.nr 38 \n(a-
3795.if \n(81<\n(38 .nr 81 \n(38
3796.nr 38 \n(b-
3797.if \n(81<\n(38 .nr 81 \n(38
3798.nr 38 \n(c-
3799.if \n(81<\n(38 .nr 81 \n(38
3800.35
3801.nf
3802.ll \n(34u
3803.nr 38 1n
3804.nr 79 0
3805.nr 40 \n(79+(0*\n(38)
3806.nr 80 +\n(40
3807.nr 60 +\n(40
3808.nr 41 \n(80+(3*\n(38)
3809.nr 81 +\n(41
3810.nr TW \n(81
3811.if t .if \n(TW>\n(.li .tm Table at line 2302 file Input is too wide - \n(TW units
3812.fc  
3813.nr #T 0-1
3814.nr #a 0-1
3815.eo
3816.de T#
3817.ds #d .d
3818.if \(ts\n(.z\(ts\(ts .ds #d nl
3819.mk ##
3820.nr ## -1v
3821.ls 1
3822.ls
3823..
3824.ec
3825.ne \n(a|u+\n(.Vu
3826.if (\n(a|+\n(#^-1v)>\n(#- .nr #- +(\n(a|+\n(#^-\n(#--1v)
3827.ta \n(60u \n(80u \n(81u
3828.nr 31 \n(.f
3829.nr 35 1m
3830\&\h'|\n(40u'\f31.5\fP\h'|\n(41u'
3831.mk ##
3832.nr 31 \n(##
3833.sp |\n(##u-1v
3834.nr 37 \n(41u
3835.in +\n(37u
3836.a+
3837.in -\n(37u
3838.mk 32
3839.if \n(32>\n(31 .nr 31 \n(32
3840.sp |\n(31u
3841.ne \n(b|u+\n(.Vu
3842.if (\n(b|+\n(#^-1v)>\n(#- .nr #- +(\n(b|+\n(#^-\n(#--1v)
3843.ta \n(60u \n(80u \n(81u
3844.nr 31 \n(.f
3845.nr 35 1m
3846\&\h'|\n(40u'\f31.4\fP\h'|\n(41u'
3847.mk ##
3848.nr 31 \n(##
3849.sp |\n(##u-1v
3850.nr 37 \n(41u
3851.in +\n(37u
3852.b+
3853.in -\n(37u
3854.mk 32
3855.if \n(32>\n(31 .nr 31 \n(32
3856.sp |\n(31u
3857.ne \n(c|u+\n(.Vu
3858.if (\n(c|+\n(#^-1v)>\n(#- .nr #- +(\n(c|+\n(#^-\n(#--1v)
3859.ta \n(60u \n(80u \n(81u
3860.nr 31 \n(.f
3861.nr 35 1m
3862\&\h'|\n(40u'\f31.3\fP\h'|\n(41u'
3863.mk ##
3864.nr 31 \n(##
3865.sp |\n(##u-1v
3866.nr 37 \n(41u
3867.in +\n(37u
3868.c+
3869.in -\n(37u
3870.mk 32
3871.if \n(32>\n(31 .nr 31 \n(32
3872.sp |\n(31u
3873.fc
3874.nr T. 1
3875.T# 1
3876.35
3877.rm a+
3878.rm b+
3879.rm c+
3880.TE
3881.if \n-(b.=0 .nr c. \n(.c-\n(d.-14
3882.LP
3883Use the value of \f2release\fP corresponding to that used when compiling the code with javac.
3884.LP
3885.TP 3
3886\-sourcepath\ sourcepathlist
3887Specifies 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.
3888.LP
3889Note 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.
3890.LP
3891Set \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:
3892.nf
3893\f3
3894.fl
3895 /home/user/src/com/mypackage/*.java
3896.fl
3897\fP
3898.fi
3899In 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:
3900.nf
3901\f3
3902.fl
3903 % \fP\f3javadoc \-sourcepath /home/user/src/ com.mypackage\fP
3904.fl
3905.fi
3906This 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.
3907.LP
3908To point to two source paths:
3909.nf
3910\f3
3911.fl
3912 % \fP\f3javadoc \-sourcepath /home/user1/src:/home/user2/src com.mypackage\fP
3913.fl
3914.fi
3915.LP
3916.TP 3
3917\-classpath\ classpathlist
3918Specifies 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 class path documentation for specifying \f2classpathlist\fP.
3919.LP
3920If \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.
3921.LP
3922For 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:
3923.nf
3924\f3
3925.fl
3926 % \fP\f3javadoc \-classpath /home/user/lib \-sourcepath /home/user/src com.mypackage\fP
3927.fl
3928.fi
3929As 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.
3930.LP
3931For 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 How Classes Are Found.
3932.LP
3933As 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).
3934.br
3935.br
3936For 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.
3937.LP
3938.TP 3
3939\-subpackages\ \ package1:package2:...
3940Generates 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.
3941.LP
3942For example:
3943.nf
3944\f3
3945.fl
3946 % \fP\f3javadoc \-d docs \-sourcepath /home/user/src \-subpackages java:javax.swing\fP
3947.fl
3948.fi
3949This command generates documentation for packages named "java" and "javax.swing" and all their subpackages.
3950.LP
3951You can use \f2\-subpackages\fP in conjunction with \f2\-exclude\fP to exclude specific packages.
3952.LP
3953.TP 3
3954\-exclude\ \ packagename1:packagename2:...
3955Unconditionally 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:
3956.nf
3957\f3
3958.fl
3959 % \fP\f3javadoc \-sourcepath /home/user/src \-subpackages java \-exclude java.net:java.lang\fP
3960.fl
3961.fi
3962would 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).
3963.LP
3964.TP 3
3965\-bootclasspath\ classpathlist
3966Specifies 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 How Classes Are Found. for more details. Separate directories in \f2classpathlist\fP with colons (:).
3967.LP
3968.TP 3
3969\-extdirs\ dirlist
3970Specifies 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 (:).
3971.LP
3972.TP 3
3973\-verbose
3974Provides 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.
3975.LP
3976.TP 3
3977\-quiet
3978Shuts off non\-error and non\-warning messages, leaving only the warnings and errors appear, making them easier to view. Also suppresses the version string.
3979.LP
3980.TP 3
3981\-breakiterator\
3982Uses the internationalized sentence boundary of \f2java.text.BreakIterator\fP 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.
3983.LP
3984From 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:
3985.RS 3
3986.TP 2
3987o
3988English default sentence\-break algorithm \- Stops at a period followed by a space or a HTML block tag, such as \f2<P>\fP.
3989.TP 2
3990o
3991Breakiterator 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.
3992.RE
3993.RS 3
3994
3995.LP
3996.LP
3997NOTE: 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.
3998.LP
3999.RE
4000.TP 3
4001\-locale\ language_country_variant
4002.RS 3
4003.LP
4004\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.
4005.LP
4006.RE
4007.LP
4008Specifies 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).
4009.LP
4010Specifying 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.
4011.LP
4012.TP 3
4013\-encoding\ name
4014Specifies the encoding name of the source files, such as \f2EUCJIS/SJIS\fP. If this option is not specified, the platform default converter is used.
4015.LP
4016Also see \-docencoding and \-charset.
4017.LP
4018.TP 3
4019\-Jflag
4020Passes \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):
4021.nf
4022\f3
4023.fl
4024 % \fP\f3javadoc \-J\-Xmx32m \-J\-Xms32m\fP \f3com.mypackage\fP
4025.fl
4026.fi
4027To tell what version of javadoc you are using, call the "\f2\-version\fP" option of java:
4028.nf
4029\f3
4030.fl
4031 % \fP\f3javadoc \-J\-version\fP
4032.fl
4033 java version "1.2"
4034.fl
4035 Classic VM (build JDK\-1.2\-V, green threads, sunwjit)
4036.fl
4037.fi
4038(The version number of the standard doclet appears in its output stream.)
4039.RE
4040.SS
4041Options Provided by the Standard Doclet
4042.LP
4043.RS 3
4044.TP 3
4045\-d\ directory
4046Specifies 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.
4047.LP
4048For example, the following generates the documentation for the package \f2com.mypackage\fP and saves the results in the \f2/home/user/doc/\fP directory:
4049.nf
4050\f3
4051.fl
4052 % \fP\f3javadoc \-d /home/user/doc com.mypackage\fP
4053.fl
4054.fi
4055.LP
4056.TP 3
4057\-use
4058Includes 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.
4059.LP
4060For example, let's 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.
4061.LP
4062Note 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.
4063.LP
4064You can access the generated "Use" page by first going to the class or package, then clicking on the "Use" link in the navigation bar.
4065.TP 3
4066\-version
4067Includes 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.
4068.LP
4069.TP 3
4070\-author
4071Includes the @author text in the generated docs.
4072.LP
4073.TP 3
4074\-splitindex
4075Splits the index file into multiple files, alphabetically, one file per letter, plus a file for any index entries that start with non\-alphabetical characters.
4076.LP
4077.TP 3
4078\-windowtitle\ title
4079Specifies 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.
4080.nf
4081\f3
4082.fl
4083 % \fP\f3javadoc \-windowtitle "Java 2 Platform" com.mypackage\fP
4084.fl
4085.fi
4086.TP 3
4087\-doctitle\ title
4088Specifies 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.
4089.nf
4090\f3
4091.fl
4092 % \fP\f3javadoc \-doctitle "Java<sup><font size=\\"\-2\\">TM</font></sup>" com.mypackage\fP
4093.fl
4094.fi
4095.TP 3
4096\-title\ title
4097\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.
4098.LP
4099.TP 3
4100\-header\ header
4101Specifies 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.
4102.nf
4103\f3
4104.fl
4105 % \fP\f3javadoc \-header "<b>Java 2 Platform </b><br>v1.4" com.mypackage\fP
4106.fl
4107.fi
4108.LP
4109.TP 3
4110\-footer\ footer
4111Specifies 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.
4112.LP
4113.TP 3
4114\-bottom\ text
4115Specifies 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.
4116.LP
4117.TP 3
4118\-link\ extdocURL
4119Creates links to existing javadoc\-generated documentation of external referenced classes. It takes one argument:
4120.LP
4121.RS 3
4122.TP 2
4123o
4124\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.
4125.LP
4126You 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.
4127.LP
4128When 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.
4129.LP
4130In 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
4131.na
4132\f2URL Memo\fP @
4133.fi
4134http://www.ietf.org/rfc/rfc1738.txt).
4135.RS 3
4136.TP 3
4137Absolute http: based link:
4138\f2\-link http://<host>/<directory>/<directory>/.../<name>\fP
4139.TP 3
4140Absolute file: based link:
4141\f2\-link file://<host>/<directory>/<directory>/.../<name>\fP
4142.TP 3
4143Relative link:
4144\f2\-link <directory>/<directory>/.../<name>\fP
4145.RE
4146.RE
4147.LP
4148You can specify multiple \f2\-link\fP options in a given javadoc run to link to multiple documents. \f3Choosing between \-linkoffline and \-link\fP:
4149.br
4150Use \f2\-link\fP:
4151.RS 3
4152.TP 2
4153o
4154when using a relative path to the external API document, or
4155.TP 2
4156o
4157when using an absolute URL to the external API document, if your shell allows a program to open a connection to that URL for reading.
4158.RE
4159Use \f2\-linkoffline\fP:
4160.RS 3
4161.TP 2
4162o
4163when 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.
4164.RE
4165.LP
4166\f3Example using absolute links to the external docs\fP \- Let's say you want to link to the \f2java.lang\fP, \f2java.io\fP and other Java 2 Platform packages at
4167.na
4168\f2http://java.sun.com/j2se/1.5.0/docs/api\fP @
4169.fi
4170http://java.sun.com/j2se/1.5.0/docs/api, The following command generates documentation for the package \f2com.mypackage\fP with links to the Java 2 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.)
4171.nf
4172\f3
4173.fl
4174 % \fP\f3javadoc \-link http://java.sun.com/j2se/1.5.0/docs/api com.mypackage\fP
4175.fl
4176.fi
4177\f3Example using relative links to the external docs\fP \- Let's 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:
4178.nf
4179\f3
4180.fl
4181 % \fP\f3javadoc \-d ./spi \-link ../api com.spipackage\fP
4182.fl
4183.fi
4184.LP
4185Notice the \f2\-link\fP argument is relative to the destination directory (\f2docs/spi\fP).
4186.LP
4187\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.
4188.LP
4189Omit 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.)
4190.LP
4191This option can create links in several places in the generated documentation.
4192.LP
4193Another 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.
4194.LP
4195\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:
4196.RS 3
4197.TP 2
4198o
4199In 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:
4200.br
4201\f2import java.io.*;\fP
4202.br
4203In 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.
4204.TP 2
4205o
4206In a declaration:
4207.br
4208\f2void foo(File f) {}\fP
4209.br
4210The 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.
4211.RE
4212.LP
4213An 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.
4214.LP
4215\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.
4216.LP
4217For example, the package list for the Java 2 Platform 5.0 API is located at
4218.na
4219\f2http://java.sun.com/j2se/1.5.0/docs/api/package\-list\fP @
4220.fi
4221http://java.sun.com/j2se/1.5.0/docs/api/package\-list. and starts out as follows:
4222.nf
4223\f3
4224.fl
4225 java.applet
4226.fl
4227 java.awt
4228.fl
4229 java.awt.color
4230.fl
4231 java.awt.datatransfer
4232.fl
4233 java.awt.dnd
4234.fl
4235 java.awt.event
4236.fl
4237 java.awt.font
4238.fl
4239 etc.
4240.fl
4241\fP
4242.fi
4243.LP
4244When 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.
4245.LP
4246In 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.
4247.LP
4248\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.
4249.LP
4250Specify a different link option for each external document to link to:
4251.LP
4252\ \ \f2% \fP\f4javadoc \-link\fP \f2extdocURL1\fP \f4\-link\fP \f2extdocURL2\fP \f2... \fP\f4\-link\fP \f2extdocURLn\fP \f4com.mypackage\fP
4253.LP
4254where \f2extdocURL1\fP,\ \f2extdocURL2\fP,\ ... \f2extdocURLn\fP point respectively to the roots of external documents, each of which contains a file named \f2package\-list\fP.
4255.LP
4256\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.
4257.LP
4258In 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.
4259.LP
4260.TP 3
4261\-linkoffline\ extdocURL\ packagelistLoc
4262This 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.
4263.LP
4264More 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.
4265.LP
4266Another 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.
4267.LP
4268The \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:
4269.RS 3
4270.TP 2
4271o
4272\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.
4273.TP 2
4274o
4275\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.
4276.RE
4277.LP
4278You can specify multiple \f2\-linkoffline\fP options in a given javadoc run. (Prior to 1.2.2, it could be specified only once.)
4279.LP
4280\f3Example using absolute links to the external docs\fP \- Let's say you want to link to the \f2java.lang\fP, \f2java.io\fP and other Java 2 Platform packages at \f2http://java.sun.com/j2se/1.5.0/docs/api\fP, but your shell does not have web access. You could open the \f2package\-list\fP file in a browser at
4281.na
4282\f2http://java.sun.com/j2se/1.5.0/docs/api/package\-list\fP @
4283.fi
4284http://java.sun.com/j2se/1.5.0/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 2 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.)
4285.nf
4286\f3
4287.fl
4288% \fP\f3javadoc \-linkoffline http://java.sun.com/j2se/1.5.0/docs/api . com.mypackage\fP
4289.fl
4290.fi
4291.LP
4292\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.
4293.LP
4294\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.
4295.LP
4296\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):
4297.LP
4298\f2% \fP\f4javadoc \-linkoffline\fP \f2extdocURL1\fP \f2packagelistLoc1\fP \f2\\\fP
4299.br
4300\f2\ \ \ \ \ \ \ \ \ \ \fP\f4\-linkoffline\fP \f2extdocURL2\fP \f2packagelistLoc2\fP \f2\\\fP
4301.br
4302\f2\ \ \ \ \ \ \ \ \ \ ...\fP
4303.LP
4304\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.
4305.LP
4306First, you create a new destination directory (call it \f2update\fP) for this new small run. Let's 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:
4307.nf
4308\f3
4309.fl
4310 % \fP\f3javadoc \-d update \-linkoffline . html com.mypackage\fP
4311.fl
4312.fi
4313When 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.
4314.LP
4315.TP 3
4316\-linksource\
4317Creates 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.
4318.LP
4319\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.
4320.LP
4321Each 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":
4322.nf
4323\f3
4324.fl
4325 public class Button
4326.fl
4327 extends Component
4328.fl
4329 implements Accessible
4330.fl
4331\fP
4332.fi
4333and the link to the source code of the \f2getLabel()\fP method in the Button class would be on the word "getLabel":
4334.nf
4335\f3
4336.fl
4337 public String getLabel()
4338.fl
4339\fP
4340.fi
4341.LP
4342.TP 3
4343\-group\ groupheading\ packagepattern:packagepattern:...
4344Separates 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.
4345.RS 3
4346.TP 2
4347o
4348\f4groupheading\fP can be any text, and can include white space. This text is placed in the table heading for the group.
4349.TP 2
4350o
4351\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).
4352.RE
4353.RS 3
4354
4355.LP
4356.LP
4357\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
4358.LP
4359.RE
4360.LP
4361If 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".
4362.LP
4363For 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.
4364.nf
4365\f3
4366.fl
4367 % \fP\f3javadoc \-group "Core Packages" "java.lang*:java.util"
4368.fl
4369 \-group "Extension Packages" "javax.*"
4370.fl
4371 java.lang java.lang.reflect java.util javax.servlet java.new\fP
4372.fl
4373.fi
4374This results in the groupings:
4375.RS 3
4376.RS 3
4377.TP 3
4378Core Packages
4379\f2java.lang\fP
4380\f2java.lang.reflect\fP
4381\f2java.util\fP
4382.TP 3
4383Extension Packages
4384\f2javax.servlet\fP
4385.TP 3
4386Other Packages
4387\f2java.new\fP
4388.RE
4389
4390.LP
4391.RE
4392.LP
4393.TP 3
4394\-nodeprecated
4395Prevents 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.
4396.LP
4397.TP 3
4398\-nodeprecatedlist
4399Prevents 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.
4400.LP
4401.TP 3
4402\-nosince
4403Omits from the generated docs the "Since" sections associated with the @since tags.
4404.LP
4405.TP 3
4406\-notree
4407Omits 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.
4408.LP
4409.TP 3
4410\-noindex
4411Omits the index from the generated docs. The index is produced by default.
4412.LP
4413.TP 3
4414\-nohelp
4415Omits the HELP link in the navigation bars at the top and bottom of each page of output.
4416.LP
4417.TP 3
4418\-nonavbar
4419Prevents 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.
4420.LP
4421.TP 3
4422\-helpfile\ path/filename
4423Specifies 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:
4424.nf
4425\f3
4426.fl
4427 % \fP\f3javadoc \-helpfile /home/user/myhelp.html java.awt\fP
4428.fl
4429.fi
4430.TP 3
4431\-stylesheetfile\ path/filename
4432Specifies 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:
4433.nf
4434\f3
4435.fl
4436 % \fP\f3javadoc \-stylesheetfile /home/user/mystylesheet.css com.mypackage\fP
4437.fl
4438.fi
4439.TP 3
4440\-serialwarn
4441Generates 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.
4442.LP
4443.TP 3
4444\-charset\ name
4445Specifies the HTML character set for this document. The name should be a preferred MIME name as given in the
4446.na
4447\f2IANA Registry\fP @
4448.fi
4449http://www.iana.org/assignments/character\-sets. For example:
4450.nf
4451\f3
4452.fl
4453 % \fP\f3javadoc \-charset "iso\-8859\-1" mypackage\fP
4454.fl
4455.fi
4456would insert the following line in the head of every generated page:
4457.nf
4458\f3
4459.fl
4460 <META http\-equiv="Content\-Type" content="text/html; charset=ISO\-8859\-1">
4461.fl
4462\fP
4463.fi
4464This META tag is described in the
4465.na
4466\f2HTML standard\fP @
4467.fi
4468http://www.w3.org/TR/REC\-html40/charset.html#h\-5.2.2. (4197265 and 4137321)
4469.LP
4470Also see \-encoding and \-docencoding.
4471.LP
4472.TP 3
4473\-docencoding\ name
4474Specifies the encoding of the generated HTML files. The name should be a preferred MIME name as given in the
4475.na
4476\f2IANA Registry\fP @
4477.fi
4478http://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:
4479.nf
4480\f3
4481.fl
4482 % \fP\f3javadoc \-docencoding "ISO\-8859\-1" mypackage\fP
4483.fl
4484.fi
4485Also see \-encoding and \-charset.
4486.LP
4487.TP 3
4488\-keywords
4489Adds 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.)
4490.LP
4491The 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:
4492.nf
4493\f3
4494.fl
4495 <META NAME="keywords" CONTENT="java.lang.String class">
4496.fl
4497 <META NAME="keywords" CONTENT="CASE_INSENSITIVE_ORDER">
4498.fl
4499 <META NAME="keywords" CONTENT="length()">
4500.fl
4501 <META NAME="keywords" CONTENT="charAt()">
4502.fl
4503\fP
4504.fi
4505.LP
4506.TP 3
4507\-tag\ \ tagname:Xaoptcmf:"taghead"
4508Enables 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.
4509.LP
4510The colon (\f4:\fP) is always the separator. To use a colon in \f2tagname\fP, see Use of Colon in Tag Name.
4511.LP
4512The \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.
4513.LP
4514\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: \f4X\fP (disable tag)
4515.br
4516\f4a\fP (all)
4517.br
4518\f4o\fP (overview)
4519.br
4520\f4p\fP (packages)
4521.br
4522\f4t\fP (types, that is classes and interfaces)
4523.br
4524\f4c\fP (constructors)
4525.br
4526\f4m\fP (methods)
4527.br
4528\f4f\fP (fields)
4529.LP
4530\f3Examples of single tags\fP \- An example of a tag option for a tag that that can be used anywhere in the source code is:
4531.nf
4532\f3
4533.fl
4534 \-tag todo:a:"To Do:"
4535.fl
4536\fP
4537.fi
4538If you wanted @todo to be used only with constructors, methods and fields, you would use:
4539.nf
4540\f3
4541.fl
4542 \-tag todo:cmf:"To Do:"
4543.fl
4544\fP
4545.fi
4546Notice 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:
4547.nf
4548\f3
4549.fl
4550 @todo The documentation for this method needs work.
4551.fl
4552\fP
4553.fi
4554\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:
4555.nf
4556\f3
4557.fl
4558 /**
4559.fl
4560 * @ejb:bean
4561.fl
4562 */
4563.fl
4564\fP
4565.fi
4566use this tag option:
4567.nf
4568\f3
4569.fl
4570 \-tag ejb\\\\:bean:a:"EJB Bean:"
4571.fl
4572\fP
4573.fi
4574\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.
4575.LP
4576You 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:
4577.nf
4578\f3
4579.fl
4580 \-tag todo:Xcmf:"To Do:"
4581.fl
4582\fP
4583.fi
4584or, if you'd rather keep it simple:
4585.nf
4586\f3
4587.fl
4588 \-tag todo:X
4589.fl
4590\fP
4591.fi
4592.LP
4593The syntax \f2\-tag todo:X\fP works even if \f2@todo\fP is defined by a taglet.
4594.LP
4595\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.
4596.LP
4597If \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.
4598.LP
4599\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):
4600.nf
4601\f3
4602.fl
4603 \-tag param
4604.fl
4605 \-tag return
4606.fl
4607 \-tag todo:a:"To Do:"
4608.fl
4609 \-tag throws
4610.fl
4611 \-tag see
4612.fl
4613 \-tag example:X
4614.fl
4615\fP
4616.fi
4617.LP
4618When 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.
4619.LP
4620The 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.
4621.LP
4622\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. Sun 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 Sun. In other words, if you create a tag or taglet \f2@todo\fP, it will always have the same behavior you define, even if Sun later creates a standard tag of the same name.
4623.LP
4624\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
4625.na
4626\f2Comparing Annotations and Javadoc Tags\fP @
4627.fi
4628http://java.sun.com/j2se/javadoc/writingdoccomments/index.html#annotations
4629.LP
4630You can also create more complex block tags, or custom inline tags with the \-taglet option.
4631.LP
4632.TP 3
4633\-taglet\ \ class
4634Specifies 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:
4635.RS 3
4636.TP 2
4637o
4638Taglet Overview
4639.RE
4640.LP
4641Taglets 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.
4642.LP
4643Taglets 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.
4644.LP
4645Use 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:
4646.nf
4647\f3
4648.fl
4649 \-taglet com.sun.tools.doclets.ToDoTaglet
4650.fl
4651 \-tagletpath /home/taglets
4652.fl
4653 \-tag return
4654.fl
4655 \-tag param
4656.fl
4657 \-tag todo
4658.fl
4659 \-tag throws
4660.fl
4661 \-tag see
4662.fl
4663\fP
4664.fi
4665.LP
4666Alternatively, you can use the \f2\-taglet\fP option in place of its \f2\-tag\fP option, but that may be harder to read.
4667.LP
4668.TP 3
4669\-tagletpath\ \ tagletpathlist
4670Specifies 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.
4671.LP
4672.TP 3
4673\-docfilessubdirs\
4674Enables 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.
4675.LP
4676.TP 3
4677\-excludedocfilessubdir\ \ name1:name2...
4678Excludes any "\f2doc\-files\fP" subdirectories with the given names. This prevents the copying of SCCS and other source\-code\-control subdirectories.
4679.LP
4680.TP 3
4681\-noqualifier\ \ all\ | \ packagename1:packagename2:...
4682Omits 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.
4683.LP
4684The following example omits all package qualifiers:
4685.nf
4686\f3
4687.fl
4688 \-noqualifier all
4689.fl
4690\fP
4691.fi
4692The following example omits "java.lang" and "java.io" package qualifiers:
4693.nf
4694\f3
4695.fl
4696 \-noqualifier java.lang:java.io
4697.fl
4698\fP
4699.fi
4700The following example omits package qualifiers starting with "java", and "com.sun" subpackages (but not "javax"):
4701.nf
4702\f3
4703.fl
4704 \-noqualifier java.*:com.sun.*
4705.fl
4706\fP
4707.fi
4708Where 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.
4709.LP
4710.TP 3
4711\-notimestamp\
4712Suppresses 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:
4713.nf
4714\f3
4715.fl
4716 <!\-\- Generated by javadoc (build 1.5.0\-internal) on Tue Jun 22 09:57:24 PDT 2004 \-\->
4717.fl
4718\fP
4719.fi
4720.LP
4721.TP 3
4722\-nocomment\
4723Suppress 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.
4724.RE
4725.SH "COMMAND LINE ARGUMENT FILES"
4726.LP
4727.LP
4728To 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.
4729.LP
4730.LP
4731An 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.
4732.LP
4733.LP
4734Filenames 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.
4735.LP
4736.LP
4737When 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.
4738.LP
4739.SS
4740Example \- Single Arg File
4741.LP
4742.LP
4743You could use a single argument file named "\f2argfile\fP" to hold all Javadoc arguments:
4744.LP
4745.nf
4746\f3
4747.fl
4748 % \fP\f3javadoc @argfile\fP
4749.fl
4750.fi
4751
4752.LP
4753.LP
4754This argument file could contain the contents of both files shown in the next example.
4755.LP
4756.SS
4757Example \- Two Arg Files
4758.LP
4759.LP
4760You 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.)
4761.LP
4762.LP
4763Create a file named "\f2options\fP" containing:
4764.LP
4765.nf
4766\f3
4767.fl
4768 \-d docs\-filelist
4769.fl
4770 \-use
4771.fl
4772 \-splitindex
4773.fl
4774 \-windowtitle 'Java 2 Platform v1.3 API Specification'
4775.fl
4776 \-doctitle 'Java<sup><font size="\-2">TM</font></sup> 2 Platform 5.0 API Specification'
4777.fl
4778 \-header '<b>Java 2 Platform </b><br><font size="\-1">5.0</font>'
4779.fl
4780 \-bottom 'Copyright 1993\-2000 Sun Microsystems, Inc. All Rights Reserved.'
4781.fl
4782 \-group "Core Packages" "java.*"
4783.fl
4784 \-overview /java/pubs/ws/1.5/src/share/classes/overview\-core.html
4785.fl
4786 \-sourcepath /java/pubs/ws/1.5/src/share/classes
4787.fl
4788\fP
4789.fi
4790
4791.LP
4792.LP
4793Create a file named "\f2packages\fP" containing:
4794.LP
4795.nf
4796\f3
4797.fl
4798 com.mypackage1
4799.fl
4800 com.mypackage2
4801.fl
4802 com.mypackage3
4803.fl
4804\fP
4805.fi
4806
4807.LP
4808.LP
4809You would then run javadoc with:
4810.LP
4811.nf
4812\f3
4813.fl
4814 % \fP\f3javadoc @options @packages\fP
4815.fl
4816.fi
4817
4818.LP
4819.SS
4820Example \- Arg Files with Paths
4821.LP
4822.LP
4823The argument files can have paths, but any filenames inside the files are relative to the current working directory (not \f2path1\fP or \f2path2\fP):
4824.LP
4825.nf
4826\f3
4827.fl
4828 % \fP\f3javadoc @path1/options @path2/packages\fP
4829.fl
4830.fi
4831
4832.LP
4833.SS
4834Example \- Option Arguments
4835.LP
4836.LP
4837Here'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:
4838.LP
4839.nf
4840\f3
4841.fl
4842'<font size="\-1"><a href="http://java.sun.com/cgi\-bin/bugreport.cgi">Submit a
4843.fl
4844bug or feature</a><br><br>Java is a trademark or registered trademark of
4845.fl
4846Sun Microsystems, Inc. in the US and other countries.<br>Copyright 1993\-2000 Sun
4847.fl
4848Microsystems, Inc. 901 San Antonio Road,<br>Palo Alto, California, 94303, U.S.A.
4849.fl
4850All Rights Reserved.</font>'
4851.fl
4852\fP
4853.fi
4854
4855.LP
4856.LP
4857Then run the Javadoc tool with:
4858.LP
4859.nf
4860\f3
4861.fl
4862 % \fP\f3javadoc \-bottom @bottom @packages\fP
4863.fl
4864.fi
4865
4866.LP
4867.LP
4868Or you could include the \f2\-bottom\fP option at the start of the argument file, and then just run it as:
4869.LP
4870.nf
4871\f3
4872.fl
4873 % \fP\f3javadoc @bottom @packages\fP
4874.fl
4875.fi
4876.SH NAME
4877Running
4878.SH "RUNNING JAVADOC"
4879.LP
4880.LP
4881\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.
4882.LP
4883.LP
4884\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 Standard Doclet.
4885.LP
4886.LP
4887\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
4888.na
4889\f2Running the MIF Doclet\fP @
4890.fi
4891http://java.sun.com/j2se/javadoc/mifdoclet/docs/mifdoclet.html#runningmifdoclet.
4892.LP
4893.SH "SIMPLE EXAMPLES"
4894.LP
4895.LP
4896You 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.
4897.LP
4898.SS
4899Documenting One or More Packages
4900.LP
4901.LP
4902To 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.
4903.LP
4904.LP
4905You can run javadoc either by changing directories (with \f2cd\fP) or by using \f2\-sourcepath\fP option. The examples below illustrate both alternatives.
4906.LP
4907.RS 3
4908.TP 2
4909o
4910\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).
4911.nf
4912\f3
4913.fl
4914 % \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
4915.fl
4916.fi
4917.LP
4918To also traverse down other package trees, append their names to the \f2\-subpackages\fP argument, such as \f2java:javax:org.xml.sax\fP.
4919.TP 2
4920o
4921\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:
4922.nf
4923\f3
4924.fl
4925 % \fP\f3cd /home/src/\fP
4926.fl
4927 % \f3javadoc \-d /home/html java.awt java.awt.event\fP
4928.fl
4929.fi
4930.TP 2
4931o
4932\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:
4933.nf
4934\f3
4935.fl
4936 % \fP\f3javadoc \-d /home/html \-sourcepath /home/src java.awt java.awt.event\fP
4937.fl
4938.fi
4939.TP 2
4940o
4941\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.
4942.nf
4943\f3
4944.fl
4945 % \fP\f3javadoc \-d /home/html \-sourcepath /home/src1:/home/src2 java.awt java.awt.event\fP
4946.fl
4947.fi
4948.RE
4949
4950.LP
4951.LP
4952Result: 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.
4953.LP
4954.SS
4955Documenting One or More Classes
4956.LP
4957.LP
4958The 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.
4959.LP
4960.RS 3
4961.TP 2
4962o
4963\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.
4964.nf
4965\f3
4966.fl
4967 % \fP\f3cd /home/src/java/awt\fP
4968.fl
4969 % \f3javadoc \-d /home/html Button.java Canvas.java Graphics*.java\fP
4970.fl
4971.fi
4972This 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.
4973.TP 2
4974o
4975\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.
4976.nf
4977\f3
4978.fl
4979 % \fP\f3cd /home/src/\fP
4980.fl
4981 % \f3javadoc \-d /home/html java/awt/Button.java java/applet/Applet.java\fP
4982.fl
4983.fi
4984This example generates HTML\-formatted documentation for the classes \f2Button\fP and \f2Applet\fP.
4985.TP 2
4986o
4987\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.
4988.nf
4989\f3
4990.fl
4991 % \fP\f3javadoc \-d /home/html /home/src/java/awt/Button.java /home/src/java/awt/Graphics*.java\fP
4992.fl
4993.fi
4994This example generates HTML\-formatted documentation for the class \f2Button\fP and classes beginning with \f2Graphics\fP.
4995.RE
4996
4997.LP
4998.SS
4999Documenting Both Packages and Classes
5000.LP
5001.LP
5002You 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.
5003.LP
5004.nf
5005\f3
5006.fl
5007 % \fP\f3javadoc \-d /home/html \-sourcepath /home/src java.awt /home/src/java/applet/Applet.java\fP
5008.fl
5009.fi
5010
5011.LP
5012.LP
5013This 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.)
5014.LP
5015.SH "REAL WORLD EXAMPLE"
5016.LP
5017.LP
5018The 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 2 Platform, Standard Edition, v1.2.
5019.LP
5020.LP
5021The 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.
5022.LP
5023.SS
5024Command Line Example
5025.LP
5026.LP
5027This command line example is over 900 characters, which is 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.
5028.LP
5029.nf
5030\f3
5031.fl
5032% javadoc \-sourcepath /java/jdk/src/share/classes \\
5033.fl
5034 \-overview /java/jdk/src/share/classes/overview.html \\
5035.fl
5036 \-d /java/jdk/build/api \\
5037.fl
5038 \-use \\
5039.fl
5040 \-splitIndex \\
5041.fl
5042 \-windowtitle 'Java 2 Platform 5.0 API Specification' \\
5043.fl
5044 \-doctitle 'Java<sup><font size="\-2">TM</font></sup> 2 Platform 5.0 API Specification' \\
5045.fl
5046 \-header '<b>Java 2 Platform </b><br><font size="\-1">5.0</font>' \\
5047.fl
5048 \-bottom '<font size="\-1"><a href="http://java.sun.com/cgi\-bin/bugreport.cgi">Submit
5049.fl
5050a bug or feature</a><br><br>Java is a trademark or registered trademark of Sun Microsystems,
5051.fl
5052Inc. in the US and other countries.<br>Copyright 1993\-1999 Sun Microsystems, Inc.
5053.fl
5054901 San Antonio Road,<br>Palo Alto, California, 94303, U.S.A. All Rights Reserved.</font>' \\
5055.fl
5056 \-group "Core Packages" "java.*:com.sun.java.*:org.omg.*" \\
5057.fl
5058 \-group "Extension Packages" "javax.*" \\
5059.fl
5060 \-J\-Xmx180m \\
5061.fl
5062 @packages
5063.fl
5064\fP
5065.fi
5066
5067.LP
5068.LP
5069where \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.
5070.LP
5071.SS
5072Makefile Example
5073.LP
5074.LP
5075This is an example of a GNU makefile. For an example of a Windows makefile, see
5076.na
5077\f2creating a makefile for Windows\fP @
5078.fi
5079http://java.sun.com/j2se/javadoc/faq/index.html#makefiles.
5080.LP
5081.nf
5082\f3
5083.fl
5084javadoc \-\fP\f3sourcepath\fP\f3 $(SRCDIR) \\ /* Sets path for source files */
5085.fl
5086 \-\fP\f3overview\fP\f3 $(SRCDIR)/overview.html \\ /* Sets file for overview text */
5087.fl
5088 \-\fP\f3d\fP\f3 /java/jdk/build/api \\ /* Sets destination directory */
5089.fl
5090 \-\fP\f3use\fP\f3 \\ /* Adds "Use" files */
5091.fl
5092 \-\fP\f3splitIndex\fP\f3 \\ /* Splits index A\-Z */
5093.fl
5094 \-\fP\f3windowtitle\fP\f3 $(WINDOWTITLE) \\ /* Adds a window title */
5095.fl
5096 \-\fP\f3doctitle\fP\f3 $(DOCTITLE) \\ /* Adds a doc title */
5097.fl
5098 \-\fP\f3header\fP\f3 $(HEADER) \\ /* Adds running header text */
5099.fl
5100 \-\fP\f3bottom\fP\f3 $(BOTTOM) \\ /* Adds text at bottom */
5101.fl
5102 \-\fP\f3group\fP\f3 $(GROUPCORE) \\ /* 1st subhead on overview page */
5103.fl
5104 \-\fP\f3group\fP\f3 $(GROUPEXT) \\ /* 2nd subhead on overview page */
5105.fl
5106 \-\fP\f3J\fP\f3\-Xmx180m \\ /* Sets memory to 180MB */
5107.fl
5108 java.lang java.lang.reflect \\ /* Sets packages to document */
5109.fl
5110 java.util java.io java.net \\
5111.fl
5112 java.applet
5113.fl
5114
5115.fl
5116WINDOWTITLE = 'Java 2 Platform v1.2 API Specification'
5117.fl
5118DOCTITLE = 'Java<sup><font size="\-2">TM</font></sup> 2 Platform v1.2 API Specification'
5119.fl
5120HEADER = '<b>Java 2 Platform </b><br><font size="\-1">v1.2</font>'
5121.fl
5122BOTTOM = '<font size="\-1"><a href="http://java.sun.com/cgi\-bin/bugreport.cgi">Submit
5123.fl
5124 a bug or feature</a><br><br>Java is a trademark or registered trademark
5125.fl
5126 of Sun Microsystems, Inc. in the US and other countries.<br>Copyright 1993\-1999
5127.fl
5128 Sun Microsystems, Inc. 901 San Antonio Road,<br>Palo Alto, California, 94303, U.S.A.
5129.fl
5130 All Rights Reserved.</font>'
5131.fl
5132GROUPCORE = '"Core Packages" "java.*:com.sun.java.*:org.omg.*"'
5133.fl
5134GROUPEXT = '"Extension Packages" "javax.*"'
5135.fl
5136SRCDIR = '/java/jdk/1.2/src/share/classes'
5137.fl
5138\fP
5139.fi
5140
5141.LP
5142.LP
5143Single quotes are used to surround makefile arguments.
5144.LP
5145.LP
5146\f3NOTES\fP
5147.LP
5148.RS 3
5149.TP 2
5150o
5151If 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.
5152.TP 2
5153o
5154If you omit the \f2\-footer\fP option, as done here, the Javadoc tool copies the header text to the footer.
5155.TP 2
5156o
5157Other important options you might want to use but not needed in this example are \-\f2classpath\fP and \-\f2link\fP.
5158.RE
5159
5160.LP
5161.SH "TROUBLESHOOTING"
5162.LP
5163.SS
5164General Troubleshooting
5165.LP
5166.RS 3
5167.TP 2
5168o
5169\f3Javadoc FAQ\fP \- Commonly\-encountered bugs and troubleshooting tips can be found on the
5170.na
5171\f2Javadoc FAQ\fP @
5172.fi
5173http://java.sun.com/j2se/javadoc/faq/index.html#B
5174.TP 2
5175o
5176\f3Bugs and Limitations\fP \- You can also see some bugs listed at
5177.na
5178\f2Important Bug Fixes and Changes\fP @
5179.fi
5180http://java.sun.com/j2se/1.5.0/fixedbugs/index.html.
5181.TP 2
5182o
5183\f3Version number\fP \- See version numbers.
5184.TP 2
5185o
5186\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.
5187.RE
5188
5189.LP
5190.SS
5191Errors and Warnings
5192.LP
5193.LP
5194Error and warning messages contain the filename and line number to the declaration line rather than to the particular line in the doc comment.
5195.LP
5196.RS 3
5197.TP 2
5198o
5199\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.
5200.RE
5201
5202.LP
5203.SH "ENVIRONMENT"
5204.LP
5205.RS 3
5206.TP 3
5207CLASSPATH
5208Environment 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:
5209.:/home/classes:/usr/local/java/classes
5210.RE
5211
5212.LP
5213.SH "SEE ALSO"
5214.LP
5215.RS 3
5216.TP 2
5217o
5218javac
5219.TP 2
5220o
5221java
5222.TP 2
5223o
5224jdb
5225.TP 2
5226o
5227javah
5228.TP 2
5229o
5230javap
5231.TP 2
5232o
5233.na
5234\f2Javadoc Home Page\fP @
5235.fi
5236http://java.sun.com/j2se/javadoc/index.jsp
5237.TP 2
5238o
5239.na
5240\f2How to Write Doc Comments for Javadoc\fP @
5241.fi
5242http://java.sun.com/j2se/javadoc/writingdoccomments/index.html
5243.TP 2
5244o
5245Setting the Class Path
5246.TP 2
5247o
5248How Javac and Javadoc Find Classes (tools.jar)
5249.RE
5250
5251.LP
5252.LP
5253Javadoc is a trademark of Sun Microsystems, Inc. (The \f2javadoc\fP command itself does not require the trademark symbol.)