ResourceBundleProvider (Java SE 9 & JDK 9 )
Keywords: java.util.spi.ResourceBundleProvider interface

Module java.base
Package java.util.spi

## Interface ResourceBundleProvider

- All Known Implementing Classes:
    `AbstractResourceBundleProvider`

      public interface ResourceBundleProvider

  `ResourceBundleProvider` is a provider interface that is used for loading resource bundles for named modules. Implementation classes of this interface are loaded with `ServiceLoader` during a call to the `ResourceBundle.getBundle` method. The provider service type is determined by `<package name> + ".spi." + <simple name> + "Provider"`.

  For example, if the base name is "com.example.app.MyResources", `com.example.app.spi.MyResourcesProvider` will be the provider service type:

       public interface MyResourcesProvider extends ResourceBundleProvider {
       }

  This providers's `getBundle` method is called through the resource bundle loading process instead of `ResourceBundle.Control.newBundle()`. Refer to `ResourceBundle` for details.

  Since:
    9
  See Also:
    Resource Bundles in Named Modules, ResourceBundleProvider Service Providers

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `ResourceBundle` | `getBundle​(String baseName, Locale locale)` | Returns a `ResourceBundle` for the given bundle name and locale.

- - ### Method Detail

    - #### getBundle

          ResourceBundle getBundle​(String baseName,
                                   Locale locale)

      Returns a `ResourceBundle` for the given bundle name and locale. This method returns `null` if there is no `ResourceBundle` found for the given parameters.
      Parameters:
        `baseName` - the base bundle name of the resource bundle, a fully qualified class name
        `locale` - the locale for which the resource bundle should be loaded
      Returns:
        the ResourceBundle created for the given parameters, or null if no `ResourceBundle` for the given parameters is found