public final class XResourceBundle
extends java.util.ResourceBundle
Constructor and Description |
---|
XResourceBundle(java.util.ResourceBundle bundle)
Create a new XResourceBundle that wraps an existing
ResourceBundle.
|
Modifier and Type | Method and Description |
---|---|
java.util.Enumeration<java.lang.String> |
getKeys()
Returns an enumeration of the keys.
|
java.lang.String |
getString(java.lang.String key,
java.lang.String defaultValue)
Get a string for the given key from this resource bundle, applying a
default if not found.
|
static XResourceBundle |
getXResourceBundle(java.lang.String baseName)
Analogous to the equivalent getBundle method in the JDK's
ResourceBundle class.
|
static XResourceBundle |
getXResourceBundle(java.lang.String baseName,
java.util.Locale locale)
Analogous to the equivalent getBundle method in the JDK's
ResourceBundle class.
|
static XResourceBundle |
getXResourceBundle(java.lang.String baseName,
java.util.Locale locale,
java.lang.ClassLoader classLoader)
Analogous to the equivalent getBundle method in the JDK's
ResourceBundle class.
|
protected java.lang.Object |
handleGetObject(java.lang.String key)
Gets an object for the given key from this resource bundle.
|
public XResourceBundle(java.util.ResourceBundle bundle)
bundle
- the ResourceBundle to wrap.public static XResourceBundle getXResourceBundle(java.lang.String baseName)
baseName
- base name of the bundle to retrieve, a fully
qualified class namejava.lang.NullPointerException
- if baseName is nulljava.util.MissingResourceException
- no bundle availablepublic static XResourceBundle getXResourceBundle(java.lang.String baseName, java.util.Locale locale)
baseName
- base name of the bundle to retrieve, a fully
qualified class namelocale
- the locale for which a resource bundle is desiredjava.lang.NullPointerException
- if baseName is nulljava.util.MissingResourceException
- no bundle availablepublic static XResourceBundle getXResourceBundle(java.lang.String baseName, java.util.Locale locale, java.lang.ClassLoader classLoader)
baseName
- base name of the bundle to retrieve, a fully
qualified class namelocale
- the locale for which a resource bundle is desiredclassLoader
- class loader to usejava.lang.NullPointerException
- if baseName is nulljava.util.MissingResourceException
- no bundle availablepublic java.util.Enumeration<java.lang.String> getKeys()
getKeys
in class java.util.ResourceBundle
public java.lang.String getString(java.lang.String key, java.lang.String defaultValue)
key
- the key for the desired stringdefaultValue
- the default value, if not foundprotected java.lang.Object handleGetObject(java.lang.String key)
handleGetObject
in class java.util.ResourceBundle
key
- the key for the desired objectjava.lang.NullPointerException
- if key
is null