@Service(value=BundleFactory.class) public class DefaultBundleFactory extends Object implements BundleFactory
| Constructor and Description |
|---|
DefaultBundleFactory()
Creates the bundle factory.
|
| Modifier and Type | Method and Description |
|---|---|
protected List<ResourceBundleControlProvider> |
createProviders()
Creates a list of providers.
|
ResourceBundle |
findBundle(String baseName)
Finds a resource bundle using the specified base name, the default locale, and the caller's class loader.
|
ResourceBundle |
findBundle(String baseName,
Locale locale)
Finds a resource bundle using the specified base name and locale, and the caller's class loader.
|
ResourceBundle |
findBundle(String baseName,
Locale locale,
ClassLoader loader)
Finds a resource bundle using the specified base name, locale, and class loader.
|
ClassLoader |
getClassLoader()
Gets the classloader to load the bundles.
|
ResourceBundle.Control |
getControl(String baseName)
Gets the control to load the bundle.
|
List<ResourceBundleControlProvider> |
getProviders()
Gets the control providers.
Method can be used to add a provider explicitly. |
void |
setClassLoader(ClassLoader classLoader)
Sets the classloader to load the bundles.
If set, this classloader will be used for BundleFactory.getBundle(java.lang.String) and
BundleFactory.getBundle(java.lang.String, java.util.Locale). |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetBundle, getBundle, getBundle, getInstancepublic ClassLoader getClassLoader()
BundleFactorygetClassLoader in interface BundleFactorypublic void setClassLoader(ClassLoader classLoader)
BundleFactoryBundleFactory.getBundle(java.lang.String) and
BundleFactory.getBundle(java.lang.String, java.util.Locale).setClassLoader in interface BundleFactoryclassLoader - the classloader, null if defaultpublic final List<ResourceBundleControlProvider> getProviders()
BundleFactorygetProviders in interface BundleFactorypublic ResourceBundle.Control getControl(String baseName)
BundleFactorygetControl in interface BundleFactorybaseName - the bundle basenamepublic ResourceBundle findBundle(String baseName)
BundleFactoryfindBundle in interface BundleFactorybaseName - the base name of the resource bundle, a fully qualified class namepublic ResourceBundle findBundle(String baseName, Locale locale)
BundleFactoryfindBundle in interface BundleFactorybaseName - the base name of the resource bundle, a fully qualified class namelocale - the locale for which a resource bundle is desiredpublic ResourceBundle findBundle(String baseName, Locale locale, ClassLoader loader)
BundleFactoryfindBundle in interface BundleFactorybaseName - the base name of the resource bundle, a fully qualified class namelocale - the locale for which a resource bundle is desiredloader - the class loader from which to load the resource bundleprotected List<ResourceBundleControlProvider> createProviders()
Tentackle - a domain driven enterprise framework