Package org.apache.cxf.common.i18n
Class BundleUtils
- java.lang.Object
- 
- org.apache.cxf.common.i18n.BundleUtils
 
- 
 public final class BundleUtils extends Object A container for static utility methods related to resource bundle naming conventons.
- 
- 
Method SummaryAll Methods Static Methods Concrete Methods Modifier and Type Method Description static ResourceBundlegetBundle(Class<?> cls)Encapsulates the logic related to locating the default resource bundle for a class.static ResourceBundlegetBundle(Class<?> cls, String name)Encapsulates the logic related to locating the resource bundle with the given relative name for a class.static StringgetBundleName(Class<?> cls)Encapsulates the logic related to naming the default resource bundle for a class.static StringgetBundleName(Class<?> cls, String name)Encapsulates the logic related to naming the resource bundle with the given relative name for a class.static StringgetFormattedString(ResourceBundle b, String key, Object... params)Encapsulates the logic to format a string based on the key in the resource bundle
 
- 
- 
- 
Method Detail- 
getBundleNamepublic static String getBundleName(Class<?> cls) Encapsulates the logic related to naming the default resource bundle for a class.- Parameters:
- cls- the Class requiring the bundle
- Returns:
- an appropriate ResourceBundle name
 
 - 
getBundleNamepublic static String getBundleName(Class<?> cls, String name) Encapsulates the logic related to naming the resource bundle with the given relative name for a class.- Parameters:
- cls- the Class requiring the bundle
- Returns:
- an appropriate ResourceBundle name
 
 - 
getBundlepublic static ResourceBundle getBundle(Class<?> cls) Encapsulates the logic related to locating the default resource bundle for a class.- Parameters:
- cls- the Class requiring the bundle
- Returns:
- an appropriate ResourceBundle
 
 - 
getBundlepublic static ResourceBundle getBundle(Class<?> cls, String name) Encapsulates the logic related to locating the resource bundle with the given relative name for a class.- Parameters:
- cls- the Class requiring the bundle
- name- the name of the resource
- Returns:
- an appropriate ResourceBundle
 
 - 
getFormattedStringpublic static String getFormattedString(ResourceBundle b, String key, Object... params) Encapsulates the logic to format a string based on the key in the resource bundle- Parameters:
- b- Resource bundle to use
- key- The key in the bundle to lookup
- params- the params to expand into the string
- Returns:
- the formatted string
 
 
- 
 
-