Package com.ibm.icu.impl
Class ResourceBundleWrapper
- java.lang.Object
-
- java.util.ResourceBundle
-
- com.ibm.icu.util.UResourceBundle
-
- com.ibm.icu.impl.ResourceBundleWrapper
-
public final class ResourceBundleWrapper extends UResourceBundle
just a wrapper for Java ListResourceBundles and
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
ResourceBundleWrapper.Loader
Loader for bundle instances, for caching.
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
baseName
private java.util.ResourceBundle
bundle
private static CacheBase<java.lang.String,ResourceBundleWrapper,ResourceBundleWrapper.Loader>
BUNDLE_CACHE
private static boolean
DEBUG
private java.util.List<java.lang.String>
keys
private java.lang.String
localeID
-
Fields inherited from class com.ibm.icu.util.UResourceBundle
ARRAY, BINARY, INT, INT_VECTOR, NONE, STRING, TABLE
-
-
Constructor Summary
Constructors Modifier Constructor Description private
ResourceBundleWrapper(java.util.ResourceBundle bundle)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.String
getBaseName()
Returns the base name of the resource bundlestatic ResourceBundleWrapper
getBundleInstance(java.lang.String baseName, java.lang.String localeID, java.lang.ClassLoader root, boolean disableFallback)
java.util.Enumeration<java.lang.String>
getKeys()
Returns the keys in this bundle as an enumerationprotected java.lang.String
getLocaleID()
Returns the localeIDUResourceBundle
getParent()
Returns the parent bundleULocale
getULocale()
Returns the RFC 3066 conformant locale id of this resource bundle.protected java.lang.Object
handleGetObject(java.lang.String aKey)
private void
initKeysVector()
private static ResourceBundleWrapper
instantiateBundle(java.lang.String baseName, java.lang.String localeID, java.lang.String defaultID, java.lang.ClassLoader root, boolean disableFallback)
private static boolean
localeIDStartsWithLangSubtag(java.lang.String localeID, java.lang.String lang)
-
Methods inherited from class com.ibm.icu.util.UResourceBundle
findTopLevel, findTopLevel, get, get, getBinary, getBinary, getBundleInstance, getBundleInstance, getBundleInstance, getBundleInstance, getBundleInstance, getBundleInstance, getBundleInstance, getBundleInstance, getInt, getIntVector, getIterator, getKey, getLocale, getSize, getString, getString, getStringArray, getType, getUInt, getVersion, handleGet, handleGet, handleGetKeys, handleGetStringArray, handleKeySet, instantiateBundle, isTopLevelResource, keySet
-
-
-
-
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
-
BUNDLE_CACHE
private static CacheBase<java.lang.String,ResourceBundleWrapper,ResourceBundleWrapper.Loader> BUNDLE_CACHE
-
DEBUG
private static final boolean DEBUG
-
-
Method Detail
-
handleGetObject
protected java.lang.Object handleGetObject(java.lang.String aKey)
Description copied from class:UResourceBundle
- Overrides:
handleGetObject
in classUResourceBundle
-
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 classUResourceBundle
- 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 classUResourceBundle
- 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 classUResourceBundle
- 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 classUResourceBundle
- Returns:
- the locale of this resource bundle
-
getParent
public UResourceBundle getParent()
Description copied from class:UResourceBundle
Returns the parent bundle- Specified by:
getParent
in classUResourceBundle
- Returns:
- The parent 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)
-
-