< prev index next >

src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/MethodWriterImpl.java

Print this page

        

*** 34,44 **** import javax.lang.model.type.TypeMirror; import jdk.javadoc.internal.doclets.formats.html.markup.ContentBuilder; import jdk.javadoc.internal.doclets.formats.html.markup.Entity; import jdk.javadoc.internal.doclets.formats.html.markup.HtmlStyle; - import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTag; import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTree; import jdk.javadoc.internal.doclets.formats.html.markup.StringContent; import jdk.javadoc.internal.doclets.formats.html.markup.Table; import jdk.javadoc.internal.doclets.formats.html.markup.TableHeader; import jdk.javadoc.internal.doclets.toolkit.Content; --- 34,43 ----
*** 138,164 **** * @param method the method being documented. * @return a content object for the signature */ @Override public Content getSignature(ExecutableElement method) { ! HtmlTree pre = new HtmlTree(HtmlTag.PRE); ! pre.setStyle(HtmlStyle.methodSignature); ! writer.addAnnotationInfo(method, pre); ! int annotationLength = pre.charCount(); ! addModifiers(method, pre); ! addTypeParameters(method, pre); ! addReturnType(method, pre); ! if (configuration.linksource) { ! Content methodName = new StringContent(name(method)); ! writer.addSrcLink(method, methodName, pre); ! } else { ! addName(name(method), pre); ! } ! int indent = pre.charCount() - annotationLength; ! addParameters(method, pre, indent); ! addExceptions(method, pre, indent); ! return pre; } /** * {@inheritDoc} */ --- 137,152 ---- * @param method the method being documented. * @return a content object for the signature */ @Override public Content getSignature(ExecutableElement method) { ! return new MemberSignature(method) ! .addTypeParameters(getTypeParameters(method)) ! .addReturnType(getReturnType(method)) ! .addParameters(getParameters(method, true)) ! .addExceptions(getExceptions(method)) ! .toContent(); } /** * {@inheritDoc} */
*** 397,419 **** dl.add(dd); } } /** ! * Add the return type. * * @param method the method being documented. ! * @param htmltree the content tree to which the return type will be added */ ! protected void addReturnType(ExecutableElement method, Content htmltree) { TypeMirror type = utils.getReturnType(method); if (type != null) { ! Content linkContent = writer.getLink( ! new LinkInfoImpl(configuration, LinkInfoImpl.Kind.RETURN_TYPE, type)); ! htmltree.add(linkContent); ! htmltree.add(Entity.NO_BREAK_SPACE); } } @Override public Content getMemberTreeHeader(){ return writer.getMemberTreeHeader(); --- 385,405 ---- dl.add(dd); } } /** ! * Get the return type for the given method. * * @param method the method being documented. ! * @return content containing the return type */ ! protected Content getReturnType(ExecutableElement method) { TypeMirror type = utils.getReturnType(method); if (type != null) { ! return writer.getLink(new LinkInfoImpl(configuration, LinkInfoImpl.Kind.RETURN_TYPE, type)); } + return new ContentBuilder(); } @Override public Content getMemberTreeHeader(){ return writer.getMemberTreeHeader();
< prev index next >