public class PropertyResourceBundle extends java.lang.Object implements PropertyResource
PropertyResource
implementation backed by one or more
resource bundles
.Modifier | Constructor and Description |
---|---|
protected |
PropertyResourceBundle(PropertyResourceStrategy<?> strategy,
java.lang.Class<?> accessor,
java.lang.String resource)
Create a resource bundle with the given initial locale.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Class<?> |
getAccessor() |
java.util.Set<java.lang.String> |
getKeys(java.util.Locale locale) |
protected java.util.List<java.util.ResourceBundle> |
getResourceBundles(java.util.Locale locale) |
protected <T> java.util.List<ResourceBundleDescriptor> |
getResources(java.lang.Class<T> accessor,
java.lang.String resource) |
PropertyResourceStrategy<?> |
getStrategy() |
java.lang.String |
getValue(java.lang.String key,
java.util.Locale locale) |
static java.lang.String |
removePropertiesPostfix(java.lang.String name) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getBundle, getKeys, getValue
protected PropertyResourceBundle(PropertyResourceStrategy<?> strategy, java.lang.Class<?> accessor, java.lang.String resource)
strategy
- the strategy responsible for initializing this resource from the
appropriate PropertyConfiguration
accessor
- the accessor class typeresource
- the resource location setting from the appropriate
PropertyConfiguration
public PropertyResourceStrategy<?> getStrategy()
getStrategy
in interface PropertyResource
public java.lang.Class<?> getAccessor()
getAccessor
in interface PropertyResource
public java.util.Set<java.lang.String> getKeys(java.util.Locale locale)
getKeys
in interface PropertyResource
locale
- the localepublic java.lang.String getValue(java.lang.String key, java.util.Locale locale)
getValue
in interface PropertyResource
key
- the key of the propertylocale
- the localeprotected java.util.List<java.util.ResourceBundle> getResourceBundles(java.util.Locale locale)
protected <T> java.util.List<ResourceBundleDescriptor> getResources(java.lang.Class<T> accessor, java.lang.String resource)
public static java.lang.String removePropertiesPostfix(java.lang.String name)
name
- the string to remove the postfix fromProperties
removed from the end, if present.