author | hannesw |
Wed, 27 Nov 2019 13:08:16 +0100 | |
changeset 59294 | 48b88b9c11eb |
parent 54596 | 86c1da00dd6a |
permissions | -rw-r--r-- |
10 | 1 |
/* |
54060
53a95878619f
8220202: Simplify/standardize method naming for HtmlTree
jjg
parents:
48029
diff
changeset
|
2 |
* Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved. |
10 | 3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 |
* |
|
5 |
* This code is free software; you can redistribute it and/or modify it |
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
|
5520 | 7 |
* published by the Free Software Foundation. Oracle designates this |
10 | 8 |
* particular file as subject to the "Classpath" exception as provided |
5520 | 9 |
* by Oracle in the LICENSE file that accompanied this code. |
10 | 10 |
* |
11 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
|
12 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
13 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
14 |
* version 2 for more details (a copy is included in the LICENSE file that |
|
15 |
* accompanied this code). |
|
16 |
* |
|
17 |
* You should have received a copy of the GNU General Public License version |
|
18 |
* 2 along with this work; if not, write to the Free Software Foundation, |
|
19 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
20 |
* |
|
5520 | 21 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
22 |
* or visit www.oracle.com if you need additional information or have any |
|
23 |
* questions. |
|
10 | 24 |
*/ |
25 |
||
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
29957
diff
changeset
|
26 |
package jdk.javadoc.internal.doclets.toolkit.builders; |
10 | 27 |
|
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
29957
diff
changeset
|
28 |
import java.util.Set; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
29957
diff
changeset
|
29 |
import java.util.SortedSet; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
29957
diff
changeset
|
30 |
|
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
29957
diff
changeset
|
31 |
import javax.lang.model.element.PackageElement; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
29957
diff
changeset
|
32 |
import javax.lang.model.element.TypeElement; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
29957
diff
changeset
|
33 |
|
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
29957
diff
changeset
|
34 |
import jdk.javadoc.internal.doclets.toolkit.Content; |
48029
e9dab2492924
8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents:
47427
diff
changeset
|
35 |
import jdk.javadoc.internal.doclets.toolkit.DocFilesHandler; |
40587 | 36 |
import jdk.javadoc.internal.doclets.toolkit.DocletException; |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
29957
diff
changeset
|
37 |
import jdk.javadoc.internal.doclets.toolkit.PackageSummaryWriter; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
29957
diff
changeset
|
38 |
|
10 | 39 |
|
40 |
/** |
|
41 |
* Builds the summary for a given package. |
|
42 |
* |
|
14260
727a84636f12
8000665: fix "internal API" comments on javadoc files
jjg
parents:
14258
diff
changeset
|
43 |
* <p><b>This is NOT part of any supported API. |
727a84636f12
8000665: fix "internal API" comments on javadoc files
jjg
parents:
14258
diff
changeset
|
44 |
* If you write code that depends on this, you do so at your own risk. |
727a84636f12
8000665: fix "internal API" comments on javadoc files
jjg
parents:
14258
diff
changeset
|
45 |
* This code and its internal interfaces are subject to change or |
727a84636f12
8000665: fix "internal API" comments on javadoc files
jjg
parents:
14258
diff
changeset
|
46 |
* deletion without notice.</b> |
10 | 47 |
* |
48 |
* @author Jamie Ho |
|
2320
5b8c377175f4
6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents:
1789
diff
changeset
|
49 |
* @author Bhavesh Patel (Modified) |
10 | 50 |
*/ |
51 |
public class PackageSummaryBuilder extends AbstractBuilder { |
|
52 |
||
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
53 |
/** |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
54 |
* The package being documented. |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
55 |
*/ |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
29957
diff
changeset
|
56 |
private final PackageElement packageElement; |
10 | 57 |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
58 |
/** |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
59 |
* The doclet specific writer that will output the result. |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
60 |
*/ |
14542 | 61 |
private final PackageSummaryWriter packageWriter; |
10 | 62 |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
63 |
/** |
14542 | 64 |
* Construct a new PackageSummaryBuilder. |
65 |
* |
|
66 |
* @param context the build context. |
|
67 |
* @param pkg the package being documented. |
|
68 |
* @param packageWriter the doclet specific writer that will output the |
|
69 |
* result. |
|
70 |
*/ |
|
71 |
private PackageSummaryBuilder(Context context, |
|
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
29957
diff
changeset
|
72 |
PackageElement pkg, |
14542 | 73 |
PackageSummaryWriter packageWriter) { |
74 |
super(context); |
|
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
29957
diff
changeset
|
75 |
this.packageElement = pkg; |
14542 | 76 |
this.packageWriter = packageWriter; |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
77 |
} |
10 | 78 |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
79 |
/** |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
80 |
* Construct a new PackageSummaryBuilder. |
14542 | 81 |
* |
82 |
* @param context the build context. |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
83 |
* @param pkg the package being documented. |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
84 |
* @param packageWriter the doclet specific writer that will output the |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
85 |
* result. |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
86 |
* |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
87 |
* @return an instance of a PackageSummaryBuilder. |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
88 |
*/ |
14542 | 89 |
public static PackageSummaryBuilder getInstance(Context context, |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
29957
diff
changeset
|
90 |
PackageElement pkg, PackageSummaryWriter packageWriter) { |
14542 | 91 |
return new PackageSummaryBuilder(context, pkg, packageWriter); |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
92 |
} |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
93 |
|
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
94 |
/** |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
95 |
* Build the package summary. |
40587 | 96 |
* |
97 |
* @throws DocletException if there is a problem while building the documentation |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
98 |
*/ |
40587 | 99 |
@Override |
100 |
public void build() throws DocletException { |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
101 |
if (packageWriter == null) { |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
102 |
//Doclet does not support this output. |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
103 |
return; |
10 | 104 |
} |
59294
48b88b9c11eb
8223378: CSS solution for navbar problem with <a> elements is not ideal
hannesw
parents:
54596
diff
changeset
|
105 |
buildPackageDoc(); |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
106 |
} |
10 | 107 |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
108 |
/** |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
109 |
* Build the package documentation. |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
110 |
* |
40587 | 111 |
* @throws DocletException if there is a problem while building the documentation |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
112 |
*/ |
59294
48b88b9c11eb
8223378: CSS solution for navbar problem with <a> elements is not ideal
hannesw
parents:
54596
diff
changeset
|
113 |
protected void buildPackageDoc() throws DocletException { |
48b88b9c11eb
8223378: CSS solution for navbar problem with <a> elements is not ideal
hannesw
parents:
54596
diff
changeset
|
114 |
Content contentTree = packageWriter.getPackageHeader(utils.getPackageName(packageElement)); |
45599 | 115 |
|
59294
48b88b9c11eb
8223378: CSS solution for navbar problem with <a> elements is not ideal
hannesw
parents:
54596
diff
changeset
|
116 |
buildContent(); |
45599 | 117 |
|
59294
48b88b9c11eb
8223378: CSS solution for navbar problem with <a> elements is not ideal
hannesw
parents:
54596
diff
changeset
|
118 |
packageWriter.addPackageFooter(); |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
119 |
packageWriter.printDocument(contentTree); |
48029
e9dab2492924
8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents:
47427
diff
changeset
|
120 |
DocFilesHandler docFilesHandler = configuration |
e9dab2492924
8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents:
47427
diff
changeset
|
121 |
.getWriterFactory() |
e9dab2492924
8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents:
47427
diff
changeset
|
122 |
.getDocFilesHandler(packageElement); |
e9dab2492924
8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents:
47427
diff
changeset
|
123 |
docFilesHandler.copyDocFiles(); |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
124 |
} |
10 | 125 |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
126 |
/** |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
29957
diff
changeset
|
127 |
* Build the content for the package. |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
128 |
* |
40587 | 129 |
* @throws DocletException if there is a problem while building the documentation |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
130 |
*/ |
59294
48b88b9c11eb
8223378: CSS solution for navbar problem with <a> elements is not ideal
hannesw
parents:
54596
diff
changeset
|
131 |
protected void buildContent() throws DocletException { |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
132 |
Content packageContentTree = packageWriter.getContentHeader(); |
45599 | 133 |
|
134 |
buildPackageDescription(packageContentTree); |
|
135 |
buildPackageTags(packageContentTree); |
|
136 |
buildSummary(packageContentTree); |
|
137 |
||
59294
48b88b9c11eb
8223378: CSS solution for navbar problem with <a> elements is not ideal
hannesw
parents:
54596
diff
changeset
|
138 |
packageWriter.addPackageContent(packageContentTree); |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
139 |
} |
10 | 140 |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
141 |
/** |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
142 |
* Build the package summary. |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
143 |
* |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
144 |
* @param packageContentTree the package content tree to which the summaries will |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
145 |
* be added |
40587 | 146 |
* @throws DocletException if there is a problem while building the documentation |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
147 |
*/ |
45599 | 148 |
protected void buildSummary(Content packageContentTree) throws DocletException { |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
149 |
Content summaryContentTree = packageWriter.getSummaryHeader(); |
45599 | 150 |
|
151 |
buildInterfaceSummary(summaryContentTree); |
|
152 |
buildClassSummary(summaryContentTree); |
|
153 |
buildEnumSummary(summaryContentTree); |
|
154 |
buildExceptionSummary(summaryContentTree); |
|
155 |
buildErrorSummary(summaryContentTree); |
|
156 |
buildAnnotationTypeSummary(summaryContentTree); |
|
157 |
||
54596
86c1da00dd6a
8219998: Eliminate inherently singleton lists
pmuthuswamy
parents:
54060
diff
changeset
|
158 |
packageContentTree.add(packageWriter.getPackageSummary(summaryContentTree)); |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
159 |
} |
10 | 160 |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
161 |
/** |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
162 |
* Build the summary for the interfaces in this package. |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
163 |
* |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
164 |
* @param summaryContentTree the summary tree to which the interface summary |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
165 |
* will be added |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
166 |
*/ |
45599 | 167 |
protected void buildInterfaceSummary(Content summaryContentTree) { |
40508
74ef30d16fb9
8159305: Enhance the javadoc tool to support module related options
ksrini
parents:
40303
diff
changeset
|
168 |
SortedSet<TypeElement> ilist = utils.isSpecified(packageElement) |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
29957
diff
changeset
|
169 |
? utils.getTypeElementsAsSortedSet(utils.getInterfaces(packageElement)) |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
29957
diff
changeset
|
170 |
: configuration.typeElementCatalog.interfaces(packageElement); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
29957
diff
changeset
|
171 |
SortedSet<TypeElement> interfaces = utils.filterOutPrivateClasses(ilist, configuration.javafx); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
29957
diff
changeset
|
172 |
if (!interfaces.isEmpty()) { |
47427 | 173 |
packageWriter.addInterfaceSummary(interfaces, summaryContentTree); |
10 | 174 |
} |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
175 |
} |
10 | 176 |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
177 |
/** |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
178 |
* Build the summary for the classes in this package. |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
179 |
* |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
180 |
* @param summaryContentTree the summary tree to which the class summary will |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
181 |
* be added |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
182 |
*/ |
45599 | 183 |
protected void buildClassSummary(Content summaryContentTree) { |
40508
74ef30d16fb9
8159305: Enhance the javadoc tool to support module related options
ksrini
parents:
40303
diff
changeset
|
184 |
SortedSet<TypeElement> clist = utils.isSpecified(packageElement) |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
29957
diff
changeset
|
185 |
? utils.getTypeElementsAsSortedSet(utils.getOrdinaryClasses(packageElement)) |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
29957
diff
changeset
|
186 |
: configuration.typeElementCatalog.ordinaryClasses(packageElement); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
29957
diff
changeset
|
187 |
SortedSet<TypeElement> classes = utils.filterOutPrivateClasses(clist, configuration.javafx); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
29957
diff
changeset
|
188 |
if (!classes.isEmpty()) { |
47427 | 189 |
packageWriter.addClassSummary(classes, summaryContentTree); |
10 | 190 |
} |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
191 |
} |
10 | 192 |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
193 |
/** |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
194 |
* Build the summary for the enums in this package. |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
195 |
* |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
196 |
* @param summaryContentTree the summary tree to which the enum summary will |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
197 |
* be added |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
198 |
*/ |
45599 | 199 |
protected void buildEnumSummary(Content summaryContentTree) { |
40508
74ef30d16fb9
8159305: Enhance the javadoc tool to support module related options
ksrini
parents:
40303
diff
changeset
|
200 |
SortedSet<TypeElement> elist = utils.isSpecified(packageElement) |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
29957
diff
changeset
|
201 |
? utils.getTypeElementsAsSortedSet(utils.getEnums(packageElement)) |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
29957
diff
changeset
|
202 |
: configuration.typeElementCatalog.enums(packageElement); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
29957
diff
changeset
|
203 |
SortedSet<TypeElement> enums = utils.filterOutPrivateClasses(elist, configuration.javafx); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
29957
diff
changeset
|
204 |
if (!enums.isEmpty()) { |
47427 | 205 |
packageWriter.addEnumSummary(enums, summaryContentTree); |
10 | 206 |
} |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
207 |
} |
10 | 208 |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
209 |
/** |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
210 |
* Build the summary for the exceptions in this package. |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
211 |
* |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
212 |
* @param summaryContentTree the summary tree to which the exception summary will |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
213 |
* be added |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
214 |
*/ |
45599 | 215 |
protected void buildExceptionSummary(Content summaryContentTree) { |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
29957
diff
changeset
|
216 |
Set<TypeElement> iexceptions = |
40508
74ef30d16fb9
8159305: Enhance the javadoc tool to support module related options
ksrini
parents:
40303
diff
changeset
|
217 |
utils.isSpecified(packageElement) |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
29957
diff
changeset
|
218 |
? utils.getTypeElementsAsSortedSet(utils.getExceptions(packageElement)) |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
29957
diff
changeset
|
219 |
: configuration.typeElementCatalog.exceptions(packageElement); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
29957
diff
changeset
|
220 |
SortedSet<TypeElement> exceptions = utils.filterOutPrivateClasses(iexceptions, |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
29957
diff
changeset
|
221 |
configuration.javafx); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
29957
diff
changeset
|
222 |
if (!exceptions.isEmpty()) { |
47427 | 223 |
packageWriter.addExceptionSummary(exceptions, summaryContentTree); |
10 | 224 |
} |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
225 |
} |
10 | 226 |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
227 |
/** |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
228 |
* Build the summary for the errors in this package. |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
229 |
* |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
230 |
* @param summaryContentTree the summary tree to which the error summary will |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
231 |
* be added |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
232 |
*/ |
45599 | 233 |
protected void buildErrorSummary(Content summaryContentTree) { |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
29957
diff
changeset
|
234 |
Set<TypeElement> ierrors = |
40508
74ef30d16fb9
8159305: Enhance the javadoc tool to support module related options
ksrini
parents:
40303
diff
changeset
|
235 |
utils.isSpecified(packageElement) |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
29957
diff
changeset
|
236 |
? utils.getTypeElementsAsSortedSet(utils.getErrors(packageElement)) |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
29957
diff
changeset
|
237 |
: configuration.typeElementCatalog.errors(packageElement); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
29957
diff
changeset
|
238 |
SortedSet<TypeElement> errors = utils.filterOutPrivateClasses(ierrors, configuration.javafx); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
29957
diff
changeset
|
239 |
if (!errors.isEmpty()) { |
47427 | 240 |
packageWriter.addErrorSummary(errors, summaryContentTree); |
10 | 241 |
} |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
242 |
} |
10 | 243 |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
244 |
/** |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
245 |
* Build the summary for the annotation type in this package. |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
246 |
* |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
247 |
* @param summaryContentTree the summary tree to which the annotation type |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
248 |
* summary will be added |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
249 |
*/ |
45599 | 250 |
protected void buildAnnotationTypeSummary(Content summaryContentTree) { |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
29957
diff
changeset
|
251 |
SortedSet<TypeElement> iannotationTypes = |
40508
74ef30d16fb9
8159305: Enhance the javadoc tool to support module related options
ksrini
parents:
40303
diff
changeset
|
252 |
utils.isSpecified(packageElement) |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
29957
diff
changeset
|
253 |
? utils.getTypeElementsAsSortedSet(utils.getAnnotationTypes(packageElement)) |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
29957
diff
changeset
|
254 |
: configuration.typeElementCatalog.annotationTypes(packageElement); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
29957
diff
changeset
|
255 |
SortedSet<TypeElement> annotationTypes = utils.filterOutPrivateClasses(iannotationTypes, |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
29957
diff
changeset
|
256 |
configuration.javafx); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
29957
diff
changeset
|
257 |
if (!annotationTypes.isEmpty()) { |
47427 | 258 |
packageWriter.addAnnotationTypeSummary(annotationTypes, summaryContentTree); |
10 | 259 |
} |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
260 |
} |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
261 |
|
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
262 |
/** |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
263 |
* Build the description of the summary. |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
264 |
* |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
265 |
* @param packageContentTree the tree to which the package description will |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
266 |
* be added |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
267 |
*/ |
45599 | 268 |
protected void buildPackageDescription(Content packageContentTree) { |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
269 |
if (configuration.nocomment) { |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
270 |
return; |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
271 |
} |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
272 |
packageWriter.addPackageDescription(packageContentTree); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
273 |
} |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
274 |
|
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
275 |
/** |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
276 |
* Build the tags of the summary. |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
277 |
* |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
278 |
* @param packageContentTree the tree to which the package tags will be added |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
279 |
*/ |
45599 | 280 |
protected void buildPackageTags(Content packageContentTree) { |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
281 |
if (configuration.nocomment) { |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
282 |
return; |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
283 |
} |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
284 |
packageWriter.addPackageTags(packageContentTree); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
285 |
} |
10 | 286 |
} |