public final class BundleUtils
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static java.util.ResourceBundle |
getBundle(java.lang.Class<?> cls)
Encapsulates the logic related to locating the default resource bundle
for a class.
|
static java.util.ResourceBundle |
getBundle(java.lang.Class<?> cls,
java.lang.String name)
Encapsulates the logic related to locating the resource bundle with the given
relative name for a class.
|
static java.lang.String |
getBundleName(java.lang.Class<?> cls)
Encapsulates the logic related to naming the default resource bundle
for a class.
|
static java.lang.String |
getBundleName(java.lang.Class<?> cls,
java.lang.String name)
Encapsulates the logic related to naming the resource bundle
with the given relative name for a class.
|
static java.lang.String |
getFormattedString(java.util.ResourceBundle b,
java.lang.String key,
java.lang.Object... params)
Encapsulates the logic to format a string based on the key in the resource bundle
|
public static java.lang.String getBundleName(java.lang.Class<?> cls)
cls - the Class requiring the bundlepublic static java.lang.String getBundleName(java.lang.Class<?> cls,
java.lang.String name)
cls - the Class requiring the bundlepublic static java.util.ResourceBundle getBundle(java.lang.Class<?> cls)
cls - the Class requiring the bundlepublic static java.util.ResourceBundle getBundle(java.lang.Class<?> cls,
java.lang.String name)
cls - the Class requiring the bundlename - the name of the resourcepublic static java.lang.String getFormattedString(java.util.ResourceBundle b,
java.lang.String key,
java.lang.Object... params)
b - Resource bundle to usekey - The key in the bundle to lookupparams - the params to expand into the string