|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.tez.common.counters.ResourceBundles
public class ResourceBundles
Helper class to handle resource bundles in a saner way
| Constructor Summary | |
|---|---|
ResourceBundles()
|
|
| Method Summary | ||
|---|---|---|
static ResourceBundle |
getBundle(String bundleName)
Get a resource bundle |
|
static String |
getCounterGroupName(String group,
String defaultValue)
Get the counter group display name |
|
static String |
getCounterName(String group,
String counter,
String defaultValue)
Get the counter display name |
|
static
|
getValue(String bundleName,
String key,
String suffix,
T defaultValue)
Get a resource given bundle name and key |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ResourceBundles()
| Method Detail |
|---|
public static ResourceBundle getBundle(String bundleName)
bundleName - of the resource
MissingResourceException
public static <T> T getValue(String bundleName,
String key,
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 resource
ClassCastException - if the resource found doesn't match T
public static String getCounterGroupName(String group,
String defaultValue)
group - the group name to lookupdefaultValue - of the group
public static String getCounterName(String group,
String counter,
String defaultValue)
group - the counter group name for the countercounter - the counter name to lookupdefaultValue - of the counter
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||