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 java.lang.String
bundleName
-
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(java.lang.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 java.util.Set<java.lang.String>
getSupportedIDs()
Return the supported IDs.protected java.lang.Object
handleCreate(ULocale loc, int kind, ICUService service)
Create the service.protected java.lang.ClassLoader
loader()
java.lang.String
toString()
For debugging.void
updateVisibleIDs(java.util.Map<java.lang.String,ICUService.Factory> result)
Override of superclass method.-
Methods inherited from class com.ibm.icu.impl.ICULocaleService.LocaleKeyFactory
create, getDisplayName, handlesKey, isSupportedID
-
-
-
-
Constructor Detail
-
ICUResourceBundleFactory
public ICUResourceBundleFactory()
Convenience constructor that uses the main ICU bundle name.
-
ICUResourceBundleFactory
public ICUResourceBundleFactory(java.lang.String bundleName)
A service factory based on ICU resource data in resources with the given name.
-
-
Method Detail
-
getSupportedIDs
protected java.util.Set<java.lang.String> getSupportedIDs()
Return the supported IDs. This is the set of all locale names for the bundleName.- Overrides:
getSupportedIDs
in classICULocaleService.LocaleKeyFactory
-
updateVisibleIDs
public void updateVisibleIDs(java.util.Map<java.lang.String,ICUService.Factory> result)
Override of superclass method.- Specified by:
updateVisibleIDs
in interfaceICUService.Factory
- Overrides:
updateVisibleIDs
in classICULocaleService.LocaleKeyFactory
-
handleCreate
protected java.lang.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:
handleCreate
in classICULocaleService.LocaleKeyFactory
-
loader
protected java.lang.ClassLoader loader()
-
toString
public java.lang.String toString()
Description copied from class:ICULocaleService.LocaleKeyFactory
For debugging.- Overrides:
toString
in classICULocaleService.LocaleKeyFactory
-
-