public class HybrisResourceBundle
extends java.util.ResourceBundle
implements java.io.Serializable
HybrisResourceBundle is a
concrete subclass of ResourceBundle that manages resources for a locale using a set of objects from a
serializable map.
See ResourceBundle for more information about resource bundles.| Constructor and Description |
|---|
HybrisResourceBundle(java.util.Locale locale)
Creates a new
HybrisResourceBundle instance for the specified Locale. |
| Modifier and Type | Method and Description |
|---|---|
java.util.Enumeration |
getKeys()
Implementation of
ResourceBundle.getKeys(). |
java.util.Locale |
getLocale()
Return the
Locale for this HybrisResourceBundle. |
protected java.lang.Object |
handleGetObject(java.lang.String key)
Implementation of
ResourceBundle.handleGetObject(String). |
void |
setObject(java.lang.String key,
java.io.Serializable value)
Puts a serializable object with the specified key into the resource bundle.
|
void |
setParent(java.util.ResourceBundle parent)
Overrides setParent of ResourceBundle, but requires a
HybrisResourceBundle as parameter. |
void |
setString(java.lang.String key,
java.lang.String value)
Puts a
String with the specified key into the resource bundle. |
public HybrisResourceBundle(java.util.Locale locale)
HybrisResourceBundle instance for the specified Locale.locale - the Localeprotected java.lang.Object handleGetObject(java.lang.String key)
throws java.util.MissingResourceException
ResourceBundle.handleGetObject(String).handleGetObject in class java.util.ResourceBundlekey - the key of the Object, which should be returned. If there exists no resources for the
specified key, Null is returned.java.util.MissingResourceExceptionResourceBundle.handleGetObject(String)public java.util.Enumeration getKeys()
ResourceBundle.getKeys().getKeys in class java.util.ResourceBundleResourceBundle.getKeys()public void setParent(java.util.ResourceBundle parent)
HybrisResourceBundle as parameter. The parent
will provide fall-back functionality if a resource is not found in the current bundle.setParent in class java.util.ResourceBundleparent - a HybrisResourceBundle objectjava.lang.IllegalArgumentException - if parent is not a HybrisResourceBundle instance.public java.util.Locale getLocale()
Locale for this HybrisResourceBundle.getLocale in class java.util.ResourceBundleLocale of this HybrisResourceBundlepublic void setObject(java.lang.String key,
java.io.Serializable value)
key - the key of the new entryvalue - the value of the new entryjava.lang.IllegalArgumentException - if key is nullpublic void setString(java.lang.String key,
java.lang.String value)
String with the specified key into the resource bundle. If there exists an entry for the
specified key, this entry will be overwritten.key - the key of the new entryvalue - the String value of the new entryjava.lang.IllegalArgumentException - if key is nullCopyright © 2018 SAP SE. All Rights Reserved.