src/java.base/share/classes/java/util/spi/ResourceBundleProvider.java
author mchung
Thu, 21 Dec 2017 15:18:49 -0800
changeset 48524 b6fc9a193661
parent 47216 71c04702a3d5
child 54206 003cc64366da
permissions -rw-r--r--
8193767: Improve javadoc in ResourceBundle working with modules Reviewed-by: alanb, naoto
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
36511
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
     1
/*
45439
5673d77a787b 8180375: Rename <baseName>Provider to <packagename>.spi.<simpleName>Provider
naoto
parents: 43712
diff changeset
     2
 * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
36511
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
     4
 *
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
     7
 * published by the Free Software Foundation.  Oracle designates this
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
     9
 * by Oracle in the LICENSE file that accompanied this code.
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    10
 *
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    15
 * accompanied this code).
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    16
 *
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    20
 *
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    23
 * questions.
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    24
 */
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    25
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    26
package java.util.spi;
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    27
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    28
import java.util.Locale;
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    29
import java.util.ResourceBundle;
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    30
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    31
/**
48524
b6fc9a193661 8193767: Improve javadoc in ResourceBundle working with modules
mchung
parents: 47216
diff changeset
    32
 * {@code ResourceBundleProvider} is a service provider interface for
b6fc9a193661 8193767: Improve javadoc in ResourceBundle working with modules
mchung
parents: 47216
diff changeset
    33
 * resource bundles. It is used by
b6fc9a193661 8193767: Improve javadoc in ResourceBundle working with modules
mchung
parents: 47216
diff changeset
    34
 * {@link ResourceBundle#getBundle(String) ResourceBundle.getBundle}
b6fc9a193661 8193767: Improve javadoc in ResourceBundle working with modules
mchung
parents: 47216
diff changeset
    35
 * factory methods to locate and load the service providers that are deployed as
b6fc9a193661 8193767: Improve javadoc in ResourceBundle working with modules
mchung
parents: 47216
diff changeset
    36
 * modules via {@link java.util.ServiceLoader ServiceLoader}.
b6fc9a193661 8193767: Improve javadoc in ResourceBundle working with modules
mchung
parents: 47216
diff changeset
    37
 *
b6fc9a193661 8193767: Improve javadoc in ResourceBundle working with modules
mchung
parents: 47216
diff changeset
    38
 * <h3>Developing resource bundle services</h3>
38782
ff27bc5c278e 8158604: test/java/util/ResourceBundle/modules/appbasic missing @test
mchung
parents: 36511
diff changeset
    39
 *
48524
b6fc9a193661 8193767: Improve javadoc in ResourceBundle working with modules
mchung
parents: 47216
diff changeset
    40
 * A service for a resource bundle of a given <em>{@code baseName}</em> must have
b6fc9a193661 8193767: Improve javadoc in ResourceBundle working with modules
mchung
parents: 47216
diff changeset
    41
 * a fully-qualified class name of the form:
b6fc9a193661 8193767: Improve javadoc in ResourceBundle working with modules
mchung
parents: 47216
diff changeset
    42
 * <blockquote>
b6fc9a193661 8193767: Improve javadoc in ResourceBundle working with modules
mchung
parents: 47216
diff changeset
    43
 * {@code <package of baseName> + ".spi." + <simple name of baseName> + "Provider"}
b6fc9a193661 8193767: Improve javadoc in ResourceBundle working with modules
mchung
parents: 47216
diff changeset
    44
 * </blockquote>
b6fc9a193661 8193767: Improve javadoc in ResourceBundle working with modules
mchung
parents: 47216
diff changeset
    45
 *
b6fc9a193661 8193767: Improve javadoc in ResourceBundle working with modules
mchung
parents: 47216
diff changeset
    46
 * The service type is in a {@code spi} subpackage as it may be packaged in
b6fc9a193661 8193767: Improve javadoc in ResourceBundle working with modules
mchung
parents: 47216
diff changeset
    47
 * a module separate from the resource bundle providers.
b6fc9a193661 8193767: Improve javadoc in ResourceBundle working with modules
mchung
parents: 47216
diff changeset
    48
 * For example, the service for a resource bundle named
b6fc9a193661 8193767: Improve javadoc in ResourceBundle working with modules
mchung
parents: 47216
diff changeset
    49
 * {@code com.example.app.MyResources} must be
b6fc9a193661 8193767: Improve javadoc in ResourceBundle working with modules
mchung
parents: 47216
diff changeset
    50
 * {@code com.example.app.spi.MyResourcesProvider}:
b6fc9a193661 8193767: Improve javadoc in ResourceBundle working with modules
mchung
parents: 47216
diff changeset
    51
 *
b6fc9a193661 8193767: Improve javadoc in ResourceBundle working with modules
mchung
parents: 47216
diff changeset
    52
 * <blockquote><pre>
b6fc9a193661 8193767: Improve javadoc in ResourceBundle working with modules
mchung
parents: 47216
diff changeset
    53
 * {@code package com.example.app.spi;
38782
ff27bc5c278e 8158604: test/java/util/ResourceBundle/modules/appbasic missing @test
mchung
parents: 36511
diff changeset
    54
 * public interface MyResourcesProvider extends ResourceBundleProvider {
ff27bc5c278e 8158604: test/java/util/ResourceBundle/modules/appbasic missing @test
mchung
parents: 36511
diff changeset
    55
 * }
48524
b6fc9a193661 8193767: Improve javadoc in ResourceBundle working with modules
mchung
parents: 47216
diff changeset
    56
 * }</pre></blockquote>
b6fc9a193661 8193767: Improve javadoc in ResourceBundle working with modules
mchung
parents: 47216
diff changeset
    57
 *
b6fc9a193661 8193767: Improve javadoc in ResourceBundle working with modules
mchung
parents: 47216
diff changeset
    58
 * <h3>Deploying resource bundle service providers</h3>
b6fc9a193661 8193767: Improve javadoc in ResourceBundle working with modules
mchung
parents: 47216
diff changeset
    59
 *
b6fc9a193661 8193767: Improve javadoc in ResourceBundle working with modules
mchung
parents: 47216
diff changeset
    60
 * Resource bundles can be deployed in one or more service providers
b6fc9a193661 8193767: Improve javadoc in ResourceBundle working with modules
mchung
parents: 47216
diff changeset
    61
 * in modules.  For example, a provider for a service
b6fc9a193661 8193767: Improve javadoc in ResourceBundle working with modules
mchung
parents: 47216
diff changeset
    62
 * named "{@code com.example.app.spi.MyResourcesProvider}"
b6fc9a193661 8193767: Improve javadoc in ResourceBundle working with modules
mchung
parents: 47216
diff changeset
    63
 * has the following implementation class:
b6fc9a193661 8193767: Improve javadoc in ResourceBundle working with modules
mchung
parents: 47216
diff changeset
    64
 *
b6fc9a193661 8193767: Improve javadoc in ResourceBundle working with modules
mchung
parents: 47216
diff changeset
    65
 * <blockquote><pre>
b6fc9a193661 8193767: Improve javadoc in ResourceBundle working with modules
mchung
parents: 47216
diff changeset
    66
 * {@code import com.example.app.spi.MyResourcesProvider;
b6fc9a193661 8193767: Improve javadoc in ResourceBundle working with modules
mchung
parents: 47216
diff changeset
    67
 * class MyResourcesProviderImpl extends AbstractResourceBundleProvider
b6fc9a193661 8193767: Improve javadoc in ResourceBundle working with modules
mchung
parents: 47216
diff changeset
    68
 *     implements MyResourcesProvider
b6fc9a193661 8193767: Improve javadoc in ResourceBundle working with modules
mchung
parents: 47216
diff changeset
    69
 * {
b6fc9a193661 8193767: Improve javadoc in ResourceBundle working with modules
mchung
parents: 47216
diff changeset
    70
 *     public MyResourcesProviderImpl() {
b6fc9a193661 8193767: Improve javadoc in ResourceBundle working with modules
mchung
parents: 47216
diff changeset
    71
 *         super("java.properties");
b6fc9a193661 8193767: Improve javadoc in ResourceBundle working with modules
mchung
parents: 47216
diff changeset
    72
 *     }
b6fc9a193661 8193767: Improve javadoc in ResourceBundle working with modules
mchung
parents: 47216
diff changeset
    73
 *     // this provider maps the resource bundle to per-language package
b6fc9a193661 8193767: Improve javadoc in ResourceBundle working with modules
mchung
parents: 47216
diff changeset
    74
 *     protected String toBundleName(String baseName, Locale locale) {
b6fc9a193661 8193767: Improve javadoc in ResourceBundle working with modules
mchung
parents: 47216
diff changeset
    75
 *         return "p." + locale.getLanguage() + "." + baseName;
b6fc9a193661 8193767: Improve javadoc in ResourceBundle working with modules
mchung
parents: 47216
diff changeset
    76
 *     }
b6fc9a193661 8193767: Improve javadoc in ResourceBundle working with modules
mchung
parents: 47216
diff changeset
    77
 *
b6fc9a193661 8193767: Improve javadoc in ResourceBundle working with modules
mchung
parents: 47216
diff changeset
    78
 *     public ResourceBundle getBundle(String baseName, Locale locale) {
b6fc9a193661 8193767: Improve javadoc in ResourceBundle working with modules
mchung
parents: 47216
diff changeset
    79
 *         // this module only provides bundles in French
b6fc9a193661 8193767: Improve javadoc in ResourceBundle working with modules
mchung
parents: 47216
diff changeset
    80
 *         if (locale.equals(Locale.FRENCH)) {
b6fc9a193661 8193767: Improve javadoc in ResourceBundle working with modules
mchung
parents: 47216
diff changeset
    81
 *              return super.getBundle(baseName, locale);
b6fc9a193661 8193767: Improve javadoc in ResourceBundle working with modules
mchung
parents: 47216
diff changeset
    82
 *         }
b6fc9a193661 8193767: Improve javadoc in ResourceBundle working with modules
mchung
parents: 47216
diff changeset
    83
 *         // otherwise return null
b6fc9a193661 8193767: Improve javadoc in ResourceBundle working with modules
mchung
parents: 47216
diff changeset
    84
 *         return null;
b6fc9a193661 8193767: Improve javadoc in ResourceBundle working with modules
mchung
parents: 47216
diff changeset
    85
 *     }
b6fc9a193661 8193767: Improve javadoc in ResourceBundle working with modules
mchung
parents: 47216
diff changeset
    86
 * }}</pre></blockquote>
b6fc9a193661 8193767: Improve javadoc in ResourceBundle working with modules
mchung
parents: 47216
diff changeset
    87
 *
b6fc9a193661 8193767: Improve javadoc in ResourceBundle working with modules
mchung
parents: 47216
diff changeset
    88
 * This example provides "{@code com.example.app.MyResources}"
b6fc9a193661 8193767: Improve javadoc in ResourceBundle working with modules
mchung
parents: 47216
diff changeset
    89
 * resource bundle of the French locale.  Traditionally resource bundles of
b6fc9a193661 8193767: Improve javadoc in ResourceBundle working with modules
mchung
parents: 47216
diff changeset
    90
 * all locales are packaged in the same package as the resource bundle base name.
b6fc9a193661 8193767: Improve javadoc in ResourceBundle working with modules
mchung
parents: 47216
diff changeset
    91
 * When deploying resource bundles in more than one modules and two modules
b6fc9a193661 8193767: Improve javadoc in ResourceBundle working with modules
mchung
parents: 47216
diff changeset
    92
 * containing a package of the same name, <em>split package</em>,
b6fc9a193661 8193767: Improve javadoc in ResourceBundle working with modules
mchung
parents: 47216
diff changeset
    93
 * is not supported, resource bundles in each module can be packaged in
b6fc9a193661 8193767: Improve javadoc in ResourceBundle working with modules
mchung
parents: 47216
diff changeset
    94
 * a different package as shown in this example where this provider packages
b6fc9a193661 8193767: Improve javadoc in ResourceBundle working with modules
mchung
parents: 47216
diff changeset
    95
 * the resource bundles in per-language package, i.e. {@code com.example.app.fr}
b6fc9a193661 8193767: Improve javadoc in ResourceBundle working with modules
mchung
parents: 47216
diff changeset
    96
 * for French locale.
38782
ff27bc5c278e 8158604: test/java/util/ResourceBundle/modules/appbasic missing @test
mchung
parents: 36511
diff changeset
    97
 *
48524
b6fc9a193661 8193767: Improve javadoc in ResourceBundle working with modules
mchung
parents: 47216
diff changeset
    98
 * <p> A provider can provide more than one services, each of which is a service
b6fc9a193661 8193767: Improve javadoc in ResourceBundle working with modules
mchung
parents: 47216
diff changeset
    99
 * for a resource bundle of a different base name.
b6fc9a193661 8193767: Improve javadoc in ResourceBundle working with modules
mchung
parents: 47216
diff changeset
   100
 *
b6fc9a193661 8193767: Improve javadoc in ResourceBundle working with modules
mchung
parents: 47216
diff changeset
   101
 * <p>{@link AbstractResourceBundleProvider}
b6fc9a193661 8193767: Improve javadoc in ResourceBundle working with modules
mchung
parents: 47216
diff changeset
   102
 * provides the basic implementation for {@code ResourceBundleProvider}
b6fc9a193661 8193767: Improve javadoc in ResourceBundle working with modules
mchung
parents: 47216
diff changeset
   103
 * and a subclass can override the {@link
b6fc9a193661 8193767: Improve javadoc in ResourceBundle working with modules
mchung
parents: 47216
diff changeset
   104
 * AbstractResourceBundleProvider#toBundleName(String, Locale) toBundleName}
b6fc9a193661 8193767: Improve javadoc in ResourceBundle working with modules
mchung
parents: 47216
diff changeset
   105
 * method to return a provider-specific location of the resource to be loaded,
b6fc9a193661 8193767: Improve javadoc in ResourceBundle working with modules
mchung
parents: 47216
diff changeset
   106
 * for example, per-language package.
b6fc9a193661 8193767: Improve javadoc in ResourceBundle working with modules
mchung
parents: 47216
diff changeset
   107
 * A provider can override {@link #getBundle ResourceBundleProvider.getBundle}
b6fc9a193661 8193767: Improve javadoc in ResourceBundle working with modules
mchung
parents: 47216
diff changeset
   108
 * method for example to only search the known supported locales or
b6fc9a193661 8193767: Improve javadoc in ResourceBundle working with modules
mchung
parents: 47216
diff changeset
   109
 * return resource bundles in other formats such as XML.
b6fc9a193661 8193767: Improve javadoc in ResourceBundle working with modules
mchung
parents: 47216
diff changeset
   110
 *
b6fc9a193661 8193767: Improve javadoc in ResourceBundle working with modules
mchung
parents: 47216
diff changeset
   111
 * <p>The module declaration of this provider module specifies the following
b6fc9a193661 8193767: Improve javadoc in ResourceBundle working with modules
mchung
parents: 47216
diff changeset
   112
 * directive:
b6fc9a193661 8193767: Improve javadoc in ResourceBundle working with modules
mchung
parents: 47216
diff changeset
   113
 * <pre>
b6fc9a193661 8193767: Improve javadoc in ResourceBundle working with modules
mchung
parents: 47216
diff changeset
   114
 *     provides com.example.app.spi.MyResourcesProvider with com.example.impl.MyResourcesProviderImpl;
b6fc9a193661 8193767: Improve javadoc in ResourceBundle working with modules
mchung
parents: 47216
diff changeset
   115
 * </pre>
b6fc9a193661 8193767: Improve javadoc in ResourceBundle working with modules
mchung
parents: 47216
diff changeset
   116
 *
b6fc9a193661 8193767: Improve javadoc in ResourceBundle working with modules
mchung
parents: 47216
diff changeset
   117
 * <h3><a id="obtain-resource-bundle">Obtaining resource bundles from providers</a></h3>
36511
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   118
 *
48524
b6fc9a193661 8193767: Improve javadoc in ResourceBundle working with modules
mchung
parents: 47216
diff changeset
   119
 * The module declaration of the <em>consumer module</em> that calls one of the
b6fc9a193661 8193767: Improve javadoc in ResourceBundle working with modules
mchung
parents: 47216
diff changeset
   120
 * {@code ResourceBundle.getBundle} factory methods to obtain a resource
b6fc9a193661 8193767: Improve javadoc in ResourceBundle working with modules
mchung
parents: 47216
diff changeset
   121
 * bundle from service providers must specify the following directive:
b6fc9a193661 8193767: Improve javadoc in ResourceBundle working with modules
mchung
parents: 47216
diff changeset
   122
 * <pre>
b6fc9a193661 8193767: Improve javadoc in ResourceBundle working with modules
mchung
parents: 47216
diff changeset
   123
 *     uses com.example.app.spi.MyResourcesProvider;
b6fc9a193661 8193767: Improve javadoc in ResourceBundle working with modules
mchung
parents: 47216
diff changeset
   124
 * </pre>
b6fc9a193661 8193767: Improve javadoc in ResourceBundle working with modules
mchung
parents: 47216
diff changeset
   125
 *
b6fc9a193661 8193767: Improve javadoc in ResourceBundle working with modules
mchung
parents: 47216
diff changeset
   126
 * {@link ResourceBundle#getBundle(String, Locale)
b6fc9a193661 8193767: Improve javadoc in ResourceBundle working with modules
mchung
parents: 47216
diff changeset
   127
 * ResourceBundle.getBundle("com.example.app.MyResource", locale)}
b6fc9a193661 8193767: Improve javadoc in ResourceBundle working with modules
mchung
parents: 47216
diff changeset
   128
 * locates and loads the providers for {@code com.example.app.spi.MyResourcesProvider}
b6fc9a193661 8193767: Improve javadoc in ResourceBundle working with modules
mchung
parents: 47216
diff changeset
   129
 * service and then invokes {@link #getBundle(String, Locale)
b6fc9a193661 8193767: Improve javadoc in ResourceBundle working with modules
mchung
parents: 47216
diff changeset
   130
 * ResourceBundleProvider.getBundle("com.example.app.MyResource", locale)} to
b6fc9a193661 8193767: Improve javadoc in ResourceBundle working with modules
mchung
parents: 47216
diff changeset
   131
 * find the resource bundle of the given base name and locale.
b6fc9a193661 8193767: Improve javadoc in ResourceBundle working with modules
mchung
parents: 47216
diff changeset
   132
 * If the consumer module is a resource bundle service provider for
b6fc9a193661 8193767: Improve javadoc in ResourceBundle working with modules
mchung
parents: 47216
diff changeset
   133
 * {@code com.example.app.spi.MyResourcesProvider}, {@code ResourceBundle.getBundle}
b6fc9a193661 8193767: Improve javadoc in ResourceBundle working with modules
mchung
parents: 47216
diff changeset
   134
 * will locate resource bundles only from service providers.
b6fc9a193661 8193767: Improve javadoc in ResourceBundle working with modules
mchung
parents: 47216
diff changeset
   135
 * Otherwise, {@code ResourceBundle.getBundle} may continue the search of
b6fc9a193661 8193767: Improve javadoc in ResourceBundle working with modules
mchung
parents: 47216
diff changeset
   136
 * the resource bundle in other modules and class path per the specification
b6fc9a193661 8193767: Improve javadoc in ResourceBundle working with modules
mchung
parents: 47216
diff changeset
   137
 * of the {@code ResourceBundle.getBundle} method being called.
b6fc9a193661 8193767: Improve javadoc in ResourceBundle working with modules
mchung
parents: 47216
diff changeset
   138
 *
b6fc9a193661 8193767: Improve javadoc in ResourceBundle working with modules
mchung
parents: 47216
diff changeset
   139
 * @see AbstractResourceBundleProvider
b6fc9a193661 8193767: Improve javadoc in ResourceBundle working with modules
mchung
parents: 47216
diff changeset
   140
 * @see <a href="../ResourceBundle.html#resource-bundle-modules">
b6fc9a193661 8193767: Improve javadoc in ResourceBundle working with modules
mchung
parents: 47216
diff changeset
   141
 *      Resource Bundles and Named Modules</a>
b6fc9a193661 8193767: Improve javadoc in ResourceBundle working with modules
mchung
parents: 47216
diff changeset
   142
 * @see java.util.ServiceLoader
36511
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   143
 * @since 9
43712
5dfd0950317c 8173393: Module system implementation refresh (2/2017)
alanb
parents: 38782
diff changeset
   144
 * @spec JPMS
36511
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   145
 */
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   146
public interface ResourceBundleProvider {
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   147
    /**
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   148
     * Returns a {@code ResourceBundle} for the given bundle name and locale.
38782
ff27bc5c278e 8158604: test/java/util/ResourceBundle/modules/appbasic missing @test
mchung
parents: 36511
diff changeset
   149
     * This method returns {@code null} if there is no {@code ResourceBundle}
ff27bc5c278e 8158604: test/java/util/ResourceBundle/modules/appbasic missing @test
mchung
parents: 36511
diff changeset
   150
     * found for the given parameters.
36511
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   151
     *
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   152
     *
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   153
     * @param baseName
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   154
     *        the base bundle name of the resource bundle, a fully
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   155
     *        qualified class name
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   156
     * @param locale
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   157
     *        the locale for which the resource bundle should be loaded
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   158
     * @return the ResourceBundle created for the given parameters, or null if no
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   159
     *         {@code ResourceBundle} for the given parameters is found
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   160
     */
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   161
    public ResourceBundle getBundle(String baseName, Locale locale);
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   162
}