langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/MemberSummaryBuilder.java
changeset 25454 376a52c9540c
parent 22163 3651128c74eb
equal deleted inserted replaced
25453:be80cf0463b3 25454:376a52c9540c
     1 /*
     1 /*
     2  * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     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
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.  Oracle designates this
     7  * published by the Free Software Foundation.  Oracle designates this
   345                 Tag[] firstSentenceTags = member.firstSentenceTags();
   345                 Tag[] firstSentenceTags = member.firstSentenceTags();
   346                 if (member instanceof MethodDoc && firstSentenceTags.length == 0) {
   346                 if (member instanceof MethodDoc && firstSentenceTags.length == 0) {
   347                     //Inherit comments from overriden or implemented method if
   347                     //Inherit comments from overriden or implemented method if
   348                     //necessary.
   348                     //necessary.
   349                     DocFinder.Output inheritedDoc =
   349                     DocFinder.Output inheritedDoc =
   350                             DocFinder.search(new DocFinder.Input((MethodDoc) member));
   350                             DocFinder.search(configuration, new DocFinder.Input((MethodDoc) member));
   351                     if (inheritedDoc.holder != null
   351                     if (inheritedDoc.holder != null
   352                             && inheritedDoc.holder.firstSentenceTags().length > 0) {
   352                             && inheritedDoc.holder.firstSentenceTags().length > 0) {
   353                         firstSentenceTags = inheritedDoc.holder.firstSentenceTags();
   353                         firstSentenceTags = inheritedDoc.holder.firstSentenceTags();
   354                     }
   354                     }
   355                 }
   355                 }
   382             //add "[GS]ets the value of the property PROPERTY_NAME."
   382             //add "[GS]ets the value of the property PROPERTY_NAME."
   383             if (isSetter) {
   383             if (isSetter) {
   384                 commentTextBuilder.append(
   384                 commentTextBuilder.append(
   385                         MessageFormat.format(
   385                         MessageFormat.format(
   386                                 configuration.getText("doclet.PropertySetterWithName"),
   386                                 configuration.getText("doclet.PropertySetterWithName"),
   387                                 Util.propertyNameFromMethodName(configuration, member.name())));
   387                                 utils.propertyNameFromMethodName(configuration, member.name())));
   388             }
   388             }
   389             if (isGetter) {
   389             if (isGetter) {
   390                 commentTextBuilder.append(
   390                 commentTextBuilder.append(
   391                         MessageFormat.format(
   391                         MessageFormat.format(
   392                                 configuration.getText("doclet.PropertyGetterWithName"),
   392                                 configuration.getText("doclet.PropertyGetterWithName"),
   393                                 Util.propertyNameFromMethodName(configuration, member.name())));
   393                                 utils.propertyNameFromMethodName(configuration, member.name())));
   394             }
   394             }
   395             if (propertyDoc.commentText() != null
   395             if (propertyDoc.commentText() != null
   396                         && !propertyDoc.commentText().isEmpty()) {
   396                         && !propertyDoc.commentText().isEmpty()) {
   397                 commentTextBuilder.append(" \n @propertyDescription ");
   397                 commentTextBuilder.append(" \n @propertyDescription ");
   398             }
   398             }
   475      */
   475      */
   476     private void buildInheritedSummary(MemberSummaryWriter writer,
   476     private void buildInheritedSummary(MemberSummaryWriter writer,
   477             VisibleMemberMap visibleMemberMap, LinkedList<Content> summaryTreeList) {
   477             VisibleMemberMap visibleMemberMap, LinkedList<Content> summaryTreeList) {
   478         for (ClassDoc inhclass : visibleMemberMap.getVisibleClassesList()) {
   478         for (ClassDoc inhclass : visibleMemberMap.getVisibleClassesList()) {
   479             if (!(inhclass.isPublic() ||
   479             if (!(inhclass.isPublic() ||
   480                   Util.isLinkable(inhclass, configuration))) {
   480                   utils.isLinkable(inhclass, configuration))) {
   481                 continue;
   481                 continue;
   482             }
   482             }
   483             if (inhclass == classDoc) {
   483             if (inhclass == classDoc) {
   484                 continue;
   484                 continue;
   485             }
   485             }
   489                 Content inheritedTree = writer.getInheritedSummaryHeader(inhclass);
   489                 Content inheritedTree = writer.getInheritedSummaryHeader(inhclass);
   490                 Content linksTree = writer.getInheritedSummaryLinksTree();
   490                 Content linksTree = writer.getInheritedSummaryLinksTree();
   491                 for (int j = 0; j < inhmembers.size(); ++j) {
   491                 for (int j = 0; j < inhmembers.size(); ++j) {
   492                     writer.addInheritedMemberSummary(
   492                     writer.addInheritedMemberSummary(
   493                             inhclass.isPackagePrivate() &&
   493                             inhclass.isPackagePrivate() &&
   494                             !Util.isLinkable(inhclass, configuration) ?
   494                             !utils.isLinkable(inhclass, configuration) ?
   495                             classDoc : inhclass,
   495                             classDoc : inhclass,
   496                             inhmembers.get(j),
   496                             inhmembers.get(j),
   497                             j == 0,
   497                             j == 0,
   498                             j == inhmembers.size() - 1, linksTree);
   498                             j == inhmembers.size() - 1, linksTree);
   499                 }
   499                 }