org.apache.cxf.common.i18n
Class BundleUtils

java.lang.Object
  extended by org.apache.cxf.common.i18n.BundleUtils

public final class BundleUtils
extends java.lang.Object

A container for static utility methods related to resource bundle naming conventons.


Method Summary
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getBundleName

public static java.lang.String getBundleName(java.lang.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

getBundleName

public 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.

Parameters:
cls - the Class requiring the bundle
Returns:
an appropriate ResourceBundle name

getBundle

public static java.util.ResourceBundle getBundle(java.lang.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

getBundle

public 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.

Parameters:
cls - the Class requiring the bundle
name - the name of the resource
Returns:
an appropriate ResourceBundle


Apache CXF