< prev index next >

src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/PackageSummaryBuilder.java

Print this page
rev 58344 : records implementation

@@ -157,10 +157,11 @@
         Content summaryContentTree = packageWriter.getSummaryHeader();
 
         buildInterfaceSummary(summaryContentTree);
         buildClassSummary(summaryContentTree);
         buildEnumSummary(summaryContentTree);
+        buildRecordSummary(summaryContentTree);
         buildExceptionSummary(summaryContentTree);
         buildErrorSummary(summaryContentTree);
         buildAnnotationTypeSummary(summaryContentTree);
 
         packageContentTree.add(packageWriter.getPackageSummary(summaryContentTree));

@@ -213,10 +214,26 @@
             packageWriter.addEnumSummary(enums, summaryContentTree);
         }
     }
 
     /**
+     * Build the summary for the records in this package.
+     *
+     * @param summaryContentTree the summary tree to which the record summary will
+     *                           be added
+     */
+    protected void buildRecordSummary(Content summaryContentTree) {
+        SortedSet<TypeElement> rlist = utils.isSpecified(packageElement)
+                ? utils.getTypeElementsAsSortedSet(utils.getRecords(packageElement))
+                : configuration.typeElementCatalog.records(packageElement);
+        SortedSet<TypeElement> records = utils.filterOutPrivateClasses(rlist, configuration.javafx);
+        if (!records.isEmpty()) {
+            packageWriter.addRecordSummary(records, summaryContentTree);
+        }
+    }
+
+    /**
      * Build the summary for the exceptions in this package.
      *
      * @param summaryContentTree the summary tree to which the exception summary will
      *                           be added
      */
< prev index next >