-
- All Known Implementing Classes:
AbstractResourceBundleProvider
public interface ResourceBundleProviderResourceBundleProvideris a provider interface that is used for loading resource bundles for named modules. Implementation classes of this interface are loaded withServiceLoaderduring a call to theResourceBundle.getBundlemethod. 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.MyResourcesProviderwill be the provider service type:public interface MyResourcesProvider extends ResourceBundleProvider { }This providers's
getBundlemethod is called through the resource bundle loading process instead ofResourceBundle.Control.newBundle(). Refer toResourceBundlefor 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 ResourceBundlegetBundle(String baseName, Locale locale)Returns aResourceBundlefor the given bundle name and locale.
-
-
-
Method Detail
-
getBundle
ResourceBundle getBundle(String baseName, Locale locale)
Returns aResourceBundlefor the given bundle name and locale. This method returnsnullif there is noResourceBundlefound for the given parameters.- Parameters:
baseName- the base bundle name of the resource bundle, a fully qualified class namelocale- the locale for which the resource bundle should be loaded- Returns:
- the ResourceBundle created for the given parameters, or null if no
ResourceBundlefor the given parameters is found
-
-