author | ohair |
Tue, 25 May 2010 15:54:51 -0700 | |
changeset 5520 | 86e4b9a9da40 |
parent 2320 | 5b8c377175f4 |
child 7614 | cfadc977ca75 |
permissions | -rw-r--r-- |
10 | 1 |
/* |
5520 | 2 |
* Copyright (c) 1997, 2004, 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 |
||
26 |
package com.sun.tools.doclets.formats.html; |
|
27 |
||
2216
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
1787
diff
changeset
|
28 |
import java.io.*; |
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
1787
diff
changeset
|
29 |
|
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
1787
diff
changeset
|
30 |
import com.sun.javadoc.*; |
10 | 31 |
import com.sun.tools.doclets.internal.toolkit.*; |
32 |
import com.sun.tools.doclets.internal.toolkit.util.*; |
|
33 |
import com.sun.tools.doclets.internal.toolkit.taglets.*; |
|
34 |
||
35 |
/** |
|
36 |
* Writes method documentation in HTML format. |
|
37 |
* |
|
38 |
* @author Robert Field |
|
39 |
* @author Atul M Dambalkar |
|
40 |
* @author Jamie Ho (rewrite) |
|
2320
5b8c377175f4
6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents:
2216
diff
changeset
|
41 |
* @author Bhavesh Patel (Modified) |
10 | 42 |
*/ |
43 |
public class MethodWriterImpl extends AbstractExecutableMemberWriter |
|
44 |
implements MethodWriter, MemberSummaryWriter { |
|
45 |
||
46 |
private boolean printedSummaryHeader = false; |
|
47 |
||
48 |
/** |
|
49 |
* Construct a new MethodWriterImpl. |
|
50 |
* |
|
51 |
* @param writer the writer for the class that the methods belong to. |
|
52 |
* @param classDoc the class being documented. |
|
53 |
*/ |
|
54 |
public MethodWriterImpl(SubWriterHolderWriter writer, ClassDoc classDoc) { |
|
55 |
super(writer, classDoc); |
|
56 |
} |
|
57 |
||
58 |
/** |
|
59 |
* Construct a new MethodWriterImpl. |
|
60 |
* |
|
61 |
* @param writer The writer for the class that the methods belong to. |
|
62 |
*/ |
|
63 |
public MethodWriterImpl(SubWriterHolderWriter writer) { |
|
64 |
super(writer); |
|
65 |
} |
|
66 |
||
67 |
/** |
|
68 |
* Write the methods summary header for the given class. |
|
69 |
* |
|
70 |
* @param classDoc the class the summary belongs to. |
|
71 |
*/ |
|
72 |
public void writeMemberSummaryHeader(ClassDoc classDoc) { |
|
73 |
printedSummaryHeader = true; |
|
74 |
writer.println(); |
|
75 |
writer.println("<!-- ========== METHOD SUMMARY =========== -->"); |
|
76 |
writer.println(); |
|
77 |
writer.printSummaryHeader(this, classDoc); |
|
78 |
} |
|
79 |
||
80 |
/** |
|
81 |
* Write the methods summary footer for the given class. |
|
82 |
* |
|
83 |
* @param classDoc the class the summary belongs to. |
|
84 |
*/ |
|
85 |
public void writeMemberSummaryFooter(ClassDoc classDoc) { |
|
86 |
writer.printSummaryFooter(this, classDoc); |
|
87 |
} |
|
88 |
||
89 |
/** |
|
90 |
* Write the inherited methods summary header for the given class. |
|
91 |
* |
|
92 |
* @param classDoc the class the summary belongs to. |
|
93 |
*/ |
|
94 |
public void writeInheritedMemberSummaryHeader(ClassDoc classDoc) { |
|
95 |
if(! printedSummaryHeader){ |
|
96 |
//We don't want inherited summary to not be under heading. |
|
97 |
writeMemberSummaryHeader(classDoc); |
|
98 |
writeMemberSummaryFooter(classDoc); |
|
99 |
printedSummaryHeader = true; |
|
100 |
} |
|
101 |
writer.printInheritedSummaryHeader(this, classDoc); |
|
102 |
} |
|
103 |
||
104 |
/** |
|
105 |
* {@inheritDoc} |
|
106 |
*/ |
|
107 |
public void writeInheritedMemberSummary(ClassDoc classDoc, |
|
108 |
ProgramElementDoc method, boolean isFirst, boolean isLast) { |
|
109 |
writer.printInheritedSummaryMember(this, classDoc, method, isFirst); |
|
110 |
} |
|
111 |
||
112 |
/** |
|
113 |
* Write the inherited methods summary footer for the given class. |
|
114 |
* |
|
115 |
* @param classDoc the class the summary belongs to. |
|
116 |
*/ |
|
117 |
public void writeInheritedMemberSummaryFooter(ClassDoc classDoc) { |
|
118 |
writer.printInheritedSummaryFooter(this, classDoc); ; |
|
119 |
} |
|
120 |
||
121 |
/** |
|
122 |
* Write the header for the method documentation. |
|
123 |
* |
|
124 |
* @param classDoc the class that the methods belong to. |
|
125 |
*/ |
|
126 |
public void writeHeader(ClassDoc classDoc, String header) { |
|
127 |
writer.println(); |
|
128 |
writer.println("<!-- ============ METHOD DETAIL ========== -->"); |
|
129 |
writer.println(); |
|
130 |
writer.anchor("method_detail"); |
|
131 |
writer.printTableHeadingBackground(header); |
|
132 |
} |
|
133 |
||
134 |
/** |
|
135 |
* Write the method header for the given method. |
|
136 |
* |
|
137 |
* @param method the method being documented. |
|
138 |
* @param isFirst the flag to indicate whether or not the method is the |
|
139 |
* first to be documented. |
|
140 |
*/ |
|
141 |
public void writeMethodHeader(MethodDoc method, boolean isFirst) { |
|
142 |
if (! isFirst) { |
|
143 |
writer.printMemberHeader(); |
|
144 |
} |
|
145 |
writer.println(); |
|
146 |
String erasureAnchor; |
|
147 |
if ((erasureAnchor = getErasureAnchor(method)) != null) { |
|
148 |
writer.anchor(erasureAnchor); |
|
149 |
} |
|
150 |
writer.anchor(method); |
|
151 |
writer.h3(); |
|
152 |
writer.print(method.name()); |
|
153 |
writer.h3End(); |
|
154 |
} |
|
155 |
||
156 |
/** |
|
157 |
* Write the signature for the given method. |
|
158 |
* |
|
159 |
* @param method the method being documented. |
|
160 |
*/ |
|
161 |
public void writeSignature(MethodDoc method) { |
|
162 |
writer.displayLength = 0; |
|
163 |
writer.pre(); |
|
164 |
writer.writeAnnotationInfo(method); |
|
165 |
printModifiers(method); |
|
166 |
writeTypeParameters(method); |
|
167 |
printReturnType(method); |
|
168 |
if (configuration().linksource) { |
|
169 |
writer.printSrcLink(method, method.name()); |
|
170 |
} else { |
|
1787
1aa079321cd2
6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents:
10
diff
changeset
|
171 |
strong(method.name()); |
10 | 172 |
} |
173 |
writeParameters(method); |
|
174 |
writeExceptions(method); |
|
175 |
writer.preEnd(); |
|
2216
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
1787
diff
changeset
|
176 |
assert !writer.getMemberDetailsListPrinted(); |
10 | 177 |
} |
178 |
||
179 |
/** |
|
180 |
* Write the deprecated output for the given method. |
|
181 |
* |
|
182 |
* @param method the method being documented. |
|
183 |
*/ |
|
184 |
public void writeDeprecated(MethodDoc method) { |
|
2216
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
1787
diff
changeset
|
185 |
printDeprecated(method); |
10 | 186 |
} |
187 |
||
188 |
/** |
|
189 |
* Write the comments for the given method. |
|
190 |
* |
|
191 |
* @param method the method being documented. |
|
192 |
*/ |
|
193 |
public void writeComments(Type holder, MethodDoc method) { |
|
194 |
ClassDoc holderClassDoc = holder.asClassDoc(); |
|
195 |
if (method.inlineTags().length > 0) { |
|
2216
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
1787
diff
changeset
|
196 |
writer.printMemberDetailsListStartTag(); |
10 | 197 |
if (holder.asClassDoc().equals(classdoc) || |
198 |
(! (holderClassDoc.isPublic() || |
|
199 |
Util.isLinkable(holderClassDoc, configuration())))) { |
|
200 |
writer.dd(); |
|
201 |
writer.printInlineComment(method); |
|
2216
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
1787
diff
changeset
|
202 |
writer.ddEnd(); |
10 | 203 |
} else { |
204 |
String classlink = writer.codeText( |
|
205 |
writer.getDocLink(LinkInfoImpl.CONTEXT_METHOD_DOC_COPY, |
|
206 |
holder.asClassDoc(), method, |
|
207 |
holder.asClassDoc().isIncluded() ? |
|
208 |
holder.typeName() : holder.qualifiedTypeName(), |
|
209 |
false)); |
|
210 |
writer.dd(); |
|
1787
1aa079321cd2
6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents:
10
diff
changeset
|
211 |
writer.strongText(holder.asClassDoc().isClass()? |
10 | 212 |
"doclet.Description_From_Class": |
213 |
"doclet.Description_From_Interface", |
|
214 |
classlink); |
|
215 |
writer.ddEnd(); |
|
216 |
writer.dd(); |
|
217 |
writer.printInlineComment(method); |
|
2216
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
1787
diff
changeset
|
218 |
writer.ddEnd(); |
10 | 219 |
} |
220 |
} |
|
221 |
} |
|
222 |
||
223 |
/** |
|
224 |
* Write the tag output for the given method. |
|
225 |
* |
|
226 |
* @param method the method being documented. |
|
227 |
*/ |
|
228 |
public void writeTags(MethodDoc method) { |
|
229 |
writer.printTags(method); |
|
230 |
} |
|
231 |
||
232 |
/** |
|
233 |
* Write the method footer. |
|
234 |
*/ |
|
235 |
public void writeMethodFooter() { |
|
2216
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
1787
diff
changeset
|
236 |
printMemberFooter(); |
10 | 237 |
} |
238 |
||
239 |
/** |
|
240 |
* Write the footer for the method documentation. |
|
241 |
* |
|
242 |
* @param classDoc the class that the methods belong to. |
|
243 |
*/ |
|
244 |
public void writeFooter(ClassDoc classDoc) { |
|
245 |
//No footer to write for method documentation |
|
246 |
} |
|
247 |
||
248 |
/** |
|
249 |
* Close the writer. |
|
250 |
*/ |
|
251 |
public void close() throws IOException { |
|
252 |
writer.close(); |
|
253 |
} |
|
254 |
||
255 |
public int getMemberKind() { |
|
256 |
return VisibleMemberMap.METHODS; |
|
257 |
} |
|
258 |
||
2320
5b8c377175f4
6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents:
2216
diff
changeset
|
259 |
public void printSummaryLabel() { |
5b8c377175f4
6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents:
2216
diff
changeset
|
260 |
writer.printText("doclet.Method_Summary"); |
5b8c377175f4
6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents:
2216
diff
changeset
|
261 |
} |
5b8c377175f4
6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents:
2216
diff
changeset
|
262 |
|
5b8c377175f4
6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents:
2216
diff
changeset
|
263 |
public void printTableSummary() { |
5b8c377175f4
6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents:
2216
diff
changeset
|
264 |
writer.tableIndexSummary(configuration().getText("doclet.Member_Table_Summary", |
5b8c377175f4
6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents:
2216
diff
changeset
|
265 |
configuration().getText("doclet.Method_Summary"), |
5b8c377175f4
6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents:
2216
diff
changeset
|
266 |
configuration().getText("doclet.methods"))); |
5b8c377175f4
6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents:
2216
diff
changeset
|
267 |
} |
5b8c377175f4
6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents:
2216
diff
changeset
|
268 |
|
5b8c377175f4
6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents:
2216
diff
changeset
|
269 |
public void printSummaryTableHeader(ProgramElementDoc member) { |
5b8c377175f4
6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents:
2216
diff
changeset
|
270 |
String[] header = new String[] { |
5b8c377175f4
6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents:
2216
diff
changeset
|
271 |
writer.getModifierTypeHeader(), |
5b8c377175f4
6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents:
2216
diff
changeset
|
272 |
configuration().getText("doclet.0_and_1", |
5b8c377175f4
6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents:
2216
diff
changeset
|
273 |
configuration().getText("doclet.Method"), |
5b8c377175f4
6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents:
2216
diff
changeset
|
274 |
configuration().getText("doclet.Description")) |
5b8c377175f4
6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents:
2216
diff
changeset
|
275 |
}; |
5b8c377175f4
6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents:
2216
diff
changeset
|
276 |
writer.summaryTableHeader(header, "col"); |
10 | 277 |
} |
278 |
||
279 |
public void printSummaryAnchor(ClassDoc cd) { |
|
280 |
writer.anchor("method_summary"); |
|
281 |
} |
|
282 |
||
283 |
public void printInheritedSummaryAnchor(ClassDoc cd) { |
|
284 |
writer.anchor("methods_inherited_from_class_" + |
|
285 |
ConfigurationImpl.getInstance().getClassName(cd)); |
|
286 |
} |
|
287 |
||
288 |
public void printInheritedSummaryLabel(ClassDoc cd) { |
|
289 |
String classlink = writer.getPreQualifiedClassLink( |
|
290 |
LinkInfoImpl.CONTEXT_MEMBER, cd, false); |
|
1787
1aa079321cd2
6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents:
10
diff
changeset
|
291 |
writer.strong(); |
10 | 292 |
String key = cd.isClass()? |
293 |
"doclet.Methods_Inherited_From_Class" : |
|
294 |
"doclet.Methods_Inherited_From_Interface"; |
|
295 |
writer.printText(key, classlink); |
|
1787
1aa079321cd2
6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents:
10
diff
changeset
|
296 |
writer.strongEnd(); |
10 | 297 |
} |
298 |
||
299 |
protected void printSummaryType(ProgramElementDoc member) { |
|
300 |
MethodDoc meth = (MethodDoc)member; |
|
301 |
printModifierAndType(meth, meth.returnType()); |
|
302 |
} |
|
303 |
||
304 |
protected static void printOverridden(HtmlDocletWriter writer, |
|
305 |
Type overriddenType, MethodDoc method) { |
|
306 |
if(writer.configuration.nocomment){ |
|
307 |
return; |
|
308 |
} |
|
309 |
ClassDoc holderClassDoc = overriddenType.asClassDoc(); |
|
310 |
if (! (holderClassDoc.isPublic() || |
|
311 |
Util.isLinkable(holderClassDoc, writer.configuration()))) { |
|
312 |
//This is an implementation detail that should not be documented. |
|
313 |
return; |
|
314 |
} |
|
315 |
if (overriddenType.asClassDoc().isIncluded() && ! method.isIncluded()) { |
|
316 |
//The class is included but the method is not. That means that it |
|
317 |
//is not visible so don't document this. |
|
318 |
return; |
|
319 |
} |
|
320 |
String label = "doclet.Overrides"; |
|
321 |
int context = LinkInfoImpl.CONTEXT_METHOD_OVERRIDES; |
|
322 |
||
323 |
if (method != null) { |
|
324 |
if(overriddenType.asClassDoc().isAbstract() && method.isAbstract()){ |
|
325 |
//Abstract method is implemented from abstract class, |
|
326 |
//not overridden |
|
327 |
label = "doclet.Specified_By"; |
|
328 |
context = LinkInfoImpl.CONTEXT_METHOD_SPECIFIED_BY; |
|
329 |
} |
|
330 |
String overriddenTypeLink = writer.codeText( |
|
331 |
writer.getLink(new LinkInfoImpl(context, overriddenType))); |
|
332 |
String name = method.name(); |
|
333 |
writer.dt(); |
|
1787
1aa079321cd2
6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents:
10
diff
changeset
|
334 |
writer.strongText(label); |
2216
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
1787
diff
changeset
|
335 |
writer.dtEnd(); |
10 | 336 |
writer.dd(); |
337 |
String methLink = writer.codeText( |
|
338 |
writer.getLink( |
|
339 |
new LinkInfoImpl(LinkInfoImpl.CONTEXT_MEMBER, |
|
340 |
overriddenType.asClassDoc(), |
|
341 |
writer.getAnchor(method), name, false) |
|
342 |
)); |
|
343 |
writer.printText("doclet.in_class", methLink, overriddenTypeLink); |
|
2216
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
1787
diff
changeset
|
344 |
writer.ddEnd(); |
10 | 345 |
} |
346 |
} |
|
347 |
||
348 |
/** |
|
349 |
* Parse the <Code> tag and return the text. |
|
350 |
*/ |
|
351 |
protected String parseCodeTag(String tag){ |
|
352 |
if(tag == null){ |
|
353 |
return ""; |
|
354 |
} |
|
355 |
||
356 |
String lc = tag.toLowerCase(); |
|
357 |
int begin = lc.indexOf("<code>"); |
|
358 |
int end = lc.indexOf("</code>"); |
|
359 |
if(begin == -1 || end == -1 || end <= begin){ |
|
360 |
return tag; |
|
361 |
} else { |
|
362 |
return tag.substring(begin + 6, end); |
|
363 |
} |
|
364 |
} |
|
365 |
||
366 |
protected static void printImplementsInfo(HtmlDocletWriter writer, |
|
367 |
MethodDoc method) { |
|
368 |
if(writer.configuration.nocomment){ |
|
369 |
return; |
|
370 |
} |
|
371 |
ImplementedMethods implementedMethodsFinder = |
|
372 |
new ImplementedMethods(method, writer.configuration); |
|
373 |
MethodDoc[] implementedMethods = implementedMethodsFinder.build(); |
|
374 |
for (int i = 0; i < implementedMethods.length; i++) { |
|
375 |
MethodDoc implementedMeth = implementedMethods[i]; |
|
376 |
Type intfac = implementedMethodsFinder.getMethodHolder(implementedMeth); |
|
377 |
String methlink = ""; |
|
378 |
String intfaclink = writer.codeText( |
|
379 |
writer.getLink(new LinkInfoImpl( |
|
380 |
LinkInfoImpl.CONTEXT_METHOD_SPECIFIED_BY, intfac))); |
|
381 |
writer.dt(); |
|
1787
1aa079321cd2
6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents:
10
diff
changeset
|
382 |
writer.strongText("doclet.Specified_By"); |
2216
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
1787
diff
changeset
|
383 |
writer.dtEnd(); |
10 | 384 |
writer.dd(); |
385 |
methlink = writer.codeText(writer.getDocLink( |
|
386 |
LinkInfoImpl.CONTEXT_MEMBER, implementedMeth, |
|
387 |
implementedMeth.name(), false)); |
|
388 |
writer.printText("doclet.in_interface", methlink, intfaclink); |
|
2216
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
1787
diff
changeset
|
389 |
writer.ddEnd(); |
10 | 390 |
} |
391 |
||
392 |
} |
|
393 |
||
394 |
protected void printReturnType(MethodDoc method) { |
|
395 |
Type type = method.returnType(); |
|
396 |
if (type != null) { |
|
397 |
writer.printLink(new LinkInfoImpl(LinkInfoImpl.CONTEXT_RETURN_TYPE, |
|
398 |
type)); |
|
399 |
print(' '); |
|
400 |
} |
|
401 |
} |
|
402 |
||
403 |
protected void printNavSummaryLink(ClassDoc cd, boolean link) { |
|
404 |
if (link) { |
|
405 |
writer.printHyperLink("", (cd == null)? |
|
406 |
"method_summary": |
|
407 |
"methods_inherited_from_class_" + |
|
408 |
ConfigurationImpl.getInstance().getClassName(cd), |
|
409 |
ConfigurationImpl.getInstance().getText("doclet.navMethod")); |
|
410 |
} else { |
|
411 |
writer.printText("doclet.navMethod"); |
|
412 |
} |
|
413 |
} |
|
414 |
||
415 |
protected void printNavDetailLink(boolean link) { |
|
416 |
if (link) { |
|
417 |
writer.printHyperLink("", "method_detail", |
|
418 |
ConfigurationImpl.getInstance().getText("doclet.navMethod")); |
|
419 |
} else { |
|
420 |
writer.printText("doclet.navMethod"); |
|
421 |
} |
|
422 |
} |
|
423 |
} |