public class ResourceBundles
extends java.lang.Object
Constructor and Description |
---|
ResourceBundles() |
Modifier and Type | Method and Description |
---|---|
static java.util.ResourceBundle |
getBundle(java.lang.String bundleName)
Get a resource bundle
|
static java.lang.String |
getCounterGroupName(java.lang.String group,
java.lang.String defaultValue)
Get the counter group display name
|
static java.lang.String |
getCounterName(java.lang.String group,
java.lang.String counter,
java.lang.String defaultValue)
Get the counter display name
|
static <T> T |
getValue(java.lang.String bundleName,
java.lang.String key,
java.lang.String suffix,
T defaultValue)
Get a resource given bundle name and key
|
public static java.util.ResourceBundle getBundle(java.lang.String bundleName)
bundleName
- of the resourcejava.util.MissingResourceException
public static <T> T getValue(java.lang.String bundleName, java.lang.String key, java.lang.String suffix, T defaultValue)
T
- type of the resourcebundleName
- name of the resource bundlekey
- to lookup the resourcesuffix
- for the key to lookupdefaultValue
- of the resourcejava.lang.ClassCastException
- if the resource found doesn't match Tpublic static java.lang.String getCounterGroupName(java.lang.String group, java.lang.String defaultValue)
group
- the group name to lookupdefaultValue
- of the grouppublic static java.lang.String getCounterName(java.lang.String group, java.lang.String counter, java.lang.String defaultValue)
group
- the counter group name for the countercounter
- the counter name to lookupdefaultValue
- of the counterCopyright © 2009 The Apache Software Foundation