public class ResourceBundleControlUtf8WithNlsBundleSupport extends ResourceBundleControlUtf8
ResourceBundleControlUtf8 with support for NlsBundle to prevent exception overhead. If
NlsBundles are used to create NlsMessages and
localization takes place for a
Locale where no ResourceBundle is available then every lookup will cause a
MissingResourceException. As this is causing massive overhead when many localizations take place,
we use this control class with the following strategy:newBundle(String, Locale, String, ClassLoader, boolean) is called with Locale.ROOT and
there is no regular ResourceBundle available, but an NlsBundle with the given baseName it is
converted to a ResourceBundle and returned.| Modifier and Type | Field and Description |
|---|---|
static ResourceBundleControlUtf8WithNlsBundleSupport |
INSTANCE
The singleton instance.
|
FORMAT_CLASS, FORMAT_DEFAULT, FORMAT_PROPERTIES, TTL_DONT_CACHE, TTL_NO_EXPIRATION_CONTROL| Constructor and Description |
|---|
ResourceBundleControlUtf8WithNlsBundleSupport()
The constructor.
|
| Modifier and Type | Method and Description |
|---|---|
ResourceBundle |
newBundle(String baseName,
Locale locale,
String format,
ClassLoader loader,
boolean reload) |
getCandidateLocales, getControl, getFallbackLocale, getFormats, getNoFallbackControl, getTimeToLive, needsReload, toBundleName, toResourceNamepublic static final ResourceBundleControlUtf8WithNlsBundleSupport INSTANCE
public ResourceBundleControlUtf8WithNlsBundleSupport()
public ResourceBundle newBundle(String baseName, Locale locale, String format, ClassLoader loader, boolean reload) throws IllegalAccessException, InstantiationException, IOException
newBundle in class ResourceBundleControlUtf8IllegalAccessExceptionInstantiationExceptionIOExceptionCopyright © 2001–2016 mmm-Team. All rights reserved.