public interface ResourceLoader
ResourceLoader
is responsible for fetching
arbitrary resources (normally during the process of localization)
in a transparent way. This approach separates the management
of localization data from the actual loading process.
The ResourceManager
calls #loadResource(String, Locale)
on certain instances of ResourceLoader
whenever there is
the need to load new data for a given combination of Locale
and name
where the exact semantic of name
is
implementation specific (it can denote a resource path in the
way of fully qualified resource naming or the remote location
of a resource bundle available over the Internet).Modifier and Type | Method and Description |
---|---|
java.util.ResourceBundle |
loadResource(java.lang.String name,
java.util.Locale locale)
Attempts to load a new
ResourceBundle for the given
combination of Locale and name . |
java.util.ResourceBundle loadResource(java.lang.String name, java.util.Locale locale)
ResourceBundle
for the given
combination of Locale
and name
. Implementations
should throw an MissingResourceException
when encountering
errors or when there is no matching resource data in the
domain of this ResourceLoader
.name
- abstract identifier for the resource in questionlocale
- the Locale
associated with the resource
in questionResourceBundle
for the given combination of
Locale
and name
java.util.MissingResourceException
- if the desired resource could
not be found