src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/Resources.java
changeset 50167 cc705c956798
parent 47216 71c04702a3d5
child 53562 0d9dee001667
equal deleted inserted replaced
50166:1d683e243d8d 50167:cc705c956798
     1 /*
     1 /*
     2  * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2016, 2018, 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
    37  * all supported formats, and one that contains strings
    37  * all supported formats, and one that contains strings
    38  * specific to the selected doclet, such as the standard
    38  * specific to the selected doclet, such as the standard
    39  * HTML doclet.
    39  * HTML doclet.
    40  */
    40  */
    41 public class Resources {
    41 public class Resources {
       
    42     public final String annotationTypeSummary;
       
    43     public final String annotationTypeTableSummary;
       
    44     public final String classSummary;
       
    45     public final String classTableSummary;
    42     private final BaseConfiguration configuration;
    46     private final BaseConfiguration configuration;
    43     private final String commonBundleName;
    47     private final String commonBundleName;
    44     private final String docletBundleName;
    48     private final String docletBundleName;
       
    49     public final String enumSummary;
       
    50     public final String enumTableSummary;
       
    51     public final String errorSummary;
       
    52     public final String errorTableSummary;
       
    53     public final String exceptionSummary;
       
    54     public final String exceptionTableSummary;
       
    55     public final String interfaceSummary;
       
    56     public final String interfaceTableSummary;
       
    57     public final String packageSummary;
       
    58     public final String packageTableSummary;
    45 
    59 
    46     protected ResourceBundle commonBundle;
    60     protected ResourceBundle commonBundle;
    47     protected ResourceBundle docletBundle;
    61     protected ResourceBundle docletBundle;
    48 
    62 
    49     /**
    63     /**
    60      */
    74      */
    61     public Resources(BaseConfiguration configuration, String commonBundleName, String docletBundleName) {
    75     public Resources(BaseConfiguration configuration, String commonBundleName, String docletBundleName) {
    62         this.configuration = configuration;
    76         this.configuration = configuration;
    63         this.commonBundleName = commonBundleName;
    77         this.commonBundleName = commonBundleName;
    64         this.docletBundleName = docletBundleName;
    78         this.docletBundleName = docletBundleName;
       
    79         this.annotationTypeSummary = getText("doclet.Annotation_Types_Summary");
       
    80         this.annotationTypeTableSummary = getText("doclet.Member_Table_Summary",
       
    81                 this.annotationTypeSummary, getText("doclet.annotationtypes"));
       
    82         this.classSummary = getText("doclet.Class_Summary");
       
    83         this.classTableSummary = getText("doclet.Member_Table_Summary",
       
    84                 this.classSummary, getText("doclet.classes"));
       
    85         this.enumSummary = getText("doclet.Enum_Summary");
       
    86         this.enumTableSummary = getText("doclet.Member_Table_Summary",
       
    87                 this.enumSummary, getText("doclet.enums"));
       
    88         this.errorSummary = getText("doclet.Error_Summary");
       
    89         this.errorTableSummary = getText("doclet.Member_Table_Summary",
       
    90                 this.errorSummary, getText("doclet.errors"));
       
    91         this.exceptionSummary = getText("doclet.Exception_Summary");
       
    92         this.exceptionTableSummary = getText("doclet.Member_Table_Summary",
       
    93                 this.exceptionSummary, getText("doclet.exceptions"));
       
    94         this.interfaceSummary = getText("doclet.Interface_Summary");
       
    95         this.interfaceTableSummary = getText("doclet.Member_Table_Summary",
       
    96                 this.interfaceSummary, getText("doclet.interfaces"));
       
    97         this.packageSummary = getText("doclet.Package_Summary");
       
    98         this.packageTableSummary = getText("doclet.Member_Table_Summary",
       
    99                 this.packageSummary, getText("doclet.packages"));
    65     }
   100     }
    66 
   101 
    67     /**
   102     /**
    68      * Gets the string for the given key from one of the doclet's
   103      * Gets the string for the given key from one of the doclet's
    69      * resource bundles.
   104      * resource bundles.