Package com.ibm.icu.impl
Class ICULocaleService.ICUResourceBundleFactory
- java.lang.Object
-
- com.ibm.icu.impl.ICULocaleService.LocaleKeyFactory
-
- com.ibm.icu.impl.ICULocaleService.ICUResourceBundleFactory
-
- All Implemented Interfaces:
ICUService.Factory
- Enclosing class:
- ICULocaleService
public static class ICULocaleService.ICUResourceBundleFactory extends ICULocaleService.LocaleKeyFactory
A LocaleKeyFactory that creates a service based on the ICU locale data. This is a base class for most ICU factories. Subclasses instantiate it with a constructor that takes a bundle name, which determines the supported IDs. Subclasses then override handleCreate to create the actual service object. The default implementation returns a resource bundle.
-
-
Field Summary
Fields Modifier and Type Field Description protected StringbundleName-
Fields inherited from class com.ibm.icu.impl.ICULocaleService.LocaleKeyFactory
INVISIBLE, name, visible, VISIBLE
-
-
Constructor Summary
Constructors Constructor Description ICUResourceBundleFactory()Convenience constructor that uses the main ICU bundle name.ICUResourceBundleFactory(String bundleName)A service factory based on ICU resource data in resources with the given name.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Set<String>getSupportedIDs()Return the supported IDs.protected ObjecthandleCreate(ULocale loc, int kind, ICUService service)Create the service.protected ClassLoaderloader()StringtoString()For debugging.voidupdateVisibleIDs(Map<String,ICUService.Factory> result)Override of superclass method.-
Methods inherited from class com.ibm.icu.impl.ICULocaleService.LocaleKeyFactory
create, getDisplayName, handlesKey, isSupportedID
-
-
-
-
Field Detail
-
bundleName
protected final String bundleName
-
-
Constructor Detail
-
ICUResourceBundleFactory
public ICUResourceBundleFactory()
Convenience constructor that uses the main ICU bundle name.
-
ICUResourceBundleFactory
public ICUResourceBundleFactory(String bundleName)
A service factory based on ICU resource data in resources with the given name.
-
-
Method Detail
-
getSupportedIDs
protected Set<String> getSupportedIDs()
Return the supported IDs. This is the set of all locale names for the bundleName.- Overrides:
getSupportedIDsin classICULocaleService.LocaleKeyFactory
-
updateVisibleIDs
public void updateVisibleIDs(Map<String,ICUService.Factory> result)
Override of superclass method.- Specified by:
updateVisibleIDsin interfaceICUService.Factory- Overrides:
updateVisibleIDsin classICULocaleService.LocaleKeyFactory
-
handleCreate
protected Object handleCreate(ULocale loc, int kind, ICUService service)
Create the service. The default implementation returns the resource bundle for the locale, ignoring kind, and service.- Overrides:
handleCreatein classICULocaleService.LocaleKeyFactory
-
loader
protected ClassLoader loader()
-
toString
public String toString()
Description copied from class:ICULocaleService.LocaleKeyFactoryFor debugging.- Overrides:
toStringin classICULocaleService.LocaleKeyFactory- Returns:
- a printable representation of this object.
-
-