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>
public class ResBundleSubclassProvider extends ResourceBundleProvider<ResourceBundle>
This class provides resource bundles for various locales which are subclasses ofResourceBundle.
-
-
Field Summary
-
Fields inherited from class de.aristaflow.adept2.util.i18n.ResourceBundleProvider
baseName, cache, classLoader, control
-
-
Constructor Summary
Constructors Constructor Description ResBundleSubclassProvider(Class<?> loadingClass)Creates a new provider for resource bundles being subclasses ofResourceBundlerelative to the designated class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected 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 Detail
-
ResBundleSubclassProvider
public ResBundleSubclassProvider(Class<?> loadingClass)
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 Detail
-
convert
protected ResourceBundle convert(Locale reqLocale, ResourceBundle bundle)
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.
-
-