< prev index next >

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

Print this page




 149         buildClassSummary(summaryContentTree);
 150         buildEnumSummary(summaryContentTree);
 151         buildRecordSummary(summaryContentTree);
 152         buildExceptionSummary(summaryContentTree);
 153         buildErrorSummary(summaryContentTree);
 154         buildAnnotationTypeSummary(summaryContentTree);
 155 
 156         packageContentTree.add(packageWriter.getPackageSummary(summaryContentTree));
 157     }
 158 
 159     /**
 160      * Build the summary for the interfaces in this package.
 161      *
 162      * @param summaryContentTree the summary tree to which the interface summary
 163      *                           will be added
 164      */
 165     protected void buildInterfaceSummary(Content summaryContentTree) {
 166         SortedSet<TypeElement> ilist = utils.isSpecified(packageElement)
 167                         ? utils.getTypeElementsAsSortedSet(utils.getInterfaces(packageElement))
 168                         : configuration.typeElementCatalog.interfaces(packageElement);
 169         SortedSet<TypeElement> interfaces = utils.filterOutPrivateClasses(ilist, configuration.javafx);
 170         if (!interfaces.isEmpty()) {
 171             packageWriter.addInterfaceSummary(interfaces, summaryContentTree);
 172         }
 173     }
 174 
 175     /**
 176      * Build the summary for the classes in this package.
 177      *
 178      * @param summaryContentTree the summary tree to which the class summary will
 179      *                           be added
 180      */
 181     protected void buildClassSummary(Content summaryContentTree) {
 182         SortedSet<TypeElement> clist = utils.isSpecified(packageElement)
 183             ? utils.getTypeElementsAsSortedSet(utils.getOrdinaryClasses(packageElement))
 184             : configuration.typeElementCatalog.ordinaryClasses(packageElement);
 185         SortedSet<TypeElement> classes = utils.filterOutPrivateClasses(clist, configuration.javafx);
 186         if (!classes.isEmpty()) {
 187             packageWriter.addClassSummary(classes, summaryContentTree);
 188         }
 189     }
 190 
 191     /**
 192      * Build the summary for the enums in this package.
 193      *
 194      * @param summaryContentTree the summary tree to which the enum summary will
 195      *                           be added
 196      */
 197     protected void buildEnumSummary(Content summaryContentTree) {
 198         SortedSet<TypeElement> elist = utils.isSpecified(packageElement)
 199             ? utils.getTypeElementsAsSortedSet(utils.getEnums(packageElement))
 200             : configuration.typeElementCatalog.enums(packageElement);
 201         SortedSet<TypeElement> enums = utils.filterOutPrivateClasses(elist, configuration.javafx);
 202         if (!enums.isEmpty()) {
 203             packageWriter.addEnumSummary(enums, summaryContentTree);
 204         }
 205     }
 206 
 207     /**
 208      * Build the summary for the records in this package.
 209      *
 210      * @param summaryContentTree the summary tree to which the record summary will
 211      *                           be added
 212      */
 213     protected void buildRecordSummary(Content summaryContentTree) {
 214         SortedSet<TypeElement> rlist = utils.isSpecified(packageElement)
 215                 ? utils.getTypeElementsAsSortedSet(utils.getRecords(packageElement))
 216                 : configuration.typeElementCatalog.records(packageElement);
 217         SortedSet<TypeElement> records = utils.filterOutPrivateClasses(rlist, configuration.javafx);
 218         if (!records.isEmpty()) {
 219             packageWriter.addRecordSummary(records, summaryContentTree);
 220         }
 221     }
 222 
 223     /**
 224      * Build the summary for the exceptions in this package.
 225      *
 226      * @param summaryContentTree the summary tree to which the exception summary will
 227      *                           be added
 228      */
 229     protected void buildExceptionSummary(Content summaryContentTree) {
 230         Set<TypeElement> iexceptions =
 231             utils.isSpecified(packageElement)
 232                 ? utils.getTypeElementsAsSortedSet(utils.getExceptions(packageElement))
 233                 : configuration.typeElementCatalog.exceptions(packageElement);
 234         SortedSet<TypeElement> exceptions = utils.filterOutPrivateClasses(iexceptions,
 235                 configuration.javafx);
 236         if (!exceptions.isEmpty()) {
 237             packageWriter.addExceptionSummary(exceptions, summaryContentTree);
 238         }
 239     }
 240 
 241     /**
 242      * Build the summary for the errors in this package.
 243      *
 244      * @param summaryContentTree the summary tree to which the error summary will
 245      *                           be added
 246      */
 247     protected void buildErrorSummary(Content summaryContentTree) {
 248         Set<TypeElement> ierrors =
 249             utils.isSpecified(packageElement)
 250                 ? utils.getTypeElementsAsSortedSet(utils.getErrors(packageElement))
 251                 : configuration.typeElementCatalog.errors(packageElement);
 252         SortedSet<TypeElement> errors = utils.filterOutPrivateClasses(ierrors, configuration.javafx);
 253         if (!errors.isEmpty()) {
 254             packageWriter.addErrorSummary(errors, summaryContentTree);
 255         }
 256     }
 257 
 258     /**
 259      * Build the summary for the annotation type in this package.
 260      *
 261      * @param summaryContentTree the summary tree to which the annotation type
 262      *                           summary will be added
 263      */
 264     protected void buildAnnotationTypeSummary(Content summaryContentTree) {
 265         SortedSet<TypeElement> iannotationTypes =
 266             utils.isSpecified(packageElement)
 267                 ? utils.getTypeElementsAsSortedSet(utils.getAnnotationTypes(packageElement))
 268                 : configuration.typeElementCatalog.annotationTypes(packageElement);
 269         SortedSet<TypeElement> annotationTypes = utils.filterOutPrivateClasses(iannotationTypes,
 270                 configuration.javafx);
 271         if (!annotationTypes.isEmpty()) {
 272             packageWriter.addAnnotationTypeSummary(annotationTypes, summaryContentTree);
 273         }
 274     }
 275 
 276     /**
 277      * Build the description of the summary.
 278      *
 279      * @param packageContentTree the tree to which the package description will
 280      *                           be added
 281      */
 282     protected void buildPackageDescription(Content packageContentTree) {
 283         if (configuration.nocomment) {
 284             return;
 285         }
 286         packageWriter.addPackageDescription(packageContentTree);
 287     }
 288 
 289     /**
 290      * Build the tags of the summary.
 291      *
 292      * @param packageContentTree the tree to which the package tags will be added
 293      */
 294     protected void buildPackageTags(Content packageContentTree) {
 295         if (configuration.nocomment) {
 296             return;
 297         }
 298         packageWriter.addPackageTags(packageContentTree);
 299     }
 300 }


 149         buildClassSummary(summaryContentTree);
 150         buildEnumSummary(summaryContentTree);
 151         buildRecordSummary(summaryContentTree);
 152         buildExceptionSummary(summaryContentTree);
 153         buildErrorSummary(summaryContentTree);
 154         buildAnnotationTypeSummary(summaryContentTree);
 155 
 156         packageContentTree.add(packageWriter.getPackageSummary(summaryContentTree));
 157     }
 158 
 159     /**
 160      * Build the summary for the interfaces in this package.
 161      *
 162      * @param summaryContentTree the summary tree to which the interface summary
 163      *                           will be added
 164      */
 165     protected void buildInterfaceSummary(Content summaryContentTree) {
 166         SortedSet<TypeElement> ilist = utils.isSpecified(packageElement)
 167                         ? utils.getTypeElementsAsSortedSet(utils.getInterfaces(packageElement))
 168                         : configuration.typeElementCatalog.interfaces(packageElement);
 169         SortedSet<TypeElement> interfaces = utils.filterOutPrivateClasses(ilist, options.javafx);
 170         if (!interfaces.isEmpty()) {
 171             packageWriter.addInterfaceSummary(interfaces, summaryContentTree);
 172         }
 173     }
 174 
 175     /**
 176      * Build the summary for the classes in this package.
 177      *
 178      * @param summaryContentTree the summary tree to which the class summary will
 179      *                           be added
 180      */
 181     protected void buildClassSummary(Content summaryContentTree) {
 182         SortedSet<TypeElement> clist = utils.isSpecified(packageElement)
 183             ? utils.getTypeElementsAsSortedSet(utils.getOrdinaryClasses(packageElement))
 184             : configuration.typeElementCatalog.ordinaryClasses(packageElement);
 185         SortedSet<TypeElement> classes = utils.filterOutPrivateClasses(clist, options.javafx);
 186         if (!classes.isEmpty()) {
 187             packageWriter.addClassSummary(classes, summaryContentTree);
 188         }
 189     }
 190 
 191     /**
 192      * Build the summary for the enums in this package.
 193      *
 194      * @param summaryContentTree the summary tree to which the enum summary will
 195      *                           be added
 196      */
 197     protected void buildEnumSummary(Content summaryContentTree) {
 198         SortedSet<TypeElement> elist = utils.isSpecified(packageElement)
 199             ? utils.getTypeElementsAsSortedSet(utils.getEnums(packageElement))
 200             : configuration.typeElementCatalog.enums(packageElement);
 201         SortedSet<TypeElement> enums = utils.filterOutPrivateClasses(elist, options.javafx);
 202         if (!enums.isEmpty()) {
 203             packageWriter.addEnumSummary(enums, summaryContentTree);
 204         }
 205     }
 206 
 207     /**
 208      * Build the summary for the records in this package.
 209      *
 210      * @param summaryContentTree the summary tree to which the record summary will
 211      *                           be added
 212      */
 213     protected void buildRecordSummary(Content summaryContentTree) {
 214         SortedSet<TypeElement> rlist = utils.isSpecified(packageElement)
 215                 ? utils.getTypeElementsAsSortedSet(utils.getRecords(packageElement))
 216                 : configuration.typeElementCatalog.records(packageElement);
 217         SortedSet<TypeElement> records = utils.filterOutPrivateClasses(rlist, options.javafx);
 218         if (!records.isEmpty()) {
 219             packageWriter.addRecordSummary(records, summaryContentTree);
 220         }
 221     }
 222 
 223     /**
 224      * Build the summary for the exceptions in this package.
 225      *
 226      * @param summaryContentTree the summary tree to which the exception summary will
 227      *                           be added
 228      */
 229     protected void buildExceptionSummary(Content summaryContentTree) {
 230         Set<TypeElement> iexceptions =
 231             utils.isSpecified(packageElement)
 232                 ? utils.getTypeElementsAsSortedSet(utils.getExceptions(packageElement))
 233                 : configuration.typeElementCatalog.exceptions(packageElement);
 234         SortedSet<TypeElement> exceptions = utils.filterOutPrivateClasses(iexceptions,
 235                 options.javafx);
 236         if (!exceptions.isEmpty()) {
 237             packageWriter.addExceptionSummary(exceptions, summaryContentTree);
 238         }
 239     }
 240 
 241     /**
 242      * Build the summary for the errors in this package.
 243      *
 244      * @param summaryContentTree the summary tree to which the error summary will
 245      *                           be added
 246      */
 247     protected void buildErrorSummary(Content summaryContentTree) {
 248         Set<TypeElement> ierrors =
 249             utils.isSpecified(packageElement)
 250                 ? utils.getTypeElementsAsSortedSet(utils.getErrors(packageElement))
 251                 : configuration.typeElementCatalog.errors(packageElement);
 252         SortedSet<TypeElement> errors = utils.filterOutPrivateClasses(ierrors, options.javafx);
 253         if (!errors.isEmpty()) {
 254             packageWriter.addErrorSummary(errors, summaryContentTree);
 255         }
 256     }
 257 
 258     /**
 259      * Build the summary for the annotation type in this package.
 260      *
 261      * @param summaryContentTree the summary tree to which the annotation type
 262      *                           summary will be added
 263      */
 264     protected void buildAnnotationTypeSummary(Content summaryContentTree) {
 265         SortedSet<TypeElement> iannotationTypes =
 266             utils.isSpecified(packageElement)
 267                 ? utils.getTypeElementsAsSortedSet(utils.getAnnotationTypes(packageElement))
 268                 : configuration.typeElementCatalog.annotationTypes(packageElement);
 269         SortedSet<TypeElement> annotationTypes = utils.filterOutPrivateClasses(iannotationTypes,
 270                 options.javafx);
 271         if (!annotationTypes.isEmpty()) {
 272             packageWriter.addAnnotationTypeSummary(annotationTypes, summaryContentTree);
 273         }
 274     }
 275 
 276     /**
 277      * Build the description of the summary.
 278      *
 279      * @param packageContentTree the tree to which the package description will
 280      *                           be added
 281      */
 282     protected void buildPackageDescription(Content packageContentTree) {
 283         if (options.noComment) {
 284             return;
 285         }
 286         packageWriter.addPackageDescription(packageContentTree);
 287     }
 288 
 289     /**
 290      * Build the tags of the summary.
 291      *
 292      * @param packageContentTree the tree to which the package tags will be added
 293      */
 294     protected void buildPackageTags(Content packageContentTree) {
 295         if (options.noComment) {
 296             return;
 297         }
 298         packageWriter.addPackageTags(packageContentTree);
 299     }
 300 }
< prev index next >