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