Thu, 13 Jan 2011 21:28:38 -0800
7010528: javadoc performance regression
Reviewed-by: jjg
duke@1 | 1 | /* |
ohair@798 | 2 | * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. |
duke@1 | 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
duke@1 | 4 | * |
duke@1 | 5 | * This code is free software; you can redistribute it and/or modify it |
duke@1 | 6 | * under the terms of the GNU General Public License version 2 only, as |
ohair@554 | 7 | * published by the Free Software Foundation. Oracle designates this |
duke@1 | 8 | * particular file as subject to the "Classpath" exception as provided |
ohair@554 | 9 | * by Oracle in the LICENSE file that accompanied this code. |
duke@1 | 10 | * |
duke@1 | 11 | * This code is distributed in the hope that it will be useful, but WITHOUT |
duke@1 | 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
duke@1 | 13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
duke@1 | 14 | * version 2 for more details (a copy is included in the LICENSE file that |
duke@1 | 15 | * accompanied this code). |
duke@1 | 16 | * |
duke@1 | 17 | * You should have received a copy of the GNU General Public License version |
duke@1 | 18 | * 2 along with this work; if not, write to the Free Software Foundation, |
duke@1 | 19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
duke@1 | 20 | * |
ohair@554 | 21 | * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
ohair@554 | 22 | * or visit www.oracle.com if you need additional information or have any |
ohair@554 | 23 | * questions. |
duke@1 | 24 | */ |
duke@1 | 25 | |
duke@1 | 26 | package com.sun.tools.doclets.formats.html; |
duke@1 | 27 | |
bpatel@233 | 28 | import java.io.*; |
bpatel@233 | 29 | |
bpatel@233 | 30 | import com.sun.javadoc.*; |
bpatel@766 | 31 | import com.sun.tools.doclets.formats.html.markup.*; |
duke@1 | 32 | import com.sun.tools.doclets.internal.toolkit.*; |
duke@1 | 33 | import com.sun.tools.doclets.internal.toolkit.util.*; |
duke@1 | 34 | |
duke@1 | 35 | /** |
duke@1 | 36 | * Writes method documentation in HTML format. |
duke@1 | 37 | * |
duke@1 | 38 | * @author Robert Field |
duke@1 | 39 | * @author Atul M Dambalkar |
duke@1 | 40 | * @author Jamie Ho (rewrite) |
bpatel@243 | 41 | * @author Bhavesh Patel (Modified) |
duke@1 | 42 | */ |
duke@1 | 43 | public class MethodWriterImpl extends AbstractExecutableMemberWriter |
duke@1 | 44 | implements MethodWriter, MemberSummaryWriter { |
duke@1 | 45 | |
duke@1 | 46 | /** |
duke@1 | 47 | * Construct a new MethodWriterImpl. |
duke@1 | 48 | * |
duke@1 | 49 | * @param writer the writer for the class that the methods belong to. |
duke@1 | 50 | * @param classDoc the class being documented. |
duke@1 | 51 | */ |
duke@1 | 52 | public MethodWriterImpl(SubWriterHolderWriter writer, ClassDoc classDoc) { |
duke@1 | 53 | super(writer, classDoc); |
duke@1 | 54 | } |
duke@1 | 55 | |
duke@1 | 56 | /** |
duke@1 | 57 | * Construct a new MethodWriterImpl. |
duke@1 | 58 | * |
duke@1 | 59 | * @param writer The writer for the class that the methods belong to. |
duke@1 | 60 | */ |
duke@1 | 61 | public MethodWriterImpl(SubWriterHolderWriter writer) { |
duke@1 | 62 | super(writer); |
duke@1 | 63 | } |
duke@1 | 64 | |
duke@1 | 65 | /** |
bpatel@766 | 66 | * {@inheritDoc} |
duke@1 | 67 | */ |
bpatel@766 | 68 | public Content getMemberSummaryHeader(ClassDoc classDoc, |
bpatel@766 | 69 | Content memberSummaryTree) { |
bpatel@766 | 70 | memberSummaryTree.addContent(HtmlConstants.START_OF_METHOD_SUMMARY); |
bpatel@766 | 71 | Content memberTree = writer.getMemberTreeHeader(); |
bpatel@766 | 72 | writer.addSummaryHeader(this, classDoc, memberTree); |
bpatel@766 | 73 | return memberTree; |
duke@1 | 74 | } |
duke@1 | 75 | |
duke@1 | 76 | /** |
duke@1 | 77 | * {@inheritDoc} |
duke@1 | 78 | */ |
bpatel@766 | 79 | public Content getMethodDetailsTreeHeader(ClassDoc classDoc, |
bpatel@766 | 80 | Content memberDetailsTree) { |
bpatel@766 | 81 | memberDetailsTree.addContent(HtmlConstants.START_OF_METHOD_DETAILS); |
bpatel@766 | 82 | Content methodDetailsTree = writer.getMemberTreeHeader(); |
bpatel@766 | 83 | methodDetailsTree.addContent(writer.getMarkerAnchor("method_detail")); |
bpatel@766 | 84 | Content heading = HtmlTree.HEADING(HtmlConstants.DETAILS_HEADING, |
bpatel@766 | 85 | writer.methodDetailsLabel); |
bpatel@766 | 86 | methodDetailsTree.addContent(heading); |
bpatel@766 | 87 | return methodDetailsTree; |
duke@1 | 88 | } |
duke@1 | 89 | |
duke@1 | 90 | /** |
bpatel@766 | 91 | * {@inheritDoc} |
duke@1 | 92 | */ |
bpatel@766 | 93 | public Content getMethodDocTreeHeader(MethodDoc method, |
bpatel@766 | 94 | Content methodDetailsTree) { |
bpatel@766 | 95 | String erasureAnchor; |
bpatel@766 | 96 | if ((erasureAnchor = getErasureAnchor(method)) != null) { |
bpatel@766 | 97 | methodDetailsTree.addContent(writer.getMarkerAnchor((erasureAnchor))); |
bpatel@766 | 98 | } |
bpatel@766 | 99 | methodDetailsTree.addContent( |
bpatel@766 | 100 | writer.getMarkerAnchor(writer.getAnchor(method))); |
bpatel@766 | 101 | Content methodDocTree = writer.getMemberTreeHeader(); |
bpatel@766 | 102 | Content heading = new HtmlTree(HtmlConstants.MEMBER_HEADING); |
bpatel@766 | 103 | heading.addContent(method.name()); |
bpatel@766 | 104 | methodDocTree.addContent(heading); |
bpatel@766 | 105 | return methodDocTree; |
duke@1 | 106 | } |
duke@1 | 107 | |
duke@1 | 108 | /** |
bpatel@766 | 109 | * Get the signature for the given method. |
duke@1 | 110 | * |
bpatel@766 | 111 | * @param method the method being documented. |
bpatel@766 | 112 | * @return a content object for the signature |
duke@1 | 113 | */ |
bpatel@766 | 114 | public Content getSignature(MethodDoc method) { |
bpatel@766 | 115 | writer.displayLength = 0; |
bpatel@766 | 116 | Content pre = new HtmlTree(HtmlTag.PRE); |
bpatel@766 | 117 | writer.addAnnotationInfo(method, pre); |
bpatel@766 | 118 | addModifiers(method, pre); |
bpatel@766 | 119 | addTypeParameters(method, pre); |
bpatel@766 | 120 | addReturnType(method, pre); |
bpatel@766 | 121 | if (configuration().linksource) { |
bpatel@766 | 122 | Content methodName = new StringContent(method.name()); |
bpatel@766 | 123 | writer.addSrcLink(method, methodName, pre); |
bpatel@766 | 124 | } else { |
bpatel@766 | 125 | addName(method.name(), pre); |
bpatel@766 | 126 | } |
bpatel@766 | 127 | addParameters(method, pre); |
bpatel@766 | 128 | addExceptions(method, pre); |
bpatel@766 | 129 | return pre; |
duke@1 | 130 | } |
duke@1 | 131 | |
duke@1 | 132 | /** |
bpatel@766 | 133 | * {@inheritDoc} |
duke@1 | 134 | */ |
bpatel@766 | 135 | public void addDeprecated(MethodDoc method, Content methodDocTree) { |
bpatel@766 | 136 | addDeprecatedInfo(method, methodDocTree); |
duke@1 | 137 | } |
duke@1 | 138 | |
duke@1 | 139 | /** |
bpatel@766 | 140 | * {@inheritDoc} |
duke@1 | 141 | */ |
bpatel@766 | 142 | public void addComments(Type holder, MethodDoc method, Content methodDocTree) { |
duke@1 | 143 | ClassDoc holderClassDoc = holder.asClassDoc(); |
duke@1 | 144 | if (method.inlineTags().length > 0) { |
duke@1 | 145 | if (holder.asClassDoc().equals(classdoc) || |
bpatel@766 | 146 | (! (holderClassDoc.isPublic() || |
duke@1 | 147 | Util.isLinkable(holderClassDoc, configuration())))) { |
bpatel@766 | 148 | writer.addInlineComment(method, methodDocTree); |
duke@1 | 149 | } else { |
bpatel@766 | 150 | Content link = new RawHtml( |
bpatel@766 | 151 | writer.getDocLink(LinkInfoImpl.CONTEXT_METHOD_DOC_COPY, |
duke@1 | 152 | holder.asClassDoc(), method, |
duke@1 | 153 | holder.asClassDoc().isIncluded() ? |
duke@1 | 154 | holder.typeName() : holder.qualifiedTypeName(), |
bpatel@766 | 155 | false)); |
bpatel@766 | 156 | Content codelLink = HtmlTree.CODE(link); |
bpatel@766 | 157 | Content strong = HtmlTree.STRONG(holder.asClassDoc().isClass()? |
bpatel@766 | 158 | writer.descfrmClassLabel : writer.descfrmInterfaceLabel); |
bpatel@766 | 159 | strong.addContent(writer.getSpace()); |
bpatel@766 | 160 | strong.addContent(codelLink); |
bpatel@766 | 161 | methodDocTree.addContent(HtmlTree.DIV(HtmlStyle.block, strong)); |
bpatel@766 | 162 | writer.addInlineComment(method, methodDocTree); |
duke@1 | 163 | } |
duke@1 | 164 | } |
duke@1 | 165 | } |
duke@1 | 166 | |
duke@1 | 167 | /** |
bpatel@766 | 168 | * {@inheritDoc} |
duke@1 | 169 | */ |
bpatel@766 | 170 | public void addTags(MethodDoc method, Content methodDocTree) { |
bpatel@766 | 171 | writer.addTagsInfo(method, methodDocTree); |
duke@1 | 172 | } |
duke@1 | 173 | |
duke@1 | 174 | /** |
bpatel@766 | 175 | * {@inheritDoc} |
duke@1 | 176 | */ |
bpatel@766 | 177 | public Content getMethodDetails(Content methodDetailsTree) { |
bpatel@766 | 178 | return getMemberTree(methodDetailsTree); |
duke@1 | 179 | } |
duke@1 | 180 | |
duke@1 | 181 | /** |
bpatel@766 | 182 | * {@inheritDoc} |
duke@1 | 183 | */ |
bpatel@766 | 184 | public Content getMethodDoc(Content methodDocTree, |
bpatel@766 | 185 | boolean isLastContent) { |
bpatel@766 | 186 | return getMemberTree(methodDocTree, isLastContent); |
duke@1 | 187 | } |
duke@1 | 188 | |
duke@1 | 189 | /** |
duke@1 | 190 | * Close the writer. |
duke@1 | 191 | */ |
duke@1 | 192 | public void close() throws IOException { |
duke@1 | 193 | writer.close(); |
duke@1 | 194 | } |
duke@1 | 195 | |
duke@1 | 196 | public int getMemberKind() { |
duke@1 | 197 | return VisibleMemberMap.METHODS; |
duke@1 | 198 | } |
duke@1 | 199 | |
bpatel@766 | 200 | /** |
bpatel@766 | 201 | * {@inheritDoc} |
bpatel@766 | 202 | */ |
bpatel@766 | 203 | public void addSummaryLabel(Content memberTree) { |
bpatel@766 | 204 | Content label = HtmlTree.HEADING(HtmlConstants.SUMMARY_HEADING, |
bpatel@766 | 205 | writer.getResource("doclet.Method_Summary")); |
bpatel@766 | 206 | memberTree.addContent(label); |
bpatel@243 | 207 | } |
bpatel@243 | 208 | |
bpatel@766 | 209 | /** |
bpatel@766 | 210 | * {@inheritDoc} |
bpatel@766 | 211 | */ |
bpatel@766 | 212 | public String getTableSummary() { |
bpatel@766 | 213 | return configuration().getText("doclet.Member_Table_Summary", |
bpatel@243 | 214 | configuration().getText("doclet.Method_Summary"), |
bpatel@766 | 215 | configuration().getText("doclet.methods")); |
bpatel@243 | 216 | } |
bpatel@243 | 217 | |
bpatel@766 | 218 | /** |
bpatel@766 | 219 | * {@inheritDoc} |
bpatel@766 | 220 | */ |
bpatel@766 | 221 | public String getCaption() { |
bpatel@766 | 222 | return configuration().getText("doclet.Methods"); |
bpatel@766 | 223 | } |
bpatel@766 | 224 | |
bpatel@766 | 225 | /** |
bpatel@766 | 226 | * {@inheritDoc} |
bpatel@766 | 227 | */ |
bpatel@766 | 228 | public String[] getSummaryTableHeader(ProgramElementDoc member) { |
bpatel@243 | 229 | String[] header = new String[] { |
bpatel@243 | 230 | writer.getModifierTypeHeader(), |
bpatel@243 | 231 | configuration().getText("doclet.0_and_1", |
bpatel@243 | 232 | configuration().getText("doclet.Method"), |
bpatel@243 | 233 | configuration().getText("doclet.Description")) |
bpatel@243 | 234 | }; |
bpatel@766 | 235 | return header; |
duke@1 | 236 | } |
duke@1 | 237 | |
bpatel@766 | 238 | /** |
bpatel@766 | 239 | * {@inheritDoc} |
bpatel@766 | 240 | */ |
bpatel@766 | 241 | public void addSummaryAnchor(ClassDoc cd, Content memberTree) { |
bpatel@766 | 242 | memberTree.addContent(writer.getMarkerAnchor("method_summary")); |
duke@1 | 243 | } |
duke@1 | 244 | |
bpatel@766 | 245 | /** |
bpatel@766 | 246 | * {@inheritDoc} |
bpatel@766 | 247 | */ |
bpatel@766 | 248 | public void addInheritedSummaryAnchor(ClassDoc cd, Content inheritedTree) { |
bpatel@766 | 249 | inheritedTree.addContent(writer.getMarkerAnchor( |
bpatel@766 | 250 | "methods_inherited_from_class_" + |
bpatel@766 | 251 | configuration().getClassName(cd))); |
duke@1 | 252 | } |
duke@1 | 253 | |
bpatel@766 | 254 | /** |
bpatel@766 | 255 | * {@inheritDoc} |
bpatel@766 | 256 | */ |
bpatel@766 | 257 | public void addInheritedSummaryLabel(ClassDoc cd, Content inheritedTree) { |
bpatel@766 | 258 | Content classLink = new RawHtml(writer.getPreQualifiedClassLink( |
bpatel@766 | 259 | LinkInfoImpl.CONTEXT_MEMBER, cd, false)); |
bpatel@766 | 260 | Content label = new StringContent(cd.isClass() ? |
bpatel@766 | 261 | configuration().getText("doclet.Methods_Inherited_From_Class") : |
bpatel@766 | 262 | configuration().getText("doclet.Methods_Inherited_From_Interface")); |
bpatel@766 | 263 | Content labelHeading = HtmlTree.HEADING(HtmlConstants.INHERITED_SUMMARY_HEADING, |
bpatel@766 | 264 | label); |
bpatel@766 | 265 | labelHeading.addContent(writer.getSpace()); |
bpatel@766 | 266 | labelHeading.addContent(classLink); |
bpatel@766 | 267 | inheritedTree.addContent(labelHeading); |
duke@1 | 268 | } |
duke@1 | 269 | |
bpatel@766 | 270 | /** |
bpatel@766 | 271 | * {@inheritDoc} |
bpatel@766 | 272 | */ |
bpatel@766 | 273 | protected void addSummaryType(ProgramElementDoc member, Content tdSummaryType) { |
duke@1 | 274 | MethodDoc meth = (MethodDoc)member; |
bpatel@766 | 275 | addModifierAndType(meth, meth.returnType(), tdSummaryType); |
duke@1 | 276 | } |
duke@1 | 277 | |
bpatel@766 | 278 | /** |
bpatel@766 | 279 | * {@inheritDoc} |
bpatel@766 | 280 | */ |
bpatel@766 | 281 | protected static void addOverridden(HtmlDocletWriter writer, |
bpatel@766 | 282 | Type overriddenType, MethodDoc method, Content dl) { |
duke@1 | 283 | if(writer.configuration.nocomment){ |
duke@1 | 284 | return; |
duke@1 | 285 | } |
duke@1 | 286 | ClassDoc holderClassDoc = overriddenType.asClassDoc(); |
duke@1 | 287 | if (! (holderClassDoc.isPublic() || |
duke@1 | 288 | Util.isLinkable(holderClassDoc, writer.configuration()))) { |
duke@1 | 289 | //This is an implementation detail that should not be documented. |
duke@1 | 290 | return; |
duke@1 | 291 | } |
duke@1 | 292 | if (overriddenType.asClassDoc().isIncluded() && ! method.isIncluded()) { |
duke@1 | 293 | //The class is included but the method is not. That means that it |
duke@1 | 294 | //is not visible so don't document this. |
duke@1 | 295 | return; |
duke@1 | 296 | } |
bpatel@766 | 297 | Content label = writer.overridesLabel; |
duke@1 | 298 | int context = LinkInfoImpl.CONTEXT_METHOD_OVERRIDES; |
duke@1 | 299 | |
duke@1 | 300 | if (method != null) { |
duke@1 | 301 | if(overriddenType.asClassDoc().isAbstract() && method.isAbstract()){ |
duke@1 | 302 | //Abstract method is implemented from abstract class, |
duke@1 | 303 | //not overridden |
bpatel@766 | 304 | label = writer.specifiedByLabel; |
duke@1 | 305 | context = LinkInfoImpl.CONTEXT_METHOD_SPECIFIED_BY; |
duke@1 | 306 | } |
bpatel@766 | 307 | Content dt = HtmlTree.DT(HtmlTree.STRONG(label)); |
bpatel@766 | 308 | dl.addContent(dt); |
bpatel@766 | 309 | Content overriddenTypeLink = new RawHtml( |
bpatel@766 | 310 | writer.getLink(new LinkInfoImpl(context, overriddenType))); |
bpatel@766 | 311 | Content codeOverridenTypeLink = HtmlTree.CODE(overriddenTypeLink); |
duke@1 | 312 | String name = method.name(); |
bpatel@766 | 313 | Content methlink = new RawHtml(writer.getLink( |
duke@1 | 314 | new LinkInfoImpl(LinkInfoImpl.CONTEXT_MEMBER, |
bpatel@766 | 315 | overriddenType.asClassDoc(), |
bpatel@766 | 316 | writer.getAnchor(method), name, false))); |
bpatel@766 | 317 | Content codeMethLink = HtmlTree.CODE(methlink); |
bpatel@766 | 318 | Content dd = HtmlTree.DD(codeMethLink); |
bpatel@766 | 319 | dd.addContent(writer.getSpace()); |
bpatel@766 | 320 | dd.addContent(writer.getResource("doclet.in_class")); |
bpatel@766 | 321 | dd.addContent(writer.getSpace()); |
bpatel@766 | 322 | dd.addContent(codeOverridenTypeLink); |
bpatel@766 | 323 | dl.addContent(dd); |
duke@1 | 324 | } |
duke@1 | 325 | } |
duke@1 | 326 | |
duke@1 | 327 | /** |
duke@1 | 328 | * Parse the <Code> tag and return the text. |
duke@1 | 329 | */ |
duke@1 | 330 | protected String parseCodeTag(String tag){ |
duke@1 | 331 | if(tag == null){ |
duke@1 | 332 | return ""; |
duke@1 | 333 | } |
duke@1 | 334 | |
duke@1 | 335 | String lc = tag.toLowerCase(); |
duke@1 | 336 | int begin = lc.indexOf("<code>"); |
duke@1 | 337 | int end = lc.indexOf("</code>"); |
duke@1 | 338 | if(begin == -1 || end == -1 || end <= begin){ |
duke@1 | 339 | return tag; |
duke@1 | 340 | } else { |
duke@1 | 341 | return tag.substring(begin + 6, end); |
duke@1 | 342 | } |
duke@1 | 343 | } |
duke@1 | 344 | |
bpatel@766 | 345 | /** |
bpatel@766 | 346 | * {@inheritDoc} |
bpatel@766 | 347 | */ |
bpatel@766 | 348 | protected static void addImplementsInfo(HtmlDocletWriter writer, |
bpatel@766 | 349 | MethodDoc method, Content dl) { |
duke@1 | 350 | if(writer.configuration.nocomment){ |
duke@1 | 351 | return; |
duke@1 | 352 | } |
duke@1 | 353 | ImplementedMethods implementedMethodsFinder = |
bpatel@766 | 354 | new ImplementedMethods(method, writer.configuration); |
duke@1 | 355 | MethodDoc[] implementedMethods = implementedMethodsFinder.build(); |
duke@1 | 356 | for (int i = 0; i < implementedMethods.length; i++) { |
duke@1 | 357 | MethodDoc implementedMeth = implementedMethods[i]; |
duke@1 | 358 | Type intfac = implementedMethodsFinder.getMethodHolder(implementedMeth); |
bpatel@766 | 359 | Content intfaclink = new RawHtml(writer.getLink(new LinkInfoImpl( |
duke@1 | 360 | LinkInfoImpl.CONTEXT_METHOD_SPECIFIED_BY, intfac))); |
bpatel@766 | 361 | Content codeIntfacLink = HtmlTree.CODE(intfaclink); |
bpatel@766 | 362 | Content dt = HtmlTree.DT(HtmlTree.STRONG(writer.specifiedByLabel)); |
bpatel@766 | 363 | dl.addContent(dt); |
bpatel@766 | 364 | Content methlink = new RawHtml(writer.getDocLink( |
bpatel@766 | 365 | LinkInfoImpl.CONTEXT_MEMBER, implementedMeth, |
bpatel@766 | 366 | implementedMeth.name(), false)); |
bpatel@766 | 367 | Content codeMethLink = HtmlTree.CODE(methlink); |
bpatel@766 | 368 | Content dd = HtmlTree.DD(codeMethLink); |
bpatel@766 | 369 | dd.addContent(writer.getSpace()); |
bpatel@766 | 370 | dd.addContent(writer.getResource("doclet.in_interface")); |
bpatel@766 | 371 | dd.addContent(writer.getSpace()); |
bpatel@766 | 372 | dd.addContent(codeIntfacLink); |
bpatel@766 | 373 | dl.addContent(dd); |
duke@1 | 374 | } |
duke@1 | 375 | } |
duke@1 | 376 | |
bpatel@766 | 377 | /** |
bpatel@766 | 378 | * Add the return type. |
bpatel@766 | 379 | * |
bpatel@766 | 380 | * @param method the method being documented. |
bpatel@766 | 381 | * @param htmltree the content tree to which the return type will be added |
bpatel@766 | 382 | */ |
bpatel@766 | 383 | protected void addReturnType(MethodDoc method, Content htmltree) { |
bpatel@766 | 384 | Type type = method.returnType(); |
bpatel@766 | 385 | if (type != null) { |
bpatel@766 | 386 | Content linkContent = new RawHtml(writer.getLink( |
bpatel@766 | 387 | new LinkInfoImpl(LinkInfoImpl.CONTEXT_RETURN_TYPE, type))); |
bpatel@766 | 388 | htmltree.addContent(linkContent); |
bpatel@766 | 389 | htmltree.addContent(writer.getSpace()); |
duke@1 | 390 | } |
duke@1 | 391 | } |
duke@1 | 392 | |
bpatel@766 | 393 | /** |
bpatel@766 | 394 | * {@inheritDoc} |
bpatel@766 | 395 | */ |
bpatel@766 | 396 | protected Content getNavSummaryLink(ClassDoc cd, boolean link) { |
duke@1 | 397 | if (link) { |
bpatel@766 | 398 | return writer.getHyperLink("", (cd == null)? |
bpatel@766 | 399 | "method_summary": |
bpatel@766 | 400 | "methods_inherited_from_class_" + |
bpatel@766 | 401 | configuration().getClassName(cd), |
bpatel@766 | 402 | writer.getResource("doclet.navMethod")); |
duke@1 | 403 | } else { |
bpatel@766 | 404 | return writer.getResource("doclet.navMethod"); |
bpatel@766 | 405 | } |
bpatel@766 | 406 | } |
bpatel@766 | 407 | |
bpatel@766 | 408 | /** |
bpatel@766 | 409 | * {@inheritDoc} |
bpatel@766 | 410 | */ |
bpatel@766 | 411 | protected void addNavDetailLink(boolean link, Content liNav) { |
bpatel@766 | 412 | if (link) { |
bpatel@766 | 413 | liNav.addContent(writer.getHyperLink("", "method_detail", |
bpatel@766 | 414 | writer.getResource("doclet.navMethod"))); |
bpatel@766 | 415 | } else { |
bpatel@766 | 416 | liNav.addContent(writer.getResource("doclet.navMethod")); |
duke@1 | 417 | } |
duke@1 | 418 | } |
duke@1 | 419 | } |