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