Class ResourceBundleWrapper


  • public final class ResourceBundleWrapper
    extends UResourceBundle
    just a wrapper for Java ListResourceBundles and
    • Field Detail

      • bundle

        private java.util.ResourceBundle bundle
      • localeID

        private java.lang.String localeID
      • baseName

        private java.lang.String baseName
      • keys

        private java.util.List<java.lang.String> keys
      • DEBUG

        private static final boolean DEBUG
    • Constructor Detail

      • ResourceBundleWrapper

        private ResourceBundleWrapper​(java.util.ResourceBundle bundle)
    • Method Detail

      • getKeys

        public java.util.Enumeration<java.lang.String> getKeys()
        Description copied from class: UResourceBundle
        Returns the keys in this bundle as an enumeration
        Overrides:
        getKeys in class UResourceBundle
        Returns:
        an enumeration containing key strings, which is empty if this is not a bundle or a table resource
      • initKeysVector

        private void initKeysVector()
      • getLocaleID

        protected java.lang.String getLocaleID()
        Description copied from class: UResourceBundle
        Returns the localeID
        Specified by:
        getLocaleID in class UResourceBundle
        Returns:
        The string representation of the localeID
      • getBaseName

        protected java.lang.String getBaseName()
        Description copied from class: UResourceBundle
        Returns the base name of the resource bundle
        Specified by:
        getBaseName in class UResourceBundle
        Returns:
        The string representation of the base name
      • getULocale

        public ULocale getULocale()
        Description copied from class: UResourceBundle
        Returns the RFC 3066 conformant locale id of this resource bundle. This method can be used after a call to getBundleInstance() to determine whether the resource bundle returned really corresponds to the requested locale or is a fallback.
        Specified by:
        getULocale in class UResourceBundle
        Returns:
        the locale of this resource bundle
      • getBundleInstance

        public static ResourceBundleWrapper getBundleInstance​(java.lang.String baseName,
                                                              java.lang.String localeID,
                                                              java.lang.ClassLoader root,
                                                              boolean disableFallback)
      • localeIDStartsWithLangSubtag

        private static boolean localeIDStartsWithLangSubtag​(java.lang.String localeID,
                                                            java.lang.String lang)
      • instantiateBundle

        private static ResourceBundleWrapper instantiateBundle​(java.lang.String baseName,
                                                               java.lang.String localeID,
                                                               java.lang.String defaultID,
                                                               java.lang.ClassLoader root,
                                                               boolean disableFallback)