public class I18NResourceBundle
extends java.util.ResourceBundle
| Modifier and Type | Field and Description |
|---|---|
private java.lang.ClassLoader |
classLoader |
private java.util.ResourceBundle |
delegate |
private java.lang.String |
name |
| Modifier | Constructor and Description |
|---|---|
private |
I18NResourceBundle(java.lang.String name,
java.lang.ClassLoader cl)
Create a resource bundle for the given name.
|
| Modifier and Type | Method and Description |
|---|---|
static I18NResourceBundle |
getBundleForClass(java.lang.Class c)
Get a package-specific resource bundle for a class containing localization data.
|
java.util.Enumeration |
getKeys()
A required internal method for ResourceBundle.
|
java.lang.String |
getName()
Returns the name of this bundle (useful for methods using bundle name instead of
instance, such as
Logger creation, |
java.lang.String |
getOptionalString(java.lang.String key)
Get an entry from the bundle, returning null if it is not found.
|
java.lang.String |
getString(java.lang.String key,
java.lang.Object... args)
Get an entry from the resource bundle.
|
java.lang.String |
getString(java.lang.String key,
java.lang.Object arg)
Get an entry from the resource bundle.
|
protected java.lang.Object |
handleGetObject(java.lang.String key)
A required internal method for ResourceBundle.
|
private java.lang.String name
private java.util.ResourceBundle delegate
private java.lang.ClassLoader classLoader
private I18NResourceBundle(java.lang.String name,
java.lang.ClassLoader cl)
name - The name of the actual resource bundle to use.public static I18NResourceBundle getBundleForClass(java.lang.Class c)
c - the class for which to obtain the resource bundlepublic java.lang.String getString(java.lang.String key,
java.lang.Object arg)
key - the name of the entry to be returnedarg - an argument to be formatted into the result using
MessageFormat.format(java.lang.Object[], java.lang.StringBuffer, java.text.FieldPosition)public java.lang.String getString(java.lang.String key,
java.lang.Object... args)
key - the name of the entry to be returnedargs - an array of arguments to be formatted into the result using
MessageFormat.format(java.lang.Object[], java.lang.StringBuffer, java.text.FieldPosition)public java.lang.String getOptionalString(java.lang.String key)
key - the name of the entry to be returnedprotected java.lang.Object handleGetObject(java.lang.String key)
throws java.util.MissingResourceException
handleGetObject in class java.util.ResourceBundlejava.util.MissingResourceExceptionpublic java.util.Enumeration getKeys()
getKeys in class java.util.ResourceBundlepublic java.lang.String getName()
Logger creation,