author | chegar |
Thu, 17 Oct 2019 20:54:25 +0100 | |
branch | datagramsocketimpl-branch |
changeset 58679 | 9c3209ff7550 |
parent 58678 | 9cf78a70fa4f |
parent 55339 | 0530705ca300 |
permissions | -rw-r--r-- |
10 | 1 |
/* |
53991 | 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.formats.html; |
10 | 27 |
|
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
29957
diff
changeset
|
28 |
import javax.lang.model.element.Element; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
29957
diff
changeset
|
29 |
import javax.lang.model.element.ExecutableElement; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
29957
diff
changeset
|
30 |
import javax.lang.model.element.TypeElement; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
29957
diff
changeset
|
31 |
import javax.lang.model.type.TypeMirror; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
29957
diff
changeset
|
32 |
|
54596
86c1da00dd6a
8219998: Eliminate inherently singleton lists
pmuthuswamy
parents:
54060
diff
changeset
|
33 |
import jdk.javadoc.internal.doclets.formats.html.markup.ContentBuilder; |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
29957
diff
changeset
|
34 |
import jdk.javadoc.internal.doclets.formats.html.markup.HtmlStyle; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
29957
diff
changeset
|
35 |
import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTree; |
55339
0530705ca300
8223364: Bad placement of anchor relative to header
hannesw
parents:
55232
diff
changeset
|
36 |
import jdk.javadoc.internal.doclets.formats.html.markup.StringContent; |
54596
86c1da00dd6a
8219998: Eliminate inherently singleton lists
pmuthuswamy
parents:
54060
diff
changeset
|
37 |
import jdk.javadoc.internal.doclets.formats.html.markup.Table; |
86c1da00dd6a
8219998: Eliminate inherently singleton lists
pmuthuswamy
parents:
54060
diff
changeset
|
38 |
import jdk.javadoc.internal.doclets.formats.html.markup.TableHeader; |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
29957
diff
changeset
|
39 |
import jdk.javadoc.internal.doclets.toolkit.AnnotationTypeRequiredMemberWriter; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
29957
diff
changeset
|
40 |
import jdk.javadoc.internal.doclets.toolkit.Content; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
29957
diff
changeset
|
41 |
import jdk.javadoc.internal.doclets.toolkit.MemberSummaryWriter; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
29957
diff
changeset
|
42 |
|
10 | 43 |
|
44 |
/** |
|
45 |
* Writes annotation type required member documentation in HTML format. |
|
46 |
* |
|
14260 | 47 |
* <p><b>This is NOT part of any supported API. |
48 |
* If you write code that depends on this, you do so at your own risk. |
|
49 |
* This code and its internal interfaces are subject to change or |
|
50 |
* deletion without notice.</b> |
|
51 |
* |
|
10 | 52 |
* @author Jamie Ho |
2320
5b8c377175f4
6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents:
2216
diff
changeset
|
53 |
* @author Bhavesh Patel (Modified) |
10 | 54 |
*/ |
55 |
public class AnnotationTypeRequiredMemberWriterImpl extends AbstractMemberWriter |
|
56 |
implements AnnotationTypeRequiredMemberWriter, MemberSummaryWriter { |
|
57 |
||
58 |
/** |
|
59 |
* Construct a new AnnotationTypeRequiredMemberWriterImpl. |
|
60 |
* |
|
61 |
* @param writer the writer that will write the output. |
|
62 |
* @param annotationType the AnnotationType that holds this member. |
|
63 |
*/ |
|
64 |
public AnnotationTypeRequiredMemberWriterImpl(SubWriterHolderWriter writer, |
|
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
29957
diff
changeset
|
65 |
TypeElement annotationType) { |
10 | 66 |
super(writer, annotationType); |
67 |
} |
|
68 |
||
69 |
/** |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
70 |
* {@inheritDoc} |
10 | 71 |
*/ |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
29957
diff
changeset
|
72 |
public Content getMemberSummaryHeader(TypeElement typeElement, |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
73 |
Content memberSummaryTree) { |
54060
53a95878619f
8220202: Simplify/standardize method naming for HtmlTree
jjg
parents:
53991
diff
changeset
|
74 |
memberSummaryTree.add( |
53991 | 75 |
MarkerComments.START_OF_ANNOTATION_TYPE_REQUIRED_MEMBER_SUMMARY); |
54596
86c1da00dd6a
8219998: Eliminate inherently singleton lists
pmuthuswamy
parents:
54060
diff
changeset
|
76 |
Content memberTree = new ContentBuilder(); |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
29957
diff
changeset
|
77 |
writer.addSummaryHeader(this, typeElement, memberTree); |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
78 |
return memberTree; |
10 | 79 |
} |
80 |
||
81 |
/** |
|
82 |
* {@inheritDoc} |
|
83 |
*/ |
|
20237
b6d89903c867
8015249: javadoc fails to document static final fields in annotation types
bpatel
parents:
19253
diff
changeset
|
84 |
public Content getMemberTreeHeader() { |
b6d89903c867
8015249: javadoc fails to document static final fields in annotation types
bpatel
parents:
19253
diff
changeset
|
85 |
return writer.getMemberTreeHeader(); |
b6d89903c867
8015249: javadoc fails to document static final fields in annotation types
bpatel
parents:
19253
diff
changeset
|
86 |
} |
b6d89903c867
8015249: javadoc fails to document static final fields in annotation types
bpatel
parents:
19253
diff
changeset
|
87 |
|
b6d89903c867
8015249: javadoc fails to document static final fields in annotation types
bpatel
parents:
19253
diff
changeset
|
88 |
/** |
b6d89903c867
8015249: javadoc fails to document static final fields in annotation types
bpatel
parents:
19253
diff
changeset
|
89 |
* {@inheritDoc} |
b6d89903c867
8015249: javadoc fails to document static final fields in annotation types
bpatel
parents:
19253
diff
changeset
|
90 |
*/ |
29957
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
91 |
public void addMemberTree(Content memberSummaryTree, Content memberTree) { |
54596
86c1da00dd6a
8219998: Eliminate inherently singleton lists
pmuthuswamy
parents:
54060
diff
changeset
|
92 |
writer.addMemberTree(HtmlStyle.memberSummary, memberSummaryTree, memberTree); |
29957
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
93 |
} |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
94 |
|
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
95 |
/** |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
96 |
* {@inheritDoc} |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
97 |
*/ |
20237
b6d89903c867
8015249: javadoc fails to document static final fields in annotation types
bpatel
parents:
19253
diff
changeset
|
98 |
public void addAnnotationDetailsMarker(Content memberDetails) { |
54060
53a95878619f
8220202: Simplify/standardize method naming for HtmlTree
jjg
parents:
53991
diff
changeset
|
99 |
memberDetails.add(MarkerComments.START_OF_ANNOTATION_TYPE_DETAILS); |
20237
b6d89903c867
8015249: javadoc fails to document static final fields in annotation types
bpatel
parents:
19253
diff
changeset
|
100 |
} |
b6d89903c867
8015249: javadoc fails to document static final fields in annotation types
bpatel
parents:
19253
diff
changeset
|
101 |
|
b6d89903c867
8015249: javadoc fails to document static final fields in annotation types
bpatel
parents:
19253
diff
changeset
|
102 |
/** |
b6d89903c867
8015249: javadoc fails to document static final fields in annotation types
bpatel
parents:
19253
diff
changeset
|
103 |
* {@inheritDoc} |
b6d89903c867
8015249: javadoc fails to document static final fields in annotation types
bpatel
parents:
19253
diff
changeset
|
104 |
*/ |
54596
86c1da00dd6a
8219998: Eliminate inherently singleton lists
pmuthuswamy
parents:
54060
diff
changeset
|
105 |
public Content getAnnotationDetailsTreeHeader(TypeElement te) { |
86c1da00dd6a
8219998: Eliminate inherently singleton lists
pmuthuswamy
parents:
54060
diff
changeset
|
106 |
Content memberDetailsTree = new ContentBuilder(); |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
107 |
if (!writer.printedAnnotationHeading) { |
53991 | 108 |
Content heading = HtmlTree.HEADING(Headings.TypeDeclaration.DETAILS_HEADING, |
40303 | 109 |
contents.annotationTypeDetailsLabel); |
54596
86c1da00dd6a
8219998: Eliminate inherently singleton lists
pmuthuswamy
parents:
54060
diff
changeset
|
110 |
memberDetailsTree.add(links.createAnchor( |
86c1da00dd6a
8219998: Eliminate inherently singleton lists
pmuthuswamy
parents:
54060
diff
changeset
|
111 |
SectionName.ANNOTATION_TYPE_ELEMENT_DETAIL)); |
55339
0530705ca300
8223364: Bad placement of anchor relative to header
hannesw
parents:
55232
diff
changeset
|
112 |
memberDetailsTree.add(heading); |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
113 |
writer.printedAnnotationHeading = true; |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
114 |
} |
54596
86c1da00dd6a
8219998: Eliminate inherently singleton lists
pmuthuswamy
parents:
54060
diff
changeset
|
115 |
return memberDetailsTree; |
10 | 116 |
} |
117 |
||
118 |
/** |
|
119 |
* {@inheritDoc} |
|
120 |
*/ |
|
47850 | 121 |
@Override |
122 |
public Content getAnnotationDocTreeHeader(Element member, Content annotationDetailsTree) { |
|
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
29957
diff
changeset
|
123 |
String simpleName = name(member); |
54596
86c1da00dd6a
8219998: Eliminate inherently singleton lists
pmuthuswamy
parents:
54060
diff
changeset
|
124 |
Content annotationDocTree = new ContentBuilder(); |
53991 | 125 |
Content heading = new HtmlTree(Headings.TypeDeclaration.MEMBER_HEADING); |
55339
0530705ca300
8223364: Bad placement of anchor relative to header
hannesw
parents:
55232
diff
changeset
|
126 |
heading.add(links.createAnchor( |
0530705ca300
8223364: Bad placement of anchor relative to header
hannesw
parents:
55232
diff
changeset
|
127 |
simpleName + utils.signature((ExecutableElement) member), new StringContent(simpleName))); |
54060
53a95878619f
8220202: Simplify/standardize method naming for HtmlTree
jjg
parents:
53991
diff
changeset
|
128 |
annotationDocTree.add(heading); |
54596
86c1da00dd6a
8219998: Eliminate inherently singleton lists
pmuthuswamy
parents:
54060
diff
changeset
|
129 |
return HtmlTree.SECTION(HtmlStyle.detail, annotationDocTree); |
10 | 130 |
} |
131 |
||
132 |
/** |
|
133 |
* {@inheritDoc} |
|
134 |
*/ |
|
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
29957
diff
changeset
|
135 |
public Content getSignature(Element member) { |
55197
0ca8e495bbba
8214126: Method signatures not formatted correctly in browser
hannesw
parents:
54610
diff
changeset
|
136 |
return new MemberSignature(member) |
0ca8e495bbba
8214126: Method signatures not formatted correctly in browser
hannesw
parents:
54610
diff
changeset
|
137 |
.addType(getType(member)) |
0ca8e495bbba
8214126: Method signatures not formatted correctly in browser
hannesw
parents:
54610
diff
changeset
|
138 |
.toContent(); |
10 | 139 |
} |
140 |
||
141 |
/** |
|
142 |
* {@inheritDoc} |
|
143 |
*/ |
|
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
29957
diff
changeset
|
144 |
public void addDeprecated(Element member, Content annotationDocTree) { |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
145 |
addDeprecatedInfo(member, annotationDocTree); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
146 |
} |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
147 |
|
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
148 |
/** |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
149 |
* {@inheritDoc} |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
150 |
*/ |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
29957
diff
changeset
|
151 |
public void addComments(Element member, Content annotationDocTree) { |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
152 |
addComment(member, annotationDocTree); |
10 | 153 |
} |
154 |
||
155 |
/** |
|
156 |
* {@inheritDoc} |
|
157 |
*/ |
|
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
29957
diff
changeset
|
158 |
public void addTags(Element member, Content annotationDocTree) { |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
159 |
writer.addTagsInfo(member, annotationDocTree); |
10 | 160 |
} |
161 |
||
162 |
/** |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
163 |
* {@inheritDoc} |
10 | 164 |
*/ |
54596
86c1da00dd6a
8219998: Eliminate inherently singleton lists
pmuthuswamy
parents:
54060
diff
changeset
|
165 |
public Content getAnnotationDetails(Content annotationDetailsTreeHeader, Content annotationDetailsTree) { |
86c1da00dd6a
8219998: Eliminate inherently singleton lists
pmuthuswamy
parents:
54060
diff
changeset
|
166 |
Content annotationDetails = new ContentBuilder(annotationDetailsTreeHeader, annotationDetailsTree); |
86c1da00dd6a
8219998: Eliminate inherently singleton lists
pmuthuswamy
parents:
54060
diff
changeset
|
167 |
return getMemberTree(HtmlTree.SECTION(HtmlStyle.memberDetails, annotationDetails)); |
10 | 168 |
} |
169 |
||
170 |
/** |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
171 |
* {@inheritDoc} |
10 | 172 |
*/ |
55232 | 173 |
public Content getAnnotationDoc(Content annotationDocTree) { |
174 |
return getMemberTree(annotationDocTree); |
|
10 | 175 |
} |
176 |
||
177 |
/** |
|
178 |
* {@inheritDoc} |
|
179 |
*/ |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
180 |
public void addSummaryLabel(Content memberTree) { |
53991 | 181 |
Content label = HtmlTree.HEADING(Headings.TypeDeclaration.SUMMARY_HEADING, |
40303 | 182 |
contents.annotateTypeRequiredMemberSummaryLabel); |
54060
53a95878619f
8220202: Simplify/standardize method naming for HtmlTree
jjg
parents:
53991
diff
changeset
|
183 |
memberTree.add(label); |
2320
5b8c377175f4
6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents:
2216
diff
changeset
|
184 |
} |
5b8c377175f4
6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents:
2216
diff
changeset
|
185 |
|
5b8c377175f4
6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents:
2216
diff
changeset
|
186 |
/** |
47846 | 187 |
* Get the caption for the summary table. |
188 |
* @return the caption |
|
189 |
*/ |
|
190 |
// Overridden by AnnotationTypeOptionalMemberWriterImpl |
|
191 |
protected Content getCaption() { |
|
192 |
return contents.getContent("doclet.Annotation_Type_Required_Members"); |
|
2320
5b8c377175f4
6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents:
2216
diff
changeset
|
193 |
} |
5b8c377175f4
6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents:
2216
diff
changeset
|
194 |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
195 |
/** |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
196 |
* {@inheritDoc} |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
197 |
*/ |
47846 | 198 |
@Override |
199 |
public TableHeader getSummaryTableHeader(Element member) { |
|
200 |
return new TableHeader(contents.modifierAndTypeLabel, |
|
201 |
contents.annotationTypeRequiredMemberLabel, contents.descriptionLabel); |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
202 |
} |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
203 |
|
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
204 |
/** |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
205 |
* {@inheritDoc} |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
206 |
*/ |
47846 | 207 |
@Override |
208 |
protected Table createSummaryTable() { |
|
53562 | 209 |
return new Table(HtmlStyle.memberSummary) |
47846 | 210 |
.setCaption(getCaption()) |
211 |
.setHeader(getSummaryTableHeader(typeElement)) |
|
212 |
.setRowScopeColumn(1) |
|
51260
b7a307084247
8203791: Remove "compatibility" features from Table.java
pmuthuswamy
parents:
49551
diff
changeset
|
213 |
.setColumnStyles(HtmlStyle.colFirst, HtmlStyle.colSecond, HtmlStyle.colLast); |
10 | 214 |
} |
215 |
||
216 |
/** |
|
217 |
* {@inheritDoc} |
|
218 |
*/ |
|
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
29957
diff
changeset
|
219 |
public void addSummaryAnchor(TypeElement typeElement, Content memberTree) { |
54060
53a95878619f
8220202: Simplify/standardize method naming for HtmlTree
jjg
parents:
53991
diff
changeset
|
220 |
memberTree.add(links.createAnchor( |
21008
af0b915df7cc
8025633: Fix javadoc to generate valid anchor names
bpatel
parents:
20237
diff
changeset
|
221 |
SectionName.ANNOTATION_TYPE_REQUIRED_ELEMENT_SUMMARY)); |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
222 |
} |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
223 |
|
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
224 |
/** |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
225 |
* {@inheritDoc} |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
226 |
*/ |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
29957
diff
changeset
|
227 |
public void addInheritedSummaryAnchor(TypeElement typeElement, Content inheritedTree) { |
10 | 228 |
} |
229 |
||
230 |
/** |
|
231 |
* {@inheritDoc} |
|
232 |
*/ |
|
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
29957
diff
changeset
|
233 |
public void addInheritedSummaryLabel(TypeElement typeElement, Content inheritedTree) { |
10 | 234 |
} |
235 |
||
236 |
/** |
|
237 |
* {@inheritDoc} |
|
238 |
*/ |
|
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
29957
diff
changeset
|
239 |
protected void addSummaryLink(LinkInfoImpl.Kind context, TypeElement typeElement, Element member, |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
240 |
Content tdSummary) { |
21478
fa4c7cda1b41
8026567: Use meaningful style names for strong and italic styles.
bpatel
parents:
21008
diff
changeset
|
241 |
Content memberLink = HtmlTree.SPAN(HtmlStyle.memberNameLink, |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
29957
diff
changeset
|
242 |
writer.getDocLink(context, member, name(member), false)); |
21478
fa4c7cda1b41
8026567: Use meaningful style names for strong and italic styles.
bpatel
parents:
21008
diff
changeset
|
243 |
Content code = HtmlTree.CODE(memberLink); |
54060
53a95878619f
8220202: Simplify/standardize method naming for HtmlTree
jjg
parents:
53991
diff
changeset
|
244 |
tdSummary.add(code); |
10 | 245 |
} |
246 |
||
247 |
/** |
|
248 |
* {@inheritDoc} |
|
249 |
*/ |
|
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
29957
diff
changeset
|
250 |
protected void addInheritedSummaryLink(TypeElement typeElement, |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
29957
diff
changeset
|
251 |
Element member, Content linksTree) { |
10 | 252 |
//Not applicable. |
253 |
} |
|
254 |
||
255 |
/** |
|
256 |
* {@inheritDoc} |
|
257 |
*/ |
|
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
29957
diff
changeset
|
258 |
protected void addSummaryType(Element member, Content tdSummaryType) { |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
29957
diff
changeset
|
259 |
addModifierAndType(member, getType(member), tdSummaryType); |
10 | 260 |
} |
261 |
||
262 |
/** |
|
263 |
* {@inheritDoc} |
|
264 |
*/ |
|
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
29957
diff
changeset
|
265 |
protected Content getDeprecatedLink(Element member) { |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
29957
diff
changeset
|
266 |
String name = utils.getFullyQualifiedName(member) + "." + member.getSimpleName(); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
29957
diff
changeset
|
267 |
return writer.getDocLink(LinkInfoImpl.Kind.MEMBER, member, name); |
10 | 268 |
} |
269 |
||
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
29957
diff
changeset
|
270 |
private TypeMirror getType(Element member) { |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
29957
diff
changeset
|
271 |
return utils.isExecutableElement(member) |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
29957
diff
changeset
|
272 |
? utils.getReturnType((ExecutableElement) member) |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
29957
diff
changeset
|
273 |
: member.asType(); |
10 | 274 |
} |
275 |
} |