public interface ResourceLoader
| Modifier and Type | Method and Description |
|---|---|
Locale |
getDefaultLocale()
The default locale to be used when locating resources.
|
String |
getString(String key)
Gets a string for the given key.
|
String |
getString(String key,
Locale locale)
Gets a string for the given key and locale.
|
String |
getString(String key,
Locale locale,
Object[] arguments)
Gets a parameterized string for the given key and locale and substitutes the
parameters using the passed array of arguments.
|
String |
getString(String key,
Object[] arguments)
Gets a parameterized string for the given key and substitutes
the parameters using the passed array of arguments.
|
void |
init(Map properties)
Initializes the
ResourceLoader using the specified properties. |
void |
setDefaultLocale(Locale locale)
Sets the default locale to be used when locating resources.
|
void |
setDefaultLocale(String locale)
Sets the default locale to be used when locating resources.
|
void init(Map properties)
ResourceLoader using the specified properties.properties - The initialization properties.void setDefaultLocale(String locale)
locale - The default locale to be used.void setDefaultLocale(Locale locale)
locale - The default locale to be used.Locale getDefaultLocale()
String getString(String key)
key - The key for the target string.String getString(String key, Object[] arguments)
key - The key for the target string.arguments - The arguments to substitute into the parameterized string.IllegalArgumentException - If the parameterized string is invalid,
or if an argument in the arguments array
is not of the type expected by the format element(s)
that use it.String getString(String key, Locale locale)
key - The key for the target string.locale - The target locale for the string.String getString(String key, Locale locale, Object[] arguments)
key - The key for the target string.locale - The target locale for the string.arguments - The arguments to substitute into the parameterized string.IllegalArgumentException - If the parameterized string is invalid,
or if an argument in the arguments array
is not of the type expected by the format element(s)
that use it.Copyright © 2015 The Apache Software Foundation. All rights reserved.