changeset 31876 | 91b22707521a |
parent 21743 | 3d979da7bdf0 |
31875:dc0feb520d54 | 31876:91b22707521a |
---|---|
1 '\" t |
1 '\" t |
2 .\" Copyright (c) 1994, 2013, Oracle and/or its affiliates. All rights reserved. |
2 .\" Copyright (c) 1994, 2015, Oracle and/or its affiliates. All rights reserved. |
3 .\" |
|
4 .\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 .\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
5 .\" |
4 .\" |
6 .\" This code is free software; you can redistribute it and/or modify it |
5 .\" 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 |
6 .\" under the terms of the GNU General Public License version 2 only, as |
8 .\" published by the Free Software Foundation. |
7 .\" published by the Free Software Foundation. |
9 .\" |
8 .\" |
10 .\" This code is distributed in the hope that it will be useful, but WITHOUT |
9 .\" 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 |
10 .\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
12 .\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
11 .\" 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 |
12 .\" version 2 for more details (a copy is included in the LICENSE file that |
14 .\" accompanied this code). |
13 .\" accompanied this code). |
15 .\" |
14 .\" |
16 .\" You should have received a copy of the GNU General Public License version |
15 .\" 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, |
16 .\" 2 along with this work; if not, write to the Free Software Foundation, |
21 .\" or visit www.oracle.com if you need additional information or have any |
20 .\" or visit www.oracle.com if you need additional information or have any |
22 .\" questions. |
21 .\" questions. |
23 .\" |
22 .\" |
24 .\" Arch: generic |
23 .\" Arch: generic |
25 .\" Software: JDK 8 |
24 .\" Software: JDK 8 |
26 .\" Date: 10 May 2011 |
25 .\" Date: 03 March 2015 |
27 .\" SectDesc: Basic Tools |
26 .\" SectDesc: Basic Tools |
28 .\" Title: javadoc.1 |
27 .\" Title: javadoc.1 |
29 .\" |
28 .\" |
30 .if n .pl 99999 |
29 .if n .pl 99999 |
31 .TH javadoc 1 "10 May 2011" "JDK 8" "Basic Tools" |
30 .TH javadoc 1 "03 March 2015" "JDK 8" "Basic Tools" |
32 .\" ----------------------------------------------------------------- |
31 .\" ----------------------------------------------------------------- |
33 .\" * Define some portability stuff |
32 .\" * Define some portability stuff |
34 .\" ----------------------------------------------------------------- |
33 .\" ----------------------------------------------------------------- |
35 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
34 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
36 .\" http://bugs.debian.org/507673 |
35 .\" http://bugs.debian.org/507673 |
207 .fi |
206 .fi |
208 .nf |
207 .nf |
209 \f3package java\&.lang\&.applet;\fP |
208 \f3package java\&.lang\&.applet;\fP |
210 .fi |
209 .fi |
211 .nf |
210 .nf |
212 \f3\fR |
211 \f3\fP |
213 .fi |
212 .fi |
214 .sp |
213 .sp |
215 |
214 |
216 .PP |
215 .PP |
217 The package\&.html File |
216 The package\&.html File |
249 .fi |
248 .fi |
250 .nf |
249 .nf |
251 \f3initialize, start, and stop the applet\&. \fP |
250 \f3initialize, start, and stop the applet\&. \fP |
252 .fi |
251 .fi |
253 .nf |
252 .nf |
254 \f3\fR |
253 \f3\fP |
255 .fi |
254 .fi |
256 .nf |
255 .nf |
257 \f3@since 1\&.0 \fP |
256 \f3@since 1\&.0 \fP |
258 .fi |
257 .fi |
259 .nf |
258 .nf |
264 .fi |
263 .fi |
265 .nf |
264 .nf |
266 \f3</HTML>\fP |
265 \f3</HTML>\fP |
267 .fi |
266 .fi |
268 .nf |
267 .nf |
269 \f3\fR |
268 \f3\fP |
270 .fi |
269 .fi |
271 .sp |
270 .sp |
272 The \f3package\&.html\fR file is a typical HTML file and does not include a package declaration\&. The content of the package comment file is written in HTML with one exception\&. The documentation comment should not include the comment separators \f3/**\fR and \f3*/\fR or leading asterisks\&. When writing the comment, make the first sentence a summary about the package, and do not put a title or any other text between the \f3<body>\fR tag and the first sentence\&. You can include package tags\&. All block tags must appear after the main description\&. If you add an \f3@see\fR tag in a package comment file, then it must have a fully qualified name\&. |
271 The \f3package\&.html\fR file is a typical HTML file and does not include a package declaration\&. The content of the package comment file is written in HTML with one exception\&. The documentation comment should not include the comment separators \f3/**\fR and \f3*/\fR or leading asterisks\&. When writing the comment, make the first sentence a summary about the package, and do not put a title or any other text between the \f3<body>\fR tag and the first sentence\&. You can include package tags\&. All block tags must appear after the main description\&. If you add an \f3@see\fR tag in a package comment file, then it must have a fully qualified name\&. |
273 .PP |
272 .PP |
274 Processing the Comment File |
273 Processing the Comment File |
332 .fi |
331 .fi |
333 .nf |
332 .nf |
334 \f3 */\fP |
333 \f3 */\fP |
335 .fi |
334 .fi |
336 .nf |
335 .nf |
337 \f3\fR |
336 \f3\fP |
338 .fi |
337 .fi |
339 .sp |
338 .sp |
340 .SS TEST\ AND\ TEMPLATE\ FILES |
339 .SS TEST\ AND\ TEMPLATE\ FILES |
341 You can store test and template files in the source tree in the same directory with or in a subdirectory of the directory where the source files reside\&. To prevent test and template files from being processed, run the \f3javadoc\fR command and explicitly pass in individual source file names\&. |
340 You can store test and template files in the source tree in the same directory with or in a subdirectory of the directory where the source files reside\&. To prevent test and template files from being processed, run the \f3javadoc\fR command and explicitly pass in individual source file names\&. |
342 .PP |
341 .PP |
348 .sp |
347 .sp |
349 .nf |
348 .nf |
350 \f3com/package1/test\-files/\fP |
349 \f3com/package1/test\-files/\fP |
351 .fi |
350 .fi |
352 .nf |
351 .nf |
353 \f3\fR |
352 \f3\fP |
354 .fi |
353 .fi |
355 .sp |
354 .sp |
356 If your test files contain documentation comments, then you can set up a separate run of the \f3javadoc\fR command to produce test file documentation by passing in their test source file names with wild cards, such as \f3com/package1/test-files/*\&.java\fR\&. |
355 If your test files contain documentation comments, then you can set up a separate run of the \f3javadoc\fR command to produce test file documentation by passing in their test source file names with wild cards, such as \f3com/package1/test-files/*\&.java\fR\&. |
357 .PP |
356 .PP |
358 Template Files |
357 Template Files |
558 .fi |
557 .fi |
559 .nf |
558 .nf |
560 \f3implements Serializable\fP |
559 \f3implements Serializable\fP |
561 .fi |
560 .fi |
562 .nf |
561 .nf |
563 \f3\fR |
562 \f3\fP |
564 .fi |
563 .fi |
565 .sp |
564 .sp |
566 The declaration for the \f3Boolean\&.valueOf\fR method is: |
565 The declaration for the \f3Boolean\&.valueOf\fR method is: |
567 .sp |
566 .sp |
568 .nf |
567 .nf |
569 \f3public static Boolean valueOf(String s)\fP |
568 \f3public static Boolean valueOf(String s)\fP |
570 .fi |
569 .fi |
571 .nf |
570 .nf |
572 \f3\fR |
571 \f3\fP |
573 .fi |
572 .fi |
574 .sp |
573 .sp |
575 The \f3javadoc\fR command can include the modifiers \f3public\fR, \f3protected\fR, \f3private\fR, \f3abstract\fR, \f3final\fR, \f3static\fR, \f3transient\fR, and \f3volatile\fR, but not \f3synchronized\fR or \f3native\fR\&. The \f3synchronized\fR and \f3native\fR modifiers are considered implementation detail and not part of the API specification\&. |
574 The \f3javadoc\fR command can include the modifiers \f3public\fR, \f3protected\fR, \f3private\fR, \f3abstract\fR, \f3final\fR, \f3static\fR, \f3transient\fR, and \f3volatile\fR, but not \f3synchronized\fR or \f3native\fR\&. The \f3synchronized\fR and \f3native\fR modifiers are considered implementation detail and not part of the API specification\&. |
576 .PP |
575 .PP |
577 Rather than relying on the keyword \f3synchronized\fR, APIs should document their concurrency semantics in the main description of the comment\&. For example, a description might be: A single enumeration cannot be used by multiple threads concurrently\&. The document should not describe how to achieve these semantics\&. As another example, while the \f3Hashtable\fR option should be thread-safe, there is no reason to specify that it is achieved by synchronizing all of its exported methods\&. It is better to reserve the right to synchronize internally at the bucket level for higher concurrency\&. |
576 Rather than relying on the keyword \f3synchronized\fR, APIs should document their concurrency semantics in the main description of the comment\&. For example, a description might be: A single enumeration cannot be used by multiple threads concurrently\&. The document should not describe how to achieve these semantics\&. As another example, while the \f3Hashtable\fR option should be thread-safe, there is no reason to specify that it is achieved by synchronizing all of its exported methods\&. It is better to reserve the right to synchronize internally at the bucket level for higher concurrency\&. |
591 .fi |
590 .fi |
592 .nf |
591 .nf |
593 \f3 */\fP |
592 \f3 */\fP |
594 .fi |
593 .fi |
595 .nf |
594 .nf |
596 \f3\fR |
595 \f3\fP |
597 .fi |
596 .fi |
598 .sp |
597 .sp |
599 To save space you can put a comment on one line: |
598 To save space you can put a comment on one line: |
600 .sp |
599 .sp |
601 .nf |
600 .nf |
602 \f3/** This comment takes up only one line\&. */\fP |
601 \f3/** This comment takes up only one line\&. */\fP |
603 .fi |
602 .fi |
604 .nf |
603 .nf |
605 \f3\fR |
604 \f3\fP |
606 .fi |
605 .fi |
607 .sp |
606 .sp |
608 |
607 |
609 .PP |
608 .PP |
610 Placement of Comments |
609 Placement of Comments |
621 .fi |
620 .fi |
622 .nf |
621 .nf |
623 \f3 */\fP |
622 \f3 */\fP |
624 .fi |
623 .fi |
625 .nf |
624 .nf |
626 \f3\fR |
625 \f3\fP |
627 .fi |
626 .fi |
628 .nf |
627 .nf |
629 \f3import com\&.example; // MISTAKE \- Important not to put import statement here\fP |
628 \f3import com\&.example; // MISTAKE \- Important not to put import statement here\fP |
630 .fi |
629 .fi |
631 .nf |
630 .nf |
632 \f3\fR |
631 \f3\fP |
633 .fi |
632 .fi |
634 .nf |
633 .nf |
635 \f3public class Whatever{ }\fP |
634 \f3public class Whatever{ }\fP |
636 .fi |
635 .fi |
637 .nf |
636 .nf |
638 \f3\fR |
637 \f3\fP |
639 .fi |
638 .fi |
640 .sp |
639 .sp |
641 |
640 |
642 .PP |
641 .PP |
643 Parts of Comments |
642 Parts of Comments |
655 .fi |
654 .fi |
656 .nf |
655 .nf |
657 \f3 */\fP |
656 \f3 */\fP |
658 .fi |
657 .fi |
659 .nf |
658 .nf |
660 \f3\fR |
659 \f3\fP |
661 .fi |
660 .fi |
662 .sp |
661 .sp |
663 |
662 |
664 .PP |
663 .PP |
665 Block and inline Tags |
664 Block and inline Tags |
674 .fi |
673 .fi |
675 .nf |
674 .nf |
676 \f3 */\fP |
675 \f3 */\fP |
677 .fi |
676 .fi |
678 .nf |
677 .nf |
679 \f3\fR |
678 \f3\fP |
680 .fi |
679 .fi |
681 .sp |
680 .sp |
682 |
681 |
683 .PP |
682 .PP |
684 Write Comments in HTML |
683 Write Comments in HTML |
698 .fi |
697 .fi |
699 .nf |
698 .nf |
700 \f3 */\fP |
699 \f3 */\fP |
701 .fi |
700 .fi |
702 .nf |
701 .nf |
703 \f3\fR |
702 \f3\fP |
704 .fi |
703 .fi |
705 .sp |
704 .sp |
706 |
705 |
707 .PP |
706 .PP |
708 Leading Asterisks |
707 Leading Asterisks |
728 .fi |
727 .fi |
729 .nf |
728 .nf |
730 \f3public int x, y; // Avoid this \fP |
729 \f3public int x, y; // Avoid this \fP |
731 .fi |
730 .fi |
732 .nf |
731 .nf |
733 \f3\fR |
732 \f3\fP |
734 .fi |
733 .fi |
735 .sp |
734 .sp |
736 The \f3javadoc\fR command generates the following documentation from the previous code: |
735 The \f3javadoc\fR command generates the following documentation from the previous code: |
737 .sp |
736 .sp |
738 .nf |
737 .nf |
739 \f3public int x\fP |
738 \f3public int x\fP |
740 .fi |
739 .fi |
741 .nf |
740 .nf |
742 \f3\fR |
741 \f3\fP |
743 .fi |
742 .fi |
744 .sp |
743 .sp |
745 The horizontal and vertical distances of point (x, y)\&. |
744 The horizontal and vertical distances of point (x, y)\&. |
746 .sp |
745 .sp |
747 .nf |
746 .nf |
748 \f3public int y\fP |
747 \f3public int y\fP |
749 .fi |
748 .fi |
750 .nf |
749 .nf |
751 \f3\fR |
750 \f3\fP |
752 .fi |
751 .fi |
753 .sp |
752 .sp |
754 The horizontal and vertical distances of point (x, y)\&. |
753 The horizontal and vertical distances of point (x, y)\&. |
755 .PP |
754 .PP |
756 Use of Header Tags |
755 Use of Header Tags |
870 .fi |
869 .fi |
871 .nf |
870 .nf |
872 \f3 */\fP |
871 \f3 */\fP |
873 .fi |
872 .fi |
874 .nf |
873 .nf |
875 \f3\fR |
874 \f3\fP |
876 .fi |
875 .fi |
877 .sp |
876 .sp |
878 |
877 |
879 |
878 |
880 This tag is needed because the generated documents are in hierarchical directories, as deep as the number of subpackages\&. The expression: \f3<a href="{@docRoot}/copyright\&.html">\fR resolves to \f3<a href="\&.\&./\&.\&./copyright\&.html">\fR for \f3java/lang/Object\&.java\fR and \f3<a href="\&.\&./\&.\&./\&.\&./copyright\&.html">\fR for \f3java/lang/ref/Reference\&.java\fR\&. |
879 This tag is needed because the generated documents are in hierarchical directories, as deep as the number of subpackages\&. The expression: \f3<a href="{@docRoot}/copyright\&.html">\fR resolves to \f3<a href="\&.\&./\&.\&./copyright\&.html">\fR for \f3java/lang/Object\&.java\fR and \f3<a href="\&.\&./\&.\&./\&.\&./copyright\&.html">\fR for \f3java/lang/ref/Reference\&.java\fR\&. |
897 \(bu |
896 \(bu |
898 In the main description block of a method\&. In this case, the main description is copied from a class or interface up the hierarchy\&. |
897 In the main description block of a method\&. In this case, the main description is copied from a class or interface up the hierarchy\&. |
899 .TP 0.2i |
898 .TP 0.2i |
900 \(bu |
899 \(bu |
901 In the text arguments of the \f3@return\fR, \f3@param,\fR and \f3@throws\fR tags of a method\&. In this case, the tag text is copied from the corresponding tag up the hierarchy\&. |
900 In the text arguments of the \f3@return\fR, \f3@param,\fR and \f3@throws\fR tags of a method\&. In this case, the tag text is copied from the corresponding tag up the hierarchy\&. |
902 .RE |
901 .RE |
903 .RS |
902 |
903 |
|
904 See Method Comment Inheritance for a description of how comments are found in the inheritance hierarchy\&. Note that if this tag is missing, then the comment is or is not automatically inherited according to rules described in that section\&. |
904 See Method Comment Inheritance for a description of how comments are found in the inheritance hierarchy\&. Note that if this tag is missing, then the comment is or is not automatically inherited according to rules described in that section\&. |
905 |
|
906 .RE |
|
907 .TP |
905 .TP |
908 {@link \fIpackage\&.class#member label\fR} |
906 {@link \fIpackage\&.class#member label\fR} |
909 Introduced in JDK 1\&.2 |
907 Introduced in JDK 1\&.2 |
910 |
908 |
911 Inserts an inline link with a visible text label that points to the documentation for the specified package, class, or member name of a referenced class\&. This tag is valid in all documentation comments: overview, package, class, interface, constructor, method and field, including the text portion of any tag, such as the \f3@return\fR, \f3@param\fR and \f3@deprecated\fR tags\&. See @link in How to Write Doc Comments for the Javadoc Tool at http://www\&.oracle\&.com/technetwork/java/javase/documentation/index-137868\&.html#{@link |
909 Inserts an inline link with a visible text label that points to the documentation for the specified package, class, or member name of a referenced class\&. This tag is valid in all documentation comments: overview, package, class, interface, constructor, method and field, including the text portion of any tag, such as the \f3@return\fR, \f3@param\fR and \f3@deprecated\fR tags\&. See @link in How to Write Doc Comments for the Javadoc Tool at http://www\&.oracle\&.com/technetwork/java/javase/documentation/index-137868\&.html#{@link |
918 .sp |
916 .sp |
919 .nf |
917 .nf |
920 \f3Use the {@link #getComponentAt(int, int) getComponentAt} method\&.\fP |
918 \f3Use the {@link #getComponentAt(int, int) getComponentAt} method\&.\fP |
921 .fi |
919 .fi |
922 .nf |
920 .nf |
923 \f3\fR |
921 \f3\fP |
924 .fi |
922 .fi |
925 .sp |
923 .sp |
926 |
924 |
927 |
925 |
928 From this code, the standard doclet generates the following HTML (assuming it refers to another class in the same package): |
926 From this code, the standard doclet generates the following HTML (assuming it refers to another class in the same package): |
929 .sp |
927 .sp |
930 .nf |
928 .nf |
931 \f3Use the <a href="Component\&.html#getComponentAt(int, int)">getComponentAt</a> method\&.\fP |
929 \f3Use the <a href="Component\&.html#getComponentAt(int, int)">getComponentAt</a> method\&.\fP |
932 .fi |
930 .fi |
933 .nf |
931 .nf |
934 \f3\fR |
932 \f3\fP |
935 .fi |
933 .fi |
936 .sp |
934 .sp |
937 |
935 |
938 |
936 |
939 The previous line appears on the web page as: |
937 The previous line appears on the web page as: |
940 .sp |
938 .sp |
941 .nf |
939 .nf |
942 \f3Use the getComponentAt method\&.\fP |
940 \f3Use the getComponentAt method\&.\fP |
943 .fi |
941 .fi |
944 .nf |
942 .nf |
945 \f3\fR |
943 \f3\fP |
946 .fi |
944 .fi |
947 .sp |
945 .sp |
948 |
946 |
949 .TP |
947 .TP |
950 {@linkplain \fIpackage\&.class#member label\fR} |
948 {@linkplain \fIpackage\&.class#member label\fR} |
980 .fi |
978 .fi |
981 .nf |
979 .nf |
982 \f3}\fP |
980 \f3}\fP |
983 .fi |
981 .fi |
984 .nf |
982 .nf |
985 \f3\fR |
983 \f3\fP |
986 .fi |
984 .fi |
987 .sp |
985 .sp |
988 |
986 |
989 |
987 |
990 Example of a type parameter of a method: |
988 Example of a type parameter of a method: |
1012 .fi |
1010 .fi |
1013 .nf |
1011 .nf |
1014 \f3}\fP |
1012 \f3}\fP |
1015 .fi |
1013 .fi |
1016 .nf |
1014 .nf |
1017 \f3\fR |
1015 \f3\fP |
1018 .fi |
1016 .fi |
1019 .sp |
1017 .sp |
1020 |
1018 |
1021 .TP |
1019 .TP |
1022 @return \fIdescription\fR |
1020 @return \fIdescription\fR |
1069 .fi |
1067 .fi |
1070 .nf |
1068 .nf |
1071 \f3 */\fP |
1069 \f3 */\fP |
1072 .fi |
1070 .fi |
1073 .nf |
1071 .nf |
1074 \f3\fR |
1072 \f3\fP |
1075 .fi |
1073 .fi |
1076 .sp |
1074 .sp |
1077 |
1075 |
1078 |
1076 |
1079 The standard doclet produces HTML that is similar to: |
1077 The standard doclet produces HTML that is similar to: |
1089 .fi |
1087 .fi |
1090 .nf |
1088 .nf |
1091 \f3</dl>\fP |
1089 \f3</dl>\fP |
1092 .fi |
1090 .fi |
1093 .nf |
1091 .nf |
1094 \f3\fR |
1092 \f3\fP |
1095 .fi |
1093 .fi |
1096 .sp |
1094 .sp |
1097 |
1095 |
1098 |
1096 |
1099 The previous code looks similar to the following in a browser, where the label is the visible link text: |
1097 The previous code looks similar to the following in a browser, where the label is the visible link text: |
1126 .fi |
1124 .fi |
1127 .nf |
1125 .nf |
1128 \f3@see #constructor(Type argname, Type argname,\&.\&.\&.) \fP |
1126 \f3@see #constructor(Type argname, Type argname,\&.\&.\&.) \fP |
1129 .fi |
1127 .fi |
1130 .nf |
1128 .nf |
1131 \f3\fR |
1129 \f3\fP |
1132 .fi |
1130 .fi |
1133 .nf |
1131 .nf |
1134 \f3\fIReferencing another class in the current or imported packages\fR\fP |
1132 \f3\fIReferencing another class in the current or imported packages\fR\fP |
1135 .fi |
1133 .fi |
1136 .nf |
1134 .nf |
1153 .fi |
1151 .fi |
1154 .nf |
1152 .nf |
1155 \f3@see Class \fP |
1153 \f3@see Class \fP |
1156 .fi |
1154 .fi |
1157 .nf |
1155 .nf |
1158 \f3\fR |
1156 \f3\fP |
1159 .fi |
1157 .fi |
1160 .nf |
1158 .nf |
1161 \f3\fIReferencing an element in another package (fully qualified)\fR\fP |
1159 \f3\fIReferencing an element in another package (fully qualified)\fR\fP |
1162 .fi |
1160 .fi |
1163 .nf |
1161 .nf |
1183 .fi |
1181 .fi |
1184 .nf |
1182 .nf |
1185 \f3@see package\fP |
1183 \f3@see package\fP |
1186 .fi |
1184 .fi |
1187 .nf |
1185 .nf |
1188 \f3\fR |
1186 \f3\fP |
1189 .fi |
1187 .fi |
1190 .sp |
1188 .sp |
1191 \f3\fRNotes about the previous listing: |
1189 \f3\fRNotes about the previous listing: |
1192 .TP 0.2i |
1190 .TP 0.2i |
1193 \(bu |
1191 \(bu |
1213 .TP 0.4i |
1211 .TP 0.4i |
1214 2\&. |
1212 2\&. |
1215 Any enclosing classes and interfaces searching the closest first\&. |
1213 Any enclosing classes and interfaces searching the closest first\&. |
1216 .TP 0.4i |
1214 .TP 0.4i |
1217 3\&. |
1215 3\&. |
1218 Any superclasses and superonterfaces, searching the closest first\&. |
1216 Any superclasses and superinterfaces, searching the closest first\&. |
1219 .TP 0.4i |
1217 .TP 0.4i |
1220 4\&. |
1218 4\&. |
1221 The current package\&. |
1219 The current package\&. |
1222 .TP 0.4i |
1220 .TP 0.4i |
1223 5\&. |
1221 5\&. |
1305 .fi |
1303 .fi |
1306 .nf |
1304 .nf |
1307 \f3@see "The Java Programming Language" // "The Java Programming Language" \fP |
1305 \f3@see "The Java Programming Language" // "The Java Programming Language" \fP |
1308 .fi |
1306 .fi |
1309 .nf |
1307 .nf |
1310 \f3\fR |
1308 \f3\fP |
1311 .fi |
1309 .fi |
1312 .sp |
1310 .sp |
1313 \fINote:\fR You can extend the \f3@se\fR\f3e\fR tag to link to classes not being documented with the \f3-link\fR option\&. |
1311 \fINote:\fR You can extend the \f3@se\fR\f3e\fR tag to link to classes not being documented with the \f3-link\fR option\&. |
1314 .TP |
1312 .TP |
1315 @serial \fIfield-description\fR | include | exclude |
1313 @serial \fIfield-description\fR | include | exclude |
1316 Introduced in JDK 1\&.2 |
1314 Introduced in JDK 1\&.2 |
1317 |
1315 |
1318 Used in the documentation comment for a default serializable field\&. See Documenting Serializable Fields and Data for a Class at http://docs\&.oracle\&.com/javase/8/docs/platform/serialization/spec/serial-arch\&.html#5251 |
1316 Used in the documentation comment for a default serializable field\&. See Documenting Serializable Fields and Data for a Class at http://docs\&.oracle\&.com/javase/8/docs/platform/serialization/spec/serial-arch\&.html#5251 |
1319 |
1317 |
1320 See also Oracle\(cqs Criteria for Including Classes in the Serialilzed Form Specification at http://www\&.oracle\&.com/technetwork/java/javase/documentation/serialized-criteria-137781\&.html |
1318 See also Oracle\(cqs Criteria for Including Classes in the Serialized Form Specification at http://www\&.oracle\&.com/technetwork/java/javase/documentation/serialized-criteria-137781\&.html |
1321 |
1319 |
1322 An optional \f3field-description\fR should explain the meaning of the field and list the acceptable values\&. When needed, the description can span multiple lines\&. The standard doclet adds this information to the serialized form page\&. See Cross-Reference Pages\&. |
1320 An optional \f3field-description\fR should explain the meaning of the field and list the acceptable values\&. When needed, the description can span multiple lines\&. The standard doclet adds this information to the serialized form page\&. See Cross-Reference Pages\&. |
1323 |
1321 |
1324 If a serializable field was added to a class after the class was made serializable, then a statement should be added to its main description to identify at which version it was added\&. |
1322 If a serializable field was added to a class after the class was made serializable, then a statement should be added to its main description to identify at which version it was added\&. |
1325 |
1323 |
1329 \(bu |
1327 \(bu |
1330 A public or protected class that implements \f3Serializable\fR is included unless that class (or its package) is marked with the \f3@serial exclude\fR tag\&. |
1328 A public or protected class that implements \f3Serializable\fR is included unless that class (or its package) is marked with the \f3@serial exclude\fR tag\&. |
1331 .TP 0.2i |
1329 .TP 0.2i |
1332 \(bu |
1330 \(bu |
1333 A private or package-private class that implements \f3Serializable\fR is excluded unless that class (or its package) is marked with the \f3@serial include\fR tag\&. |
1331 A private or package-private class that implements \f3Serializable\fR is excluded unless that class (or its package) is marked with the \f3@serial include\fR tag\&. |
1334 .RE |
1332 .RE |
1335 .RS |
1333 |
1334 |
|
1336 For example, the \f3javax\&.swing\fR package is marked with the \f3@serial\fR\f3exclude\fR tag in package\&.html or package-info\&.java\&. The public class \f3java\&.security\&.BasicPermission\fR is marked with the \f3@serial exclude\fR tag\&. The package-private class \f3java\&.util\&.PropertyPermissionCollection\fR is marked with the \f3@serial include\fR tag\&. |
1335 For example, the \f3javax\&.swing\fR package is marked with the \f3@serial\fR\f3exclude\fR tag in package\&.html or package-info\&.java\&. The public class \f3java\&.security\&.BasicPermission\fR is marked with the \f3@serial exclude\fR tag\&. The package-private class \f3java\&.util\&.PropertyPermissionCollection\fR is marked with the \f3@serial include\fR tag\&. |
1337 |
1336 |
1338 The \f3@serial\fR tag at the class level overrides the \f3@serial\fR tag at the package level\&. |
1337 The \f3@serial\fR tag at the class level overrides the \f3@serial\fR tag at the package level\&. |
1339 |
|
1340 .RE |
|
1341 .TP |
1338 .TP |
1342 @serialData \fIdata-description\fR |
1339 @serialData \fIdata-description\fR |
1343 Introduced in JDK 1\&.2 |
1340 Introduced in JDK 1\&.2 |
1344 |
1341 |
1345 Uses the data description value to document the types and order of data in the serialized form\&. This data includes the optional data written by the \f3writeObject\fR method and all data (including base classes) written by the \f3Externalizable\&.writeExternal\fR method\&. |
1342 Uses the data description value to document the types and order of data in the serialized form\&. This data includes the optional data written by the \f3writeObject\fR method and all data (including base classes) written by the \f3Externalizable\&.writeExternal\fR method\&. |
1385 .fi |
1382 .fi |
1386 .nf |
1383 .nf |
1387 \f3public static final String SCRIPT_START = "<script>"\fP |
1384 \f3public static final String SCRIPT_START = "<script>"\fP |
1388 .fi |
1385 .fi |
1389 .nf |
1386 .nf |
1390 \f3\fR |
1387 \f3\fP |
1391 .fi |
1388 .fi |
1392 .sp |
1389 .sp |
1393 |
1390 |
1394 |
1391 |
1395 When used with the argument \f3package\&.class#field\fR in any documentation comment, he \f3{@value}\fR tag displays the value of the specified constant: |
1392 When used with the argument \f3package\&.class#field\fR in any documentation comment, he \f3{@value}\fR tag displays the value of the specified constant: |
1405 .fi |
1402 .fi |
1406 .nf |
1403 .nf |
1407 \f3public String evalScript(String script) {}\fP |
1404 \f3public String evalScript(String script) {}\fP |
1408 .fi |
1405 .fi |
1409 .nf |
1406 .nf |
1410 \f3\fR |
1407 \f3\fP |
1411 .fi |
1408 .fi |
1412 .sp |
1409 .sp |
1413 |
1410 |
1414 |
1411 |
1415 The argument \f3package\&.class#field\fR takes a form similar to that of the \f3@see\fR tag argument, except that the member must be a static field\&. |
1412 The argument \f3package\&.class#field\fR takes a form similar to that of the \f3@see\fR tag argument, except that the member must be a static field\&. |
1492 .fi |
1489 .fi |
1493 .nf |
1490 .nf |
1494 \f3}\fP |
1491 \f3}\fP |
1495 .fi |
1492 .fi |
1496 .nf |
1493 .nf |
1497 \f3\fR |
1494 \f3\fP |
1498 .fi |
1495 .fi |
1499 .sp |
1496 .sp |
1500 .SS FIELD\ TAGS |
1497 .SS FIELD\ TAGS |
1501 These tags can appear in fields: |
1498 These tags can appear in fields: |
1502 .PP |
1499 .PP |
1521 .fi |
1518 .fi |
1522 .nf |
1519 .nf |
1523 \f3 int x = 1263732;\fP |
1520 \f3 int x = 1263732;\fP |
1524 .fi |
1521 .fi |
1525 .nf |
1522 .nf |
1526 \f3\fR |
1523 \f3\fP |
1527 .fi |
1524 .fi |
1528 .sp |
1525 .sp |
1529 .SS CONSTRUCTOR\ AND\ METHOD\ TAGS |
1526 .SS CONSTRUCTOR\ AND\ METHOD\ TAGS |
1530 The following tags can appear in the documentation comment for a constructor or a method, except for the \f3@return\fR tag, which cannot appear in a constructor, and the \f3{@inheritDoc}\fR tag, which has restrictions\&. |
1527 The following tags can appear in the documentation comment for a constructor or a method, except for the \f3@return\fR tag, which cannot appear in a constructor, and the \f3{@inheritDoc}\fR tag, which has restrictions\&. |
1531 .PP |
1528 .PP |
1576 .fi |
1573 .fi |
1577 .nf |
1574 .nf |
1578 \f3 }\fP |
1575 \f3 }\fP |
1579 .fi |
1576 .fi |
1580 .nf |
1577 .nf |
1581 \f3\fR |
1578 \f3\fP |
1582 .fi |
1579 .fi |
1583 .sp |
1580 .sp |
1584 .SH OPTIONS |
1581 .SH OPTIONS |
1585 The \f3javadoc\fR command uses doclets to determine its output\&. The \f3javadoc\fR command uses the default standard doclet unless a custom doclet is specified with the \f3-doclet\fR option\&. The \f3javadoc\fR command provides a set of command-line options that can be used with any doclet\&. These options are described in Javadoc Options\&. The standard doclet provides an additional set of command-line options that are described in Standard Doclet Options\&. All option names are not case-sensitive, but their arguments are case-sensitive\&. |
1582 The \f3javadoc\fR command uses doclets to determine its output\&. The \f3javadoc\fR command uses the default standard doclet unless a custom doclet is specified with the \f3-doclet\fR option\&. The \f3javadoc\fR command provides a set of command-line options that can be used with any doclet\&. These options are described in Javadoc Options\&. The standard doclet provides an additional set of command-line options that are described in Standard Doclet Options\&. All option names are not case-sensitive, but their arguments are case-sensitive\&. |
1586 .TP 0.2i |
1583 .TP 0.2i |
1590 \(bu |
1587 \(bu |
1591 See also Standard Doclet Options |
1588 See also Standard Doclet Options |
1592 .PP |
1589 .PP |
1593 The options are: |
1590 The options are: |
1594 .PP |
1591 .PP |
1595 -1\&.1 || -author || -bootclasspath classpathlist || -bottom text || -breakiterator || -charset name || -classpath classpathlist || -d directory || -docencoding name || -docfilesubdirs || -doclet class || -docletpath classpathlist || -doctitle title || -encoding || -exclude packagename1:packagename2:\&.\&.\&. || -excludedocfilessubdir name1:name2 || -extdirs dirist || -footer footer || -group groupheading packagepattern:packagepattern || -header header || -help || -helpfile path\efilename || -Jflag || -keywords || -link extdocURL || -linkoffline extdocURL packagelistLoc || -linksource || -locale language_country_variant || -nocomment || -nodeprecated || -nodeprecatedlist || -nohelp || -noindex || -nonavbar || -noqualifier all | packagename1:packagename2\&.\&.\&. || -nosince || -notimestamp || -notree || -overview path/filename || -package || -private || -protected || -public || -quiet || -serialwarn || -source release || -sourcepath sourcepathlist || -sourcetab tablength || -splitindex || -stylesheet path/filename || -subpackages package1:package2:\&.\&.\&. || -tag tagname:Xaoptcmf:"taghead" || -taglet class || -tagletpath tagletpathlist || -title title || -top || -use || -verbose || -version || -windowtitle title |
1592 -1\&.1 || -author || -bootclasspath classpathlist || -bottom text || -breakiterator || -charset name || -classpath classpathlist || -d directory || -docencoding name || -docfilesubdirs || -doclet class || -docletpath classpathlist || -doctitle title || -encoding || -exclude packagename1:packagename2:\&.\&.\&. || -excludedocfilessubdir name1:name2 || -extdirs dirist || -footer footer || -group groupheading packagepattern:packagepattern || -header header || -help || -helpfile path\efilename || -Jflag || -javafx ||-keywords || -link extdocURL || -linkoffline extdocURL packagelistLoc || -linksource || -locale language_country_variant || -nocomment || -nodeprecated || -nodeprecatedlist || -nohelp || -noindex || -nonavbar || -noqualifier all | packagename1:packagename2\&.\&.\&. || -nosince || -notimestamp || -notree || -overview path/filename || -package || -private || -protected || -public || -quiet || -serialwarn || -source release || -sourcepath sourcepathlist || -sourcetab tablength || -splitindex || -stylesheet path/filename || -subpackages package1:package2:\&.\&.\&. || -tag tagname:Xaoptcmf:"taghead" || -taglet class || -tagletpath tagletpathlist || -title title || -top || -use || -verbose || -version || -windowtitle title |
1596 .PP |
1593 .PP |
1597 The following options are the core Javadoc options that are available to all doclets\&. The standard doclet provides the rest of the doclets: \f3-bootclasspath\fR, \f3-breakiterator\fR, \f3-classpath\fR, \f3-doclet\fR, \f3-docletpath\fR, \f3-encoding\fR, -\f3exclude\fR, \f3-extdirs\fR, \f3-help\fR, \f3-locale\fR, \f3-\fR\f3overview\fR, \f3-package\fR, \f3-private\fR, \f3-protected\fR, \f3-public\fR, \f3-quiet\fR, \f3-source\fR, \f3-sourcepath\fR, \f3-subpackages\fR, and \f3-verbose\fR\&. |
1594 The following options are the core Javadoc options that are available to all doclets\&. The standard doclet provides the rest of the doclets: \f3-bootclasspath\fR, \f3-breakiterator\fR, \f3-classpath\fR, \f3-doclet\fR, \f3-docletpath\fR, \f3-encoding\fR, -\f3exclude\fR, \f3-extdirs\fR, \f3-help\fR, \f3-locale\fR, \f3-\fR\f3overview\fR, \f3-package\fR, \f3-private\fR, \f3-protected\fR, \f3-public\fR, \f3-quiet\fR, \f3-source\fR, \f3-sourcepath\fR, \f3-subpackages\fR, and \f3-verbose\fR\&. |
1598 .SS JAVADOC\ OPTIONS |
1595 .SS JAVADOC\ OPTIONS |
1599 .TP |
1596 .TP |
1600 -overview \fIpath/filename\fR |
1597 -overview \fIpath/filename\fR |
1633 \(bu |
1630 \(bu |
1634 \f3-Xdoclint all\fR : enable all groups of checks |
1631 \f3-Xdoclint all\fR : enable all groups of checks |
1635 .TP 0.2i |
1632 .TP 0.2i |
1636 \(bu |
1633 \(bu |
1637 \f3-Xdoclint all,\fR\fI-group\fR : enable all except \fIgroup\fR checks |
1634 \f3-Xdoclint all,\fR\fI-group\fR : enable all except \fIgroup\fR checks |
1638 .RE |
1635 .RE |
1639 .RS |
1636 |
1637 |
|
1640 The variable \fIgroup\fR has one of the following values: |
1638 The variable \fIgroup\fR has one of the following values: |
1641 .RS |
1639 .RS |
1642 |
|
1643 .RE |
|
1644 .TP 0.2i |
1640 .TP 0.2i |
1645 \(bu |
1641 \(bu |
1646 \f3accessibility\fR : Checks for the issues to be detected by an accessibility checker (for example, no caption or summary attributes specified in a \f3<table>\fR tag)\&. |
1642 \f3accessibility\fR : Checks for the issues to be detected by an accessibility checker (for example, no caption or summary attributes specified in a \f3<table>\fR tag)\&. |
1647 .TP 0.2i |
1643 .TP 0.2i |
1648 \(bu |
1644 \(bu |
1654 \(bu |
1650 \(bu |
1655 \f3reference\fR : Checks for issues relating to the references to Java API elements from Javadoc tags (for example, item not found in \f3@see\fR , or a bad name after \f3@param)\fR\&. |
1651 \f3reference\fR : Checks for issues relating to the references to Java API elements from Javadoc tags (for example, item not found in \f3@see\fR , or a bad name after \f3@param)\fR\&. |
1656 .TP 0.2i |
1652 .TP 0.2i |
1657 \(bu |
1653 \(bu |
1658 \f3syntax\fR : Checks for low level issues like unescaped angle brackets (\f3<\fR and \f3>\fR) and ampersands (\f3&\fR) and invalid Javadoc tags\&. |
1654 \f3syntax\fR : Checks for low level issues like unescaped angle brackets (\f3<\fR and \f3>\fR) and ampersands (\f3&\fR) and invalid Javadoc tags\&. |
1659 .RE |
1655 .RE |
1660 .RS |
1656 |
1657 |
|
1661 You can specify the \f3-Xdoclint\fR option multiple times to enable the option to check errors and warnings in multiple categories\&. Alternatively, you can specify multiple error and warning categories by using the preceding options\&. For example, use either of the following commands to check for the HTML, syntax, and accessibility issues in the file \fIfilename\fR\&. |
1658 You can specify the \f3-Xdoclint\fR option multiple times to enable the option to check errors and warnings in multiple categories\&. Alternatively, you can specify multiple error and warning categories by using the preceding options\&. For example, use either of the following commands to check for the HTML, syntax, and accessibility issues in the file \fIfilename\fR\&. |
1662 .sp |
1659 .sp |
1663 .nf |
1660 .nf |
1664 \f3javadoc \-Xdoclint:html \-Xdoclint:syntax \-Xdoclint:accessibility \fIfilename\fR\fP |
1661 \f3javadoc \-Xdoclint:html \-Xdoclint:syntax \-Xdoclint:accessibility \fIfilename\fR\fP |
1665 .fi |
1662 .fi |
1666 .nf |
1663 .nf |
1667 \f3javadoc \-Xdoclint:html,syntax,accessibility \fIfilename\fR\fP |
1664 \f3javadoc \-Xdoclint:html,syntax,accessibility \fIfilename\fR\fP |
1668 .fi |
1665 .fi |
1669 .nf |
1666 .nf |
1670 \f3\fR |
1667 \f3\fP |
1671 .fi |
1668 .fi |
1672 .sp |
1669 .sp |
1673 |
1670 |
1674 |
1671 |
1675 \fINote:\fR The \f3javadoc\fR command does not guarantee the completeness of these checks\&. In particular, it is not a full HTML compliance checker\&. The goal of the -\f3Xdoclint\fR option is to enable the \f3javadoc\fR command to report majority of common errors\&. |
1672 \fINote:\fR The \f3javadoc\fR command does not guarantee the completeness of these checks\&. In particular, it is not a full HTML compliance checker\&. The goal of the -\f3Xdoclint\fR option is to enable the \f3javadoc\fR command to report majority of common errors\&. |
1676 |
1673 |
1677 The \f3javadoc\fR command does not attempt to fix invalid input, it just reports it\&. |
1674 The \f3javadoc\fR command does not attempt to fix invalid input, it just reports it\&. |
1678 |
|
1679 .RE |
|
1680 .TP |
1675 .TP |
1681 -public |
1676 -public |
1682 .br |
1677 .br |
1683 Shows only public classes and members\&. |
1678 Shows only public classes and members\&. |
1684 .TP |
1679 .TP |
1738 .sp |
1733 .sp |
1739 .nf |
1734 .nf |
1740 \f3javadoc \-sourcepath /home/user/src/ com\&.mypackage\fP |
1735 \f3javadoc \-sourcepath /home/user/src/ com\&.mypackage\fP |
1741 .fi |
1736 .fi |
1742 .nf |
1737 .nf |
1743 \f3\fR |
1738 \f3\fP |
1744 .fi |
1739 .fi |
1745 .sp |
1740 .sp |
1746 |
1741 |
1747 |
1742 |
1748 Notice that if you concatenate the value of sourcepath and the package name together and change the dot to a slash (/), then you have the full path to the package: |
1743 Notice that if you concatenate the value of sourcepath and the package name together and change the dot to a slash (/), then you have the full path to the package: |
1753 .sp |
1748 .sp |
1754 .nf |
1749 .nf |
1755 \f3javadoc \-sourcepath /home/user1/src:/home/user2/src com\&.mypackage\fP |
1750 \f3javadoc \-sourcepath /home/user1/src:/home/user2/src com\&.mypackage\fP |
1756 .fi |
1751 .fi |
1757 .nf |
1752 .nf |
1758 \f3\fR |
1753 \f3\fP |
1759 .fi |
1754 .fi |
1760 .sp |
1755 .sp |
1761 |
1756 |
1762 .TP |
1757 .TP |
1763 -classpath \fIclasspathlist\fR |
1758 -classpath \fIclasspathlist\fR |
1764 .br |
1759 .br |
1765 Specifies the paths where the \f3javadoc\fR command searches for referenced classes These are the documented classes plus any classes referenced by those classes\&. Separate multiple paths with a colon (:)\&. The \f3javadoc\fR command searches all subdirectories of the specified paths\&. Follow the instructions in the class path documentation for specifying the \f3classpathlist\fR value\&. |
1760 Specifies the paths where the \f3javadoc\fR command searches for referenced classes These are the documented classes plus any classes referenced by those classes\&. Separate multiple paths with a colon (:)\&. The \f3javadoc\fR command searches all subdirectories of the specified paths\&. Follow the instructions in the class path documentation for specifying the \f3classpathlist\fR value\&. |
1766 |
1761 |
1767 If you omit \f3-sourcepath\fR, then the \f3javadoc\fR command uses \f3-classpath\fR to find the source files and class files (for backward compatibility)\&. If you want to search for source and class files in separate paths, then use both \f3-sourcepath\fR and \f3-classpath\fR\&. |
1762 If you omit \f3-sourcepath\fR, then the \f3javadoc\fR command uses \f3-classpath\fR to find the source files and class files (for backward compatibility)\&. If you want to search for source and class files in separate paths, then use both \f3-sourcepath\fR and \f3-classpath\fR\&. |
1768 |
1763 |
1769 For example, if you want to document \f3com\&.mypackage\fR, whose source files reside in the directory /home/user/src/com/mypackage, and if this package relies on a library in /home/user/libthen you would use the following command: |
1764 For example, if you want to document \f3com\&.mypackage\fR, whose source files reside in the directory /home/user/src/com/mypackage, and if this package relies on a library in /home/user/lib, then you would use the following command: |
1770 .sp |
1765 .sp |
1771 .nf |
1766 .nf |
1772 \f3javadoc \-sourcepath /home/user/lib \-classpath /home/user/src com\&.mypackage\fP |
1767 \f3javadoc \-sourcepath /home/user/lib \-classpath /home/user/src com\&.mypackage\fP |
1773 .fi |
1768 .fi |
1774 .nf |
1769 .nf |
1775 \f3\fR |
1770 \f3\fP |
1776 .fi |
1771 .fi |
1777 .sp |
1772 .sp |
1778 |
1773 |
1779 |
1774 |
1780 Similar to other tools, if you do not specify \f3-classpath\fR, then the \f3javadoc\fR command uses the \f3CLASSPATH\fR environment variable when it is set\&. If both are not set, then the \f3javadoc\fR command searches for classes from the current directory\&. |
1775 Similar to other tools, if you do not specify \f3-classpath\fR, then the \f3javadoc\fR command uses the \f3CLASSPATH\fR environment variable when it is set\&. If both are not set, then the \f3javadoc\fR command searches for classes from the current directory\&. |
1793 .sp |
1788 .sp |
1794 .nf |
1789 .nf |
1795 \f3javadoc \-d docs \-sourcepath /home/user/src \-subpackages java:javax\&.swing \fP |
1790 \f3javadoc \-d docs \-sourcepath /home/user/src \-subpackages java:javax\&.swing \fP |
1796 .fi |
1791 .fi |
1797 .nf |
1792 .nf |
1798 \f3\fR |
1793 \f3\fP |
1799 .fi |
1794 .fi |
1800 .sp |
1795 .sp |
1801 |
1796 |
1802 .TP |
1797 .TP |
1803 -exclude \fIpackagename1:packagename2:\&.\&.\&.\fR |
1798 -exclude \fIpackagename1:packagename2:\&.\&.\&.\fR |
1811 .fi |
1806 .fi |
1812 .nf |
1807 .nf |
1813 \f3 java\&.net:java\&.lang\fP |
1808 \f3 java\&.net:java\&.lang\fP |
1814 .fi |
1809 .fi |
1815 .nf |
1810 .nf |
1816 \f3\fR |
1811 \f3\fP |
1817 .fi |
1812 .fi |
1818 .sp |
1813 .sp |
1819 |
1814 |
1820 .TP |
1815 .TP |
1821 -bootclasspath \fIclasspathlist\fR |
1816 -bootclasspath \fIclasspathlist\fR |
1844 \(bu |
1839 \(bu |
1845 English default sentence-break algorithm\&. Stops at a period followed by a space or an HTML block tag, such as \f3<P>\fR\&. |
1840 English default sentence-break algorithm\&. Stops at a period followed by a space or an HTML block tag, such as \f3<P>\fR\&. |
1846 .TP 0.2i |
1841 .TP 0.2i |
1847 \(bu |
1842 \(bu |
1848 Breakiterator sentence-break algorithm\&. Stops at a period, question mark, or exclamation point followed by a space when the next word starts with a capital letter\&. This is meant to handle most abbreviations (such as "The serial no\&. is valid", but will not handle "Mr\&. Smith")\&. The \f3-breakiterator\fR option does not stop at HTML tags or sentences that begin with numbers or symbols\&. The algorithm stops at the last period in \&.\&./filename, even when embedded in an HTML tag\&. |
1843 Breakiterator sentence-break algorithm\&. Stops at a period, question mark, or exclamation point followed by a space when the next word starts with a capital letter\&. This is meant to handle most abbreviations (such as "The serial no\&. is valid", but will not handle "Mr\&. Smith")\&. The \f3-breakiterator\fR option does not stop at HTML tags or sentences that begin with numbers or symbols\&. The algorithm stops at the last period in \&.\&./filename, even when embedded in an HTML tag\&. |
1849 .RE |
1844 .RE |
1850 .RS |
1845 |
1846 |
|
1851 In Java SE 1\&.5 the \f3-breakiterator\fR option warning messages are removed, and the default sentence-break algorithm is unchanged\&. If you have not modified your source code to eliminate the \f3-breakiterator\fR option warnings in Java SE 1\&.4\&.x, then you do not have to do anything\&. The warnings go away starting with Java SE 1\&.5\&.0\&. |
1847 In Java SE 1\&.5 the \f3-breakiterator\fR option warning messages are removed, and the default sentence-break algorithm is unchanged\&. If you have not modified your source code to eliminate the \f3-breakiterator\fR option warnings in Java SE 1\&.4\&.x, then you do not have to do anything\&. The warnings go away starting with Java SE 1\&.5\&.0\&. |
1852 |
|
1853 .RE |
|
1854 .TP |
1848 .TP |
1855 -locale \fIlanguage_country_variant\fR |
1849 -locale \fIlanguage_country_variant\fR |
1856 .br |
1850 .br |
1857 Specifies the locale that the \f3javadoc\fR command uses when it generates documentation\&. The argument is the name of the locale, as described in \f3j\fR\f3ava\&.util\&.Locale\fR documentation, such as \f3en_US\fR (English, United States) or \f3en_US_WIN\fR (Windows variant)\&. |
1851 Specifies the locale that the \f3javadoc\fR command uses when it generates documentation\&. The argument is the name of the locale, as described in \f3j\fR\f3ava\&.util\&.Locale\fR documentation, such as \f3en_US\fR (English, United States) or \f3en_US_WIN\fR (Windows variant)\&. |
1858 |
1852 |
1883 .fi |
1877 .fi |
1884 .nf |
1878 .nf |
1885 \f3Java HotSpot(TM) 64\-Bit Server VM (build 23\&.5\-b02, mixed mode)\fP |
1879 \f3Java HotSpot(TM) 64\-Bit Server VM (build 23\&.5\-b02, mixed mode)\fP |
1886 .fi |
1880 .fi |
1887 .nf |
1881 .nf |
1888 \f3\fR |
1882 \f3\fP |
1883 .fi |
|
1884 .sp |
|
1885 |
|
1886 .TP |
|
1887 -javafx |
|
1888 .br |
|
1889 Generates HTML documentation using the JavaFX extensions to the standard doclet\&. The generated documentation includes a Property Summary section in addition to the other summary sections generated by the standard Java doclet\&. The listed properties are linked to the sections for the getter and setter methods of each property\&. |
|
1890 |
|
1891 If there are no documentation comments written explicitly for getter and setter methods, the documentation comments from the property method are automatically copied to the generated documentation for these methods\&. This option also adds a new \f3@defaultValue\fR tag that allows documenting the default value for a property\&. |
|
1892 |
|
1893 Example: |
|
1894 .sp |
|
1895 .nf |
|
1896 \f3javadoc \-javafx MyClass\&.java \-d testdir\fP |
|
1889 .fi |
1897 .fi |
1890 .sp |
1898 .sp |
1891 |
1899 |
1892 .SS STANDARD\ DOCLET\ OPTIONS |
1900 .SS STANDARD\ DOCLET\ OPTIONS |
1893 .TP |
1901 .TP |
1955 .fi |
1963 .fi |
1956 .nf |
1964 .nf |
1957 \f3\-link <directory>/<directory>/\&.\&.\&./<name>\fP |
1965 \f3\-link <directory>/<directory>/\&.\&.\&./<name>\fP |
1958 .fi |
1966 .fi |
1959 .nf |
1967 .nf |
1960 \f3\fR |
1968 \f3\fP |
1961 .fi |
1969 .fi |
1962 .sp |
1970 .sp |
1963 |
1971 |
1964 .PP |
1972 .PP |
1965 Differences between the -linkoffline and -link options |
1973 Differences between the -linkoffline and -link options |
1980 .sp |
1988 .sp |
1981 .nf |
1989 .nf |
1982 \f3javadoc \-link http://docs\&.oracle\&.com/javase/8/docs/api/ com\&.mypackage\fP |
1990 \f3javadoc \-link http://docs\&.oracle\&.com/javase/8/docs/api/ com\&.mypackage\fP |
1983 .fi |
1991 .fi |
1984 .nf |
1992 .nf |
1985 \f3\fR |
1993 \f3\fP |
1986 .fi |
1994 .fi |
1987 .sp |
1995 .sp |
1988 The command generates documentation for the package \f3com\&.mypackage\fR with links to the Java SE packages\&. The generated documentation contains links to the \f3Object\fR class, for example, in the class \f3trees\fR\&. Other options, such as the \f3-sourcepath\fR and \f3-d\fR options, are not shown\&. |
1996 The command generates documentation for the package \f3com\&.mypackage\fR with links to the Java SE packages\&. The generated documentation contains links to the \f3Object\fR class, for example, in the class \f3trees\fR\&. Other options, such as the \f3-sourcepath\fR and \f3-d\fR options, are not shown\&. |
1989 .PP |
1997 .PP |
1990 \f3Example 2 Relative Link to External Documents\fR |
1998 \f3Example 2 Relative Link to External Documents\fR |
2042 .fi |
2050 .fi |
2043 .nf |
2051 .nf |
2044 \f3and so on \&.\&.\&.\&.\fP |
2052 \f3and so on \&.\&.\&.\&.\fP |
2045 .fi |
2053 .fi |
2046 .nf |
2054 .nf |
2047 \f3\fR |
2055 \f3\fP |
2048 .fi |
2056 .fi |
2049 .sp |
2057 .sp |
2050 When \f3javadoc\fR is run without the \f3-link\fR option and encounters a name that belongs to an externally referenced class, it prints the name with no link\&. However, when the \f3-link\fR option is used, the \f3javadoc\fR command searches the package-list file at the specified \fIextdocURL\fR location for that package name\&. When it finds the package name, it prefixes the name with \fIextdocURL\fR\&. |
2058 When \f3javadoc\fR is run without the \f3-link\fR option and encounters a name that belongs to an externally referenced class, it prints the name with no link\&. However, when the \f3-link\fR option is used, the \f3javadoc\fR command searches the package-list file at the specified \fIextdocURL\fR location for that package name\&. When it finds the package name, it prefixes the name with \fIextdocURL\fR\&. |
2051 .PP |
2059 .PP |
2052 For there to be no broken links, all of the documentation for the external references must exist at the specified URLs\&. The \f3javadoc\fR command does not check that these pages exist, but only that the package-list exists\&. |
2060 For there to be no broken links, all of the documentation for the external references must exist at the specified URLs\&. The \f3javadoc\fR command does not check that these pages exist, but only that the package-list exists\&. |
2092 .sp |
2100 .sp |
2093 .nf |
2101 .nf |
2094 \f3javadoc \-linkoffline http://docs\&.oracle\&.com/javase/8/docs/api/ \&. com\&.mypackage \fP |
2102 \f3javadoc \-linkoffline http://docs\&.oracle\&.com/javase/8/docs/api/ \&. com\&.mypackage \fP |
2095 .fi |
2103 .fi |
2096 .nf |
2104 .nf |
2097 \f3\fR |
2105 \f3\fP |
2098 .fi |
2106 .fi |
2099 .sp |
2107 .sp |
2100 |
2108 |
2101 .PP |
2109 .PP |
2102 Relative Links to External Documents |
2110 Relative Links to External Documents |
2116 .fi |
2124 .fi |
2117 .nf |
2125 .nf |
2118 \f3packagelistLoc2 \&.\&.\&.\fP |
2126 \f3packagelistLoc2 \&.\&.\&.\fP |
2119 .fi |
2127 .fi |
2120 .nf |
2128 .nf |
2121 \f3\fR |
2129 \f3\fP |
2122 .fi |
2130 .fi |
2123 .sp |
2131 .sp |
2124 |
2132 |
2125 .PP |
2133 .PP |
2126 Update Documents |
2134 Update Documents |
2131 .sp |
2139 .sp |
2132 .nf |
2140 .nf |
2133 \f3javadoc \-d update \-linkoffline \&. html com\&.mypackage\fP |
2141 \f3javadoc \-d update \-linkoffline \&. html com\&.mypackage\fP |
2134 .fi |
2142 .fi |
2135 .nf |
2143 .nf |
2136 \f3\fR |
2144 \f3\fP |
2137 .fi |
2145 .fi |
2138 .sp |
2146 .sp |
2139 When the \f3javadoc\fR command completes, copy these generated class pages in update/com/package (not the overview or index) to the original files in html/com/package\&. |
2147 When the \f3javadoc\fR command completes, copy these generated class pages in update/com/package (not the overview or index) to the original files in html/com/package\&. |
2140 .TP |
2148 .TP |
2141 -linksource |
2149 -linksource |
2148 .sp |
2156 .sp |
2149 .nf |
2157 .nf |
2150 \f3public class Button extends Component implements Accessible\fP |
2158 \f3public class Button extends Component implements Accessible\fP |
2151 .fi |
2159 .fi |
2152 .nf |
2160 .nf |
2153 \f3\fR |
2161 \f3\fP |
2154 .fi |
2162 .fi |
2155 .sp |
2163 .sp |
2156 |
2164 |
2157 |
2165 |
2158 The link to the source code of the \f3getLabel\fR method in the \f3Button\fR class is on the word \f3getLabel\fR: |
2166 The link to the source code of the \f3getLabel\fR method in the \f3Button\fR class is on the word \f3getLabel\fR: |
2159 .sp |
2167 .sp |
2160 .nf |
2168 .nf |
2161 \f3public String getLabel()\fP |
2169 \f3public String getLabel()\fP |
2162 .fi |
2170 .fi |
2163 .nf |
2171 .nf |
2164 \f3\fR |
2172 \f3\fP |
2165 .fi |
2173 .fi |
2166 .sp |
2174 .sp |
2167 |
2175 |
2168 .TP |
2176 .TP |
2169 -group groupheading \fIpackagepattern:packagepattern\fR |
2177 -group groupheading \fIpackagepattern:packagepattern\fR |
2174 \(bu |
2182 \(bu |
2175 The \f3groupheading\fR can be any text and can include white space\&. This text is placed in the table heading for the group\&. |
2183 The \f3groupheading\fR can be any text and can include white space\&. This text is placed in the table heading for the group\&. |
2176 .TP 0.2i |
2184 .TP 0.2i |
2177 \(bu |
2185 \(bu |
2178 The \f3packagepattern\fR value can be any package name at the start of any package name followed by an asterisk (*)\&. The asterisk is the only wildcard allowed and means match any characters\&. Multiple patterns can be included in a group by separating them with colons (:)\&. If you use an asterisk in a pattern or pattern list, then the pattern list must be inside quotation marks, such as \f3"java\&.lang*:java\&.util"\fR\&. |
2186 The \f3packagepattern\fR value can be any package name at the start of any package name followed by an asterisk (*)\&. The asterisk is the only wildcard allowed and means match any characters\&. Multiple patterns can be included in a group by separating them with colons (:)\&. If you use an asterisk in a pattern or pattern list, then the pattern list must be inside quotation marks, such as \f3"java\&.lang*:java\&.util"\fR\&. |
2179 .RE |
2187 .RE |
2180 .RS |
2188 |
2189 |
|
2181 When you do not supply a \f3-group\fR option, all packages are placed in one group with the heading \fIPackages\fR and appropriate subheadings\&. If the subheadings do not include all documented packages (all groups), then the remaining packages appear in a separate group with the subheading Other Packages\&. |
2190 When you do not supply a \f3-group\fR option, all packages are placed in one group with the heading \fIPackages\fR and appropriate subheadings\&. If the subheadings do not include all documented packages (all groups), then the remaining packages appear in a separate group with the subheading Other Packages\&. |
2182 |
2191 |
2183 For example, the following \f3javadoc\fR command separates the three documented packages into \fICore\fR, \fIExtension\fR, and \fIOther Packages\fR\&. The trailing dot (\&.) does not appear in \f3java\&.lang*\fR\&. Including the dot, such as \f3java\&.lang\&.*\fR omits the\f3java\&.lang\fR package\&. |
2192 For example, the following \f3javadoc\fR command separates the three documented packages into \fICore\fR, \fIExtension\fR, and \fIOther Packages\fR\&. The trailing dot (\&.) does not appear in \f3java\&.lang*\fR\&. Including the dot, such as \f3java\&.lang\&.*\fR omits the\f3java\&.lang\fR package\&. |
2184 .sp |
2193 .sp |
2185 .nf |
2194 .nf |
2190 .fi |
2199 .fi |
2191 .nf |
2200 .nf |
2192 \f3 java\&.lang java\&.lang\&.reflect java\&.util javax\&.servlet java\&.new\fP |
2201 \f3 java\&.lang java\&.lang\&.reflect java\&.util javax\&.servlet java\&.new\fP |
2193 .fi |
2202 .fi |
2194 .nf |
2203 .nf |
2195 \f3\fR |
2204 \f3\fP |
2196 .fi |
2205 .fi |
2197 .sp |
2206 .sp |
2198 |
2207 |
2199 |
2208 |
2200 \fICore Packages\fR |
2209 \fICore Packages\fR |
2210 \f3javax\&.servlet\fR |
2219 \f3javax\&.servlet\fR |
2211 |
2220 |
2212 \fIOther Packages\fR |
2221 \fIOther Packages\fR |
2213 |
2222 |
2214 \f3java\&.new\fR |
2223 \f3java\&.new\fR |
2215 |
|
2216 .RE |
|
2217 .TP |
2224 .TP |
2218 -nodeprecated |
2225 -nodeprecated |
2219 .br |
2226 .br |
2220 Prevents the generation of any deprecated API in the documentation\&. This does what the \f3-nodeprecatedlist\fR option does, and it does not generate any deprecated API throughout the rest of the documentation\&. This is useful when writing code when you do not want to be distracted by the deprecated code\&. |
2227 Prevents the generation of any deprecated API in the documentation\&. This does what the \f3-nodeprecatedlist\fR option does, and it does not generate any deprecated API throughout the rest of the documentation\&. This is useful when writing code when you do not want to be distracted by the deprecated code\&. |
2221 .TP |
2228 .TP |
2249 .sp |
2256 .sp |
2250 .nf |
2257 .nf |
2251 \f3javadoc \-helpfile /home/user/myhelp\&.html java\&.awt\&.\fP |
2258 \f3javadoc \-helpfile /home/user/myhelp\&.html java\&.awt\&.\fP |
2252 .fi |
2259 .fi |
2253 .nf |
2260 .nf |
2254 \f3\fR |
2261 \f3\fP |
2255 .fi |
2262 .fi |
2256 .sp |
2263 .sp |
2257 |
2264 |
2258 .TP |
2265 .TP |
2259 -stylesheet \fIpath/filename\fR |
2266 -stylesheet \fIpath/filename\fR |
2262 .sp |
2269 .sp |
2263 .nf |
2270 .nf |
2264 \f3javadoc \-stylesheet file /home/user/mystylesheet\&.css com\&.mypackage\fP |
2271 \f3javadoc \-stylesheet file /home/user/mystylesheet\&.css com\&.mypackage\fP |
2265 .fi |
2272 .fi |
2266 .nf |
2273 .nf |
2267 \f3\fR |
2274 \f3\fP |
2268 .fi |
2275 .fi |
2269 .sp |
2276 .sp |
2270 |
2277 |
2271 .TP |
2278 .TP |
2272 -serialwarn |
2279 -serialwarn |
2281 .sp |
2288 .sp |
2282 .nf |
2289 .nf |
2283 \f3<META http\-equiv="Content\-Type" content="text/html; charset=ISO\-8859\-1">\fP |
2290 \f3<META http\-equiv="Content\-Type" content="text/html; charset=ISO\-8859\-1">\fP |
2284 .fi |
2291 .fi |
2285 .nf |
2292 .nf |
2286 \f3\fR |
2293 \f3\fP |
2287 .fi |
2294 .fi |
2288 .sp |
2295 .sp |
2289 |
2296 |
2290 |
2297 |
2291 This \f3META\fR tag is described in the HTML standard (4197265 and 4137321), HTML Document Representation, at http://www\&.w3\&.org/TR/REC-html40/charset\&.html#h-5\&.2\&.2 |
2298 This \f3META\fR tag is described in the HTML standard (4197265 and 4137321), HTML Document Representation, at http://www\&.w3\&.org/TR/REC-html40/charset\&.html#h-5\&.2\&.2 |
2294 .TP |
2301 .TP |
2295 -docencoding \fIname\fR |
2302 -docencoding \fIname\fR |
2296 .br |
2303 .br |
2297 Specifies the encoding of the generated HTML files\&. The name should be a preferred MIME name as specified in the IANA Registry, Character Sets at http://www\&.iana\&.org/assignments/character-sets |
2304 Specifies the encoding of the generated HTML files\&. The name should be a preferred MIME name as specified in the IANA Registry, Character Sets at http://www\&.iana\&.org/assignments/character-sets |
2298 |
2305 |
2299 If you omit the \f3-docencoding\fR option but use the \f3-encoding\fR option, then the encoding of the generated HTML files is determined by the \f3-encoding\fR option, for example: \f3javadoc -docencoding"iso-8859-1" mypackage\fR\&. See also the \f3-encoding\fR and \f3-docencoding name\fR options\&. |
2306 If you omit the \f3-docencoding\fR option but use the \f3-encoding\fR option, then the encoding of the generated HTML files is determined by the \f3-encoding\fR option, for example: \f3javadoc -docencoding "iso-8859-1" mypackage\fR\&. See also the \f3-encoding\fR and \f3-docencoding name\fR options\&. |
2300 .TP |
2307 .TP |
2301 -keywords |
2308 -keywords |
2302 .br |
2309 .br |
2303 Adds HTML keyword <META> tags to the generated file for each class\&. These tags can help search engines that look for <META> tags find the pages\&. Most search engines that search the entire Internet do not look at <META> tags, because pages can misuse them\&. Search engines offered by companies that confine their searches to their own website can benefit by looking at <META> tags\&. The <META> tags include the fully qualified name of the class and the unqualified names of the fields and methods\&. Constructors are not included because they are identical to the class name\&. For example, the class \f3String\fR starts with these keywords: |
2310 Adds HTML keyword <META> tags to the generated file for each class\&. These tags can help search engines that look for <META> tags find the pages\&. Most search engines that search the entire Internet do not look at <META> tags, because pages can misuse them\&. Search engines offered by companies that confine their searches to their own website can benefit by looking at <META> tags\&. The <META> tags include the fully qualified name of the class and the unqualified names of the fields and methods\&. Constructors are not included because they are identical to the class name\&. For example, the class \f3String\fR starts with these keywords: |
2304 .sp |
2311 .sp |
2313 .fi |
2320 .fi |
2314 .nf |
2321 .nf |
2315 \f3<META NAME="keywords" CONTENT="charAt()">\fP |
2322 \f3<META NAME="keywords" CONTENT="charAt()">\fP |
2316 .fi |
2323 .fi |
2317 .nf |
2324 .nf |
2318 \f3\fR |
2325 \f3\fP |
2319 .fi |
2326 .fi |
2320 .sp |
2327 .sp |
2321 |
2328 |
2322 .TP |
2329 .TP |
2323 -tag \fItagname\fR:Xaoptcmf:"\fItaghead\fR" |
2330 -tag \fItagname\fR:Xaoptcmf:"\fItaghead\fR" |
2358 .fi |
2365 .fi |
2359 .nf |
2366 .nf |
2360 \f3 */\fP |
2367 \f3 */\fP |
2361 .fi |
2368 .fi |
2362 .nf |
2369 .nf |
2363 \f3\fR |
2370 \f3\fP |
2364 .fi |
2371 .fi |
2365 .sp |
2372 .sp |
2366 |
2373 |
2367 |
2374 |
2368 \fISpell-checking tag names\fR: Some developers put custom tags in the source code that they do not always want to output\&. In these cases, it is important to list all tags that are in the source code, enabling the ones you want to output and disabling the ones you do not want to output\&. The presence of \f3X\fR disables the tag, while its absence enables the tag\&. This gives the \f3javadoc\fR command enough information to know whether a tag it encounters is unknown, which is probably the results of a typographical error or a misspelling\&. The \f3javadoc\fR command prints a warning in these cases\&. You can add \f3X\fR to the placement values already present, so that when you want to enable the tag, you can simply delete the \f3X\fR\&. For example, if the \f3@todo\fR tag is a tag that you want to suppress on output, then you would use: \f3-tag todo:Xcmf:"To Do:"\fR\&. If you would rather keep it simple, then use this: \f3-tag todo:X\fR\&. The syntax \f3-tag todo:X\fR works even when the \f3@todo\fR tag is defined by a taglet\&. |
2375 \fISpell-checking tag names\fR: Some developers put custom tags in the source code that they do not always want to output\&. In these cases, it is important to list all tags that are in the source code, enabling the ones you want to output and disabling the ones you do not want to output\&. The presence of \f3X\fR disables the tag, while its absence enables the tag\&. This gives the \f3javadoc\fR command enough information to know whether a tag it encounters is unknown, which is probably the results of a typographical error or a misspelling\&. The \f3javadoc\fR command prints a warning in these cases\&. You can add \f3X\fR to the placement values already present, so that when you want to enable the tag, you can simply delete the \f3X\fR\&. For example, if the \f3@todo\fR tag is a tag that you want to suppress on output, then you would use: \f3-tag todo:Xcmf:"To Do:"\fR\&. If you would rather keep it simple, then use this: \f3-tag todo:X\fR\&. The syntax \f3-tag todo:X\fR works even when the \f3@todo\fR tag is defined by a taglet\&. |
2388 .fi |
2395 .fi |
2389 .nf |
2396 .nf |
2390 \f3\-tag example:X\fP |
2397 \f3\-tag example:X\fP |
2391 .fi |
2398 .fi |
2392 .nf |
2399 .nf |
2393 \f3\fR |
2400 \f3\fP |
2394 .fi |
2401 .fi |
2395 .sp |
2402 .sp |
2396 |
2403 |
2397 |
2404 |
2398 When the \f3javadoc\fR command parses the documentation comments, any tag encountered that is neither a standard tag nor passed in with the \f3-tag\fR or \f3-taglet\fR options is considered unknown, and a warning is thrown\&. |
2405 When the \f3javadoc\fR command parses the documentation comments, any tag encountered that is neither a standard tag nor passed in with the \f3-tag\fR or \f3-taglet\fR options is considered unknown, and a warning is thrown\&. |
2431 .fi |
2438 .fi |
2432 .nf |
2439 .nf |
2433 \f3\-tag see\fP |
2440 \f3\-tag see\fP |
2434 .fi |
2441 .fi |
2435 .nf |
2442 .nf |
2436 \f3\fR |
2443 \f3\fP |
2437 .fi |
2444 .fi |
2438 .sp |
2445 .sp |
2439 |
2446 |
2440 .TP |
2447 .TP |
2441 -tagletpath \fItagletpathlist\fR |
2448 -tagletpath \fItagletpathlist\fR |
2521 .fi |
2528 .fi |
2522 .nf |
2529 .nf |
2523 \f3\-sourcepath /java/pubs/ws/1\&.7\&.0/src/share/classes\fP |
2530 \f3\-sourcepath /java/pubs/ws/1\&.7\&.0/src/share/classes\fP |
2524 .fi |
2531 .fi |
2525 .nf |
2532 .nf |
2526 \f3\fR |
2533 \f3\fP |
2527 .fi |
2534 .fi |
2528 .sp |
2535 .sp |
2529 Create a file named packages that contains: |
2536 Create a file named packages that contains: |
2530 .sp |
2537 .sp |
2531 .nf |
2538 .nf |
2536 .fi |
2543 .fi |
2537 .nf |
2544 .nf |
2538 \f3com\&.mypackage3\fP |
2545 \f3com\&.mypackage3\fP |
2539 .fi |
2546 .fi |
2540 .nf |
2547 .nf |
2541 \f3\fR |
2548 \f3\fP |
2542 .fi |
2549 .fi |
2543 .sp |
2550 .sp |
2544 Run the \f3javadoc\fR command as follows: |
2551 Run the \f3javadoc\fR command as follows: |
2545 .sp |
2552 .sp |
2546 .nf |
2553 .nf |
2547 \f3javadoc @options @packages\fP |
2554 \f3javadoc @options @packages\fP |
2548 .fi |
2555 .fi |
2549 .nf |
2556 .nf |
2550 \f3\fR |
2557 \f3\fP |
2551 .fi |
2558 .fi |
2552 .sp |
2559 .sp |
2553 \f3Example 3 Argument Files with Paths\fR |
2560 \f3Example 3 Argument Files with Paths\fR |
2554 .PP |
2561 .PP |
2555 The argument files can have paths, but any file names inside the files are relative to the current working directory (not \f3path1\fR or \f3path2\fR): |
2562 The argument files can have paths, but any file names inside the files are relative to the current working directory (not \f3path1\fR or \f3path2\fR): |
2556 .sp |
2563 .sp |
2557 .nf |
2564 .nf |
2558 \f3javadoc @path1/options @path2/packages\fP |
2565 \f3javadoc @path1/options @path2/packages\fP |
2559 .fi |
2566 .fi |
2560 .nf |
2567 .nf |
2561 \f3\fR |
2568 \f3\fP |
2562 .fi |
2569 .fi |
2563 .sp |
2570 .sp |
2564 \f3Example 4 Option Arguments\fR |
2571 \f3Example 4 Option Arguments\fR |
2565 .PP |
2572 .PP |
2566 The following example saves an argument to a \f3javadoc\fR command option in an argument file\&. The \f3-bottom\fR option is used because it can have a lengthy argument\&. You could create a file named bottom to contain the text argument: |
2573 The following example saves an argument to a \f3javadoc\fR command option in an argument file\&. The \f3-bottom\fR option is used because it can have a lengthy argument\&. You could create a file named bottom to contain the text argument: |
2579 .fi |
2586 .fi |
2580 .nf |
2587 .nf |
2581 \f3 Other names may be trademarks of their respective owners\&.</font>\fP |
2588 \f3 Other names may be trademarks of their respective owners\&.</font>\fP |
2582 .fi |
2589 .fi |
2583 .nf |
2590 .nf |
2584 \f3\fR |
2591 \f3\fP |
2585 .fi |
2592 .fi |
2586 .sp |
2593 .sp |
2587 Run the \f3javadoc\fR command as follows:\f3javadoc -bottom @bottom @packages\fR\&. |
2594 Run the \f3javadoc\fR command as follows:\f3javadoc -bottom @bottom @packages\fR\&. |
2588 .PP |
2595 .PP |
2589 You can also include the \f3-bottom\fR option at the start of the argument file and run the \f3javadoc\fR command as follows: \f3javadoc @bottom @packages\fR\&. |
2596 You can also include the \f3-bottom\fR option at the start of the argument file and run the \f3javadoc\fR command as follows: \f3javadoc @bottom @packages\fR\&. |
2614 .sp |
2621 .sp |
2615 .nf |
2622 .nf |
2616 \f3javadoc \-d /home/html \-sourcepath /home/src \-subpackages java \-exclude\fP |
2623 \f3javadoc \-d /home/html \-sourcepath /home/src \-subpackages java \-exclude\fP |
2617 .fi |
2624 .fi |
2618 .nf |
2625 .nf |
2619 \f3\fR |
2626 \f3\fP |
2620 .fi |
2627 .fi |
2621 .sp |
2628 .sp |
2622 \f3Example 2 Change to Root and Run Explicit Packages\fR |
2629 \f3Example 2 Change to Root and Run Explicit Packages\fR |
2623 .PP |
2630 .PP |
2624 Change to the parent directory of the fully qualified package\&. Then, run the \f3javadoc\fR command with the names of one or more packages that you want to document: |
2631 Change to the parent directory of the fully qualified package\&. Then, run the \f3javadoc\fR command with the names of one or more packages that you want to document: |
2628 .fi |
2635 .fi |
2629 .nf |
2636 .nf |
2630 \f3javadoc \-d /home/html java\&.awt java\&.awt\&.event\fP |
2637 \f3javadoc \-d /home/html java\&.awt java\&.awt\&.event\fP |
2631 .fi |
2638 .fi |
2632 .nf |
2639 .nf |
2633 \f3\fR |
2640 \f3\fP |
2634 .fi |
2641 .fi |
2635 .sp |
2642 .sp |
2636 To also traverse down other package trees, append their names to the \f3-subpackages\fR argument, such as j\f3ava:javax:org\&.xml\&.sax\fR\&. |
2643 To also traverse down other package trees, append their names to the \f3-subpackages\fR argument, such as j\f3ava:javax:org\&.xml\&.sax\fR\&. |
2637 .PP |
2644 .PP |
2638 \f3Example 3 Run from Any Directory on Explicit Packages in One Tree\fR |
2645 \f3Example 3 Run from Any Directory on Explicit Packages in One Tree\fR |
2641 .sp |
2648 .sp |
2642 .nf |
2649 .nf |
2643 \f3javadoc \-d /home/html \-sourcepath /home/src java\&.awt java\&.awt\&.event\fP |
2650 \f3javadoc \-d /home/html \-sourcepath /home/src java\&.awt java\&.awt\&.event\fP |
2644 .fi |
2651 .fi |
2645 .nf |
2652 .nf |
2646 \f3\fR |
2653 \f3\fP |
2647 .fi |
2654 .fi |
2648 .sp |
2655 .sp |
2649 \f3Example 4 Run from Any Directory on Explicit Packages in Multiple Trees\fR |
2656 \f3Example 4 Run from Any Directory on Explicit Packages in Multiple Trees\fR |
2650 .PP |
2657 .PP |
2651 Run the \f3javadoc\fR command and use the \f3-sourcepath\fR option with a colon-separated list of the paths to each tree\&'s root\&. Provide the names of one or more packages that you want to document\&. All source files for a specified package do not need to be located under a single root directory, but they must be found somewhere along the source path\&. |
2658 Run the \f3javadoc\fR command and use the \f3-sourcepath\fR option with a colon-separated list of the paths to each tree\&'s root\&. Provide the names of one or more packages that you want to document\&. All source files for a specified package do not need to be located under a single root directory, but they must be found somewhere along the source path\&. |
2652 .sp |
2659 .sp |
2653 .nf |
2660 .nf |
2654 \f3javadoc \-d /home/html \-sourcepath /home/src1:/home/src2 java\&.awt java\&.awt\&.event\fP |
2661 \f3javadoc \-d /home/html \-sourcepath /home/src1:/home/src2 java\&.awt java\&.awt\&.event\fP |
2655 .fi |
2662 .fi |
2656 .nf |
2663 .nf |
2657 \f3\fR |
2664 \f3\fP |
2658 .fi |
2665 .fi |
2659 .sp |
2666 .sp |
2660 The result is that all cases generate HTML-formatted documentation for the \f3public\fR and \f3protected\fR classes and interfaces in packages j\f3ava\&.awt\fR and \f3java\&.awt\&.even\fRt and save the HTML files in the specified destination directory\&. Because two or more packages are being generated, the document has three HTML frames: one for the list of packages, another for the list of classes, and the third for the main class pages\&. |
2667 The result is that all cases generate HTML-formatted documentation for the \f3public\fR and \f3protected\fR classes and interfaces in packages j\f3ava\&.awt\fR and \f3java\&.awt\&.even\fRt and save the HTML files in the specified destination directory\&. Because two or more packages are being generated, the document has three HTML frames: one for the list of packages, another for the list of classes, and the third for the main class pages\&. |
2661 .PP |
2668 .PP |
2662 Document One or More Classes |
2669 Document One or More Classes |
2674 .fi |
2681 .fi |
2675 .nf |
2682 .nf |
2676 \f3javadoc \-d /home/html Button\&.java Canvas\&.java Graphics*\&.java\fP |
2683 \f3javadoc \-d /home/html Button\&.java Canvas\&.java Graphics*\&.java\fP |
2677 .fi |
2684 .fi |
2678 .nf |
2685 .nf |
2679 \f3\fR |
2686 \f3\fP |
2680 .fi |
2687 .fi |
2681 .sp |
2688 .sp |
2682 \f3Example 2 Change to the Root Directory of the Package\fR |
2689 \f3Example 2 Change to the Root Directory of the Package\fR |
2683 .PP |
2690 .PP |
2684 This is useful for documenting individual source files from different subpackages off of the same root\&. Change to the package root directory, and supply the source files with paths from the root\&. |
2691 This is useful for documenting individual source files from different subpackages off of the same root\&. Change to the package root directory, and supply the source files with paths from the root\&. |
2688 .fi |
2695 .fi |
2689 .nf |
2696 .nf |
2690 \f3javadoc \-d /home/html java/awt/Button\&.java java/applet/Applet\&.java\fP |
2697 \f3javadoc \-d /home/html java/awt/Button\&.java java/applet/Applet\&.java\fP |
2691 .fi |
2698 .fi |
2692 .nf |
2699 .nf |
2693 \f3\fR |
2700 \f3\fP |
2694 .fi |
2701 .fi |
2695 .sp |
2702 .sp |
2696 \f3Example 3 Document Files from Any Directory\fR |
2703 \f3Example 3 Document Files from Any Directory\fR |
2697 .PP |
2704 .PP |
2698 In this case, it does not matter what the current directory is\&. Run the \f3javadoc\fR command with the absolute path (or path relative to the current directory) to the source files you want to document\&. |
2705 In this case, it does not matter what the current directory is\&. Run the \f3javadoc\fR command with the absolute path (or path relative to the current directory) to the source files you want to document\&. |
2702 .fi |
2709 .fi |
2703 .nf |
2710 .nf |
2704 \f3/home/src/java/awt/Graphics*\&.java\fP |
2711 \f3/home/src/java/awt/Graphics*\&.java\fP |
2705 .fi |
2712 .fi |
2706 .nf |
2713 .nf |
2707 \f3\fR |
2714 \f3\fP |
2708 .fi |
2715 .fi |
2709 .sp |
2716 .sp |
2710 |
2717 |
2711 .PP |
2718 .PP |
2712 Document Packages and Classes |
2719 Document Packages and Classes |
2718 .fi |
2725 .fi |
2719 .nf |
2726 .nf |
2720 \f3/home/src/java/applet/Applet\&.java\fP |
2727 \f3/home/src/java/applet/Applet\&.java\fP |
2721 .fi |
2728 .fi |
2722 .nf |
2729 .nf |
2723 \f3\fR |
2730 \f3\fP |
2724 .fi |
2731 .fi |
2725 .sp |
2732 .sp |
2726 .SS REAL-WORLD\ EXAMPLES |
2733 .SS REAL-WORLD\ EXAMPLES |
2727 The following command-line and \f3makefile\fR versions of the \f3javadoc\fR command run on the Java platform APIs\&. It uses 180 MB of memory to generate the documentation for the 1500 (approximately) public and protected classes in the Java SE 1\&.2\&. Both examples use absolute paths in the option arguments, so that the same \f3javadoc\fR command can be run from any directory\&. |
2734 The following command-line and \f3makefile\fR versions of the \f3javadoc\fR command run on the Java platform APIs\&. It uses 180 MB of memory to generate the documentation for the 1500 (approximately) public and protected classes in the Java SE 1\&.2\&. Both examples use absolute paths in the option arguments, so that the same \f3javadoc\fR command can be run from any directory\&. |
2728 .PP |
2735 .PP |
2782 .fi |
2789 .fi |
2783 .nf |
2790 .nf |
2784 \f3@packages\fP |
2791 \f3@packages\fP |
2785 .fi |
2792 .fi |
2786 .nf |
2793 .nf |
2787 \f3\fR |
2794 \f3\fP |
2788 .fi |
2795 .fi |
2789 .sp |
2796 .sp |
2790 |
2797 |
2791 .PP |
2798 .PP |
2792 Programmatic Interface |
2799 Programmatic Interface |
2800 .fi |
2807 .fi |
2801 .nf |
2808 .nf |
2802 \f3import javax\&.tools\&.ToolProvider;\fP |
2809 \f3import javax\&.tools\&.ToolProvider;\fP |
2803 .fi |
2810 .fi |
2804 .nf |
2811 .nf |
2805 \f3\fR |
2812 \f3\fP |
2806 .fi |
2813 .fi |
2807 .nf |
2814 .nf |
2808 \f3public class JavaAccessSample{\fP |
2815 \f3public class JavaAccessSample{\fP |
2809 .fi |
2816 .fi |
2810 .nf |
2817 .nf |
2836 .fi |
2843 .fi |
2837 .nf |
2844 .nf |
2838 \f3 }\fP |
2845 \f3 }\fP |
2839 .fi |
2846 .fi |
2840 .nf |
2847 .nf |
2841 \f3\fR |
2848 \f3\fP |
2842 .fi |
2849 .fi |
2843 .sp |
2850 .sp |
2844 The first three arguments of the \f3run\fR method specify input, standard output, and standard error streams\&. \f3Null\fR is the default value for \f3System\&.in\fR, \f3System\&.out\fR, and \f3System\&.err\fR, respectively\&. |
2851 The first three arguments of the \f3run\fR method specify input, standard output, and standard error streams\&. \f3Null\fR is the default value for \f3System\&.in\fR, \f3System\&.out\fR, and \f3System\&.err\fR, respectively\&. |
2845 .SS THE\ MAKEFILE\ EXAMPLE |
2852 .SS THE\ MAKEFILE\ EXAMPLE |
2846 This is an example of a GNU \f3makefile\fR\&. Single quotation marks surround \f3makefile\fR arguments\&. For an example of a Windows \f3makefile\fR, see the \f3makefiles\fR section of the Javadoc FAQ at http://www\&.oracle\&.com/technetwork/java/javase/documentation/index-137483\&.html#makefiles |
2853 This is an example of a GNU \f3makefile\fR\&. Single quotation marks surround \f3makefile\fR arguments\&. For an example of a Windows \f3makefile\fR, see the \f3makefiles\fR section of the Javadoc FAQ at http://www\&.oracle\&.com/technetwork/java/javase/documentation/index-137483\&.html#makefiles |
2889 .fi |
2896 .fi |
2890 .nf |
2897 .nf |
2891 \f3 java\&.applet\fP |
2898 \f3 java\&.applet\fP |
2892 .fi |
2899 .fi |
2893 .nf |
2900 .nf |
2894 \f3\fR |
2901 \f3\fP |
2895 .fi |
2902 .fi |
2896 .nf |
2903 .nf |
2897 \f3WINDOWTITLE = \&'Java\(tm SE 7 API Specification\&'\fP |
2904 \f3WINDOWTITLE = \&'Java\(tm SE 7 API Specification\&'\fP |
2898 .fi |
2905 .fi |
2899 .nf |
2906 .nf |
2925 .fi |
2932 .fi |
2926 .nf |
2933 .nf |
2927 \f3SRCDIR = \&'/java/jdk/1\&.7\&.0/src/share/classes\&'\fP |
2934 \f3SRCDIR = \&'/java/jdk/1\&.7\&.0/src/share/classes\&'\fP |
2928 .fi |
2935 .fi |
2929 .nf |
2936 .nf |
2930 \f3\fR |
2937 \f3\fP |
2931 .fi |
2938 .fi |
2932 .sp |
2939 .sp |
2933 .SS NOTES |
2940 .SS NOTES |
2934 .TP 0.2i |
2941 .TP 0.2i |
2935 \(bu |
2942 \(bu |