Package de.aristaflow.adept2.util.i18n
Class ResBundleSubclassProvider
java.lang.Object
de.aristaflow.adept2.util.i18n.ResourceBundleProvider<ResourceBundle>
de.aristaflow.adept2.util.i18n.ResBundleSubclassProvider
- All Implemented Interfaces:
Function<Locale,ResourceBundle>
This class provides resource bundles for various locales which are subclasses of
ResourceBundle.-
Field Summary
Fields inherited from class de.aristaflow.adept2.util.i18n.ResourceBundleProvider
baseName, cache, classLoader, control -
Constructor Summary
ConstructorsConstructorDescriptionResBundleSubclassProvider(Class<?> loadingClass) Creates a new provider for resource bundles being subclasses ofResourceBundlerelative to the designated class. -
Method Summary
Modifier and TypeMethodDescriptionprotected ResourceBundleconvert(Locale reqLocale, ResourceBundle bundle) Converts the designated resource bundle to the corresponding localising object.Methods inherited from class de.aristaflow.adept2.util.i18n.ResourceBundleProvider
apply, forLocale
-
Constructor Details
-
ResBundleSubclassProvider
Creates a new provider for resource bundles being subclasses ofResourceBundlerelative to the designated class.- Parameters:
loadingClass- The class with which to load the resource bundle.
-
-
Method Details
-
convert
Description copied from class:ResourceBundleProviderConverts the designated resource bundle to the corresponding localising object.- Specified by:
convertin classResourceBundleProvider<ResourceBundle>- Parameters:
reqLocale- The requested locale. This may differ from the locale of the resource bundle.bundle- The resource bundle for which to get the corresponding localising object.- Returns:
- The localising object for the designated resource bundle.
-