< prev index next >

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

Print this page


   1 /*
   2  * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
   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
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  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  *
  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


 273         memberTree.addContent(writer.getMarkerAnchor(
 274                 SectionName.METHOD_SUMMARY));
 275     }
 276 
 277     /**
 278      * {@inheritDoc}
 279      */
 280     @Override
 281     public void addInheritedSummaryAnchor(TypeElement typeElement, Content inheritedTree) {
 282         inheritedTree.addContent(writer.getMarkerAnchor(
 283                 SectionName.METHODS_INHERITANCE, configuration.getClassName(typeElement)));
 284     }
 285 
 286     /**
 287      * {@inheritDoc}
 288      */
 289     @Override
 290     public void addInheritedSummaryLabel(TypeElement typeElement, Content inheritedTree) {
 291         Content classLink = writer.getPreQualifiedClassLink(
 292                 LinkInfoImpl.Kind.MEMBER, typeElement, false);
 293         Content label = new StringContent(utils.isClass(typeElement)






 294                 ? configuration.getText("doclet.Methods_Inherited_From_Class")
 295                 : configuration.getText("doclet.Methods_Inherited_From_Interface"));

 296         Content labelHeading = HtmlTree.HEADING(HtmlConstants.INHERITED_SUMMARY_HEADING,
 297                 label);
 298         labelHeading.addContent(Contents.SPACE);
 299         labelHeading.addContent(classLink);
 300         inheritedTree.addContent(labelHeading);
 301     }
 302 
 303     /**
 304      * {@inheritDoc}
 305      */
 306     @Override
 307     protected void addSummaryType(Element member, Content tdSummaryType) {
 308         ExecutableElement meth = (ExecutableElement)member;
 309         addModifierAndType(meth, utils.getReturnType(meth), tdSummaryType);
 310     }
 311 
 312     /**
 313      * {@inheritDoc}
 314      */
 315     protected static void addOverridden(HtmlDocletWriter writer,


   1 /*
   2  * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
   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
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  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  *
  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


 273         memberTree.addContent(writer.getMarkerAnchor(
 274                 SectionName.METHOD_SUMMARY));
 275     }
 276 
 277     /**
 278      * {@inheritDoc}
 279      */
 280     @Override
 281     public void addInheritedSummaryAnchor(TypeElement typeElement, Content inheritedTree) {
 282         inheritedTree.addContent(writer.getMarkerAnchor(
 283                 SectionName.METHODS_INHERITANCE, configuration.getClassName(typeElement)));
 284     }
 285 
 286     /**
 287      * {@inheritDoc}
 288      */
 289     @Override
 290     public void addInheritedSummaryLabel(TypeElement typeElement, Content inheritedTree) {
 291         Content classLink = writer.getPreQualifiedClassLink(
 292                 LinkInfoImpl.Kind.MEMBER, typeElement, false);
 293         Content label;
 294         if (configuration.summarizeOverriddenMethods) {
 295             label = new StringContent(utils.isClass(typeElement)
 296                     ? configuration.getText("doclet.Methods_Declared_In_Class")
 297                     : configuration.getText("doclet.Methods_Declared_In_Interface"));
 298         } else {
 299             label = new StringContent(utils.isClass(typeElement)
 300                     ? configuration.getText("doclet.Methods_Inherited_From_Class")
 301                     : configuration.getText("doclet.Methods_Inherited_From_Interface"));
 302         }
 303         Content labelHeading = HtmlTree.HEADING(HtmlConstants.INHERITED_SUMMARY_HEADING,
 304                 label);
 305         labelHeading.addContent(Contents.SPACE);
 306         labelHeading.addContent(classLink);
 307         inheritedTree.addContent(labelHeading);
 308     }
 309 
 310     /**
 311      * {@inheritDoc}
 312      */
 313     @Override
 314     protected void addSummaryType(Element member, Content tdSummaryType) {
 315         ExecutableElement meth = (ExecutableElement)member;
 316         addModifierAndType(meth, utils.getReturnType(meth), tdSummaryType);
 317     }
 318 
 319     /**
 320      * {@inheritDoc}
 321      */
 322     protected static void addOverridden(HtmlDocletWriter writer,


< prev index next >