Documentation of 'org.clapper.util.misc.XResourceBundle' Java class
XResourceBundle
org.clapper.util.misc

Class XResourceBundle



  • public final class XResourceBundle
    extends java.util.ResourceBundle
    This class is an extended version of the JDK's ResourceBundle class, providing some extra methods. It can be instantiated by wrapping an existing ResourceBundle object, or by using the static getBundle() methods, which are identical to the ResourceBundle versions.
    • Nested Class Summary

      • Nested classes/interfaces inherited from class java.util.ResourceBundle

        java.util.ResourceBundle.Control
    • Constructor Summary

      Constructors 
      Constructor and Description
      XResourceBundle(java.util.ResourceBundle bundle)
      Create a new XResourceBundle that wraps an existing ResourceBundle.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.util.Enumeration<java.lang.String> getKeys()
      Returns an enumeration of the keys.
      java.lang.String getString(java.lang.String key, java.lang.String defaultValue)
      Get a string for the given key from this resource bundle, applying a default if not found.
      static XResourceBundle getXResourceBundle(java.lang.String baseName)
      Analogous to the equivalent getBundle method in the JDK's ResourceBundle class.
      static XResourceBundle getXResourceBundle(java.lang.String baseName, java.util.Locale locale)
      Analogous to the equivalent getBundle method in the JDK's ResourceBundle class.
      static XResourceBundle getXResourceBundle(java.lang.String baseName, java.util.Locale locale, java.lang.ClassLoader classLoader)
      Analogous to the equivalent getBundle method in the JDK's ResourceBundle class.
      • Methods inherited from class java.util.ResourceBundle

        clearCache, clearCache, containsKey, getBaseBundleName, getBundle, getBundle, getBundle, getBundle, getBundle, getBundle, getLocale, getObject, getString, getStringArray, keySet
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • XResourceBundle

        public XResourceBundle(java.util.ResourceBundle bundle)
        Create a new XResourceBundle that wraps an existing ResourceBundle.
        Parameters:
        bundle - the ResourceBundle to wrap.
    • Method Detail

      • getXResourceBundle

        public static XResourceBundle getXResourceBundle(java.lang.String baseName)
        Analogous to the equivalent getBundle method in the JDK's ResourceBundle class.
        Parameters:
        baseName - base name of the bundle to retrieve, a fully qualified class name
        Returns:
        the bundle
        Throws:
        java.lang.NullPointerException - if baseName is null
        java.util.MissingResourceException - no bundle available
      • getXResourceBundle

        public static XResourceBundle getXResourceBundle(java.lang.String baseName,
                                                         java.util.Locale locale)
        Analogous to the equivalent getBundle method in the JDK's ResourceBundle class.
        Parameters:
        baseName - base name of the bundle to retrieve, a fully qualified class name
        locale - the locale for which a resource bundle is desired
        Returns:
        the bundle
        Throws:
        java.lang.NullPointerException - if baseName is null
        java.util.MissingResourceException - no bundle available
      • getXResourceBundle

        public static XResourceBundle getXResourceBundle(java.lang.String baseName,
                                                         java.util.Locale locale,
                                                         java.lang.ClassLoader classLoader)
        Analogous to the equivalent getBundle method in the JDK's ResourceBundle class.
        Parameters:
        baseName - base name of the bundle to retrieve, a fully qualified class name
        locale - the locale for which a resource bundle is desired
        classLoader - class loader to use
        Returns:
        the bundle
        Throws:
        java.lang.NullPointerException - if baseName is null
        java.util.MissingResourceException - no bundle available
      • getKeys

        public java.util.Enumeration<java.lang.String> getKeys()
        Returns an enumeration of the keys.
        Specified by:
        getKeys in class java.util.ResourceBundle
        Returns:
        the enumeration of the keys
      • getString

        public java.lang.String getString(java.lang.String key,
                                          java.lang.String defaultValue)
        Get a string for the given key from this resource bundle, applying a default if not found. There's no equivalent for this method in the ResourceBundle class.
        Parameters:
        key - the key for the desired string
        defaultValue - the default value, if not found
        Returns:
        the value for the key, which may be the default

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.