public interface PropertyResource
Modifier and Type | Method and Description |
---|---|
java.lang.Class<?> |
getAccessor() |
static <T> PropertyResource |
getBundle(java.util.Locale locale,
java.lang.Class<T> accessor,
java.lang.String resource)
Create a
localizing resource bundle over the given
configuration. |
default java.util.Set<java.lang.String> |
getKeys() |
java.util.Set<java.lang.String> |
getKeys(java.util.Locale locale) |
PropertyResourceStrategy<?> |
getStrategy() |
default java.lang.String |
getValue(java.lang.String key) |
java.lang.String |
getValue(java.lang.String key,
java.util.Locale locale) |
default java.util.Set<java.lang.String> getKeys()
java.util.Set<java.lang.String> getKeys(java.util.Locale locale)
locale
- the localedefault java.lang.String getValue(java.lang.String key)
key
- the key of the propertyjava.lang.String getValue(java.lang.String key, java.util.Locale locale)
key
- the key of the propertylocale
- the localePropertyResourceStrategy<?> getStrategy()
java.lang.Class<?> getAccessor()
static <T> PropertyResource getBundle(java.util.Locale locale, java.lang.Class<T> accessor, java.lang.String resource)
localizing resource bundle
over the given
configuration.
TODO
The created resource bundle will behave as a delegate to a series of
resource bundles
, which in turn will behave
according to ResourceBundle.getBundle(String, Locale, ClassLoader)
with the given class loader, using the given locations as base names, and
using the current locale of the PropertyResource
. This locale may
change, and the delegate resource bundles will be updated accordingly.locale
- the locale for the resource bundleaccessor
- the base names of properties files to load, and the class loaders
they exist in