Top Description Inners Fields Constructors Methods
com.ibm.icu.impl

public final Class ResourceBundleWrapper

extends UResourceBundle
Class Inheritance
Imports
java.io.InputStream, java.util.ArrayList, .Collections, .Enumeration, .List, .MissingResourceException, .PropertyResourceBundle, .ResourceBundle, com.ibm.icu.util.ULocale, .UResourceBundle

just a wrapper for Java ListResourceBundles and
Author
ram

Nested and Inner Type Summary

Modifier and TypeClass and Description
private abstract static class
ResourceBundleWrapper.Loader

Loader for bundle instances, for caching.

Field Summary

Modifier and TypeField and Description
private String
private ResourceBundle
private static CacheBase<String, ResourceBundleWrapper, ResourceBundleWrapper.Loader>
private static final boolean
private List<String>
private String
Inherited from com.ibm.icu.util.UResourceBundle:
ARRAYBINARYINTINT_VECTORNONESTRINGTABLE

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
protected String
public static ResourceBundleWrapper
getBundleInstance(String
string containing the name of the data package. If null the default ICU package name is used.
baseName
,
String
the locale for which a resource bundle is desired
localeID
,
ClassLoader
the class object from which to load the resource bundle
root
,
boolean
Option to disable locale inheritance. If true the fallback chain will not be built.
disableFallback
)

Hides com.ibm.icu.util.UResourceBundle.getBundleInstance.

ICU

public Enumeration<String>
getKeys()

Overrides com.ibm.icu.util.UResourceBundle.getKeys.

Returns the keys in this bundle as an enumeration
protected String
public UResourceBundle
public ULocale
protected Object
handleGetObject(String
the key for the desired object
aKey
)

Overrides com.ibm.icu.util.UResourceBundle.handleGetObject.

Gets an object for the given key from this resource bundle.
private void
private static ResourceBundleWrapper
instantiateBundle(final String baseName, final String localeID, final String defaultID, final ClassLoader root, final boolean disableFallback)

private static boolean
Inherited from com.ibm.icu.util.UResourceBundle:
findTopLevelfindTopLevelgetgetgetBinarygetBinarygetBundleInstancegetBundleInstancegetBundleInstancegetBundleInstancegetBundleInstancegetBundleInstancegetBundleInstancegetBundleInstancegetIntgetIntVectorgetIteratorgetKeygetLocalegetSizegetStringgetStringgetStringArraygetTypegetUIntgetVersionhandleGethandleGethandleGetKeyshandleGetStringArrayhandleKeySetinstantiateBundleisTopLevelResourcekeySet

Field Detail

baseNameback to summary
private String baseName
bundleback to summary
private ResourceBundle bundle
BUNDLE_CACHEback to summary
private static CacheBase<String, ResourceBundleWrapper, ResourceBundleWrapper.Loader> BUNDLE_CACHE
DEBUGback to summary
private static final boolean DEBUG
keysback to summary
private List<String> keys
localeIDback to summary
private String localeID

Constructor Detail

ResourceBundleWrapperback to summary
private ResourceBundleWrapper(ResourceBundle bundle)

Method Detail

getBaseNameback to summary
protected String getBaseName()

Implements abstract com.ibm.icu.util.UResourceBundle.getBaseName.

Doc from com.ibm.icu.util.UResourceBundle.getBaseName.

ICU

Returns the base name of the resource bundle
Returns:String

The string representation of the base name

Annotations
@Override
getBundleInstanceback to summary
public static ResourceBundleWrapper getBundleInstance(String baseName, String localeID, ClassLoader root, boolean disableFallback)

Hides com.ibm.icu.util.UResourceBundle.getBundleInstance.

Doc from com.ibm.icu.util.UResourceBundle.getBundleInstance.

ICU

Creates a resource bundle using the specified base name, locale, and class root.
Parameters
baseName:String

string containing the name of the data package. If null the default ICU package name is used.

localeID:String

the locale for which a resource bundle is desired

root:ClassLoader

the class object from which to load the resource bundle

disableFallback:boolean

Option to disable locale inheritance. If true the fallback chain will not be built.

Returns:ResourceBundleWrapper

a resource bundle for the given base name and locale

getKeysback to summary
public Enumeration<String> getKeys()

Overrides com.ibm.icu.util.UResourceBundle.getKeys.

Doc from com.ibm.icu.util.UResourceBundle.getKeys.

Returns the keys in this bundle as an enumeration

Returns:Enumeration<String>

an enumeration containing key strings, which is empty if this is not a bundle or a table resource

Annotations
@Override
getLocaleIDback to summary
protected String getLocaleID()

Implements abstract com.ibm.icu.util.UResourceBundle.getLocaleID.

Doc from com.ibm.icu.util.UResourceBundle.getLocaleID.

ICU

Returns the localeID
Returns:String

The string representation of the localeID

Annotations
@Override
getParentback to summary
public UResourceBundle getParent()

Implements abstract com.ibm.icu.util.UResourceBundle.getParent.

Doc from com.ibm.icu.util.UResourceBundle.getParent.

ICU

Returns the parent bundle
Returns:UResourceBundle

The parent bundle

Annotations
@Override
getULocaleback to summary
public ULocale getULocale()

Implements abstract com.ibm.icu.util.UResourceBundle.getULocale.

Doc from com.ibm.icu.util.UResourceBundle.getULocale.

ICU

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.
Returns:ULocale

the locale of this resource bundle

Annotations
@Override
handleGetObjectback to summary
protected Object handleGetObject(String aKey)

Overrides com.ibm.icu.util.UResourceBundle.handleGetObject.

Doc from com.ibm.icu.util.UResourceBundle.handleGetObject.

Gets an object for the given key from this resource bundle. Returns null if this resource bundle does not contain an object for the given key.

Parameters
aKey:String

Doc from java.util.ResourceBundle.handleGetObject.

the key for the desired object

Returns:Object

Doc from java.util.ResourceBundle.handleGetObject.

the object for the given key, or null

Annotations
@Override
initKeysVectorback to summary
private void initKeysVector()
instantiateBundleback to summary
private static ResourceBundleWrapper instantiateBundle(final String baseName, final String localeID, final String defaultID, final ClassLoader root, final boolean disableFallback)
localeIDStartsWithLangSubtagback to summary
private static boolean localeIDStartsWithLangSubtag(String localeID, String lang)
com.ibm.icu.impl back to summary

private abstract Class ResourceBundleWrapper.Loader

extends Object
Class Inheritance

Loader for bundle instances, for caching.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
pack-priv abstract ResourceBundleWrapper
load()

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

Loaderback to summary
private Loader()

Method Detail

loadback to summary
pack-priv abstract ResourceBundleWrapper load()