public class ResourceBundleManager extends Object
This class encapsulate error message localization using Java bundle.
| Modifier and Type | Method and Description |
|---|---|
Set<String> |
getKeySet() |
String |
getLocalizedMessage(String key)
Returns the localized error message for the given message key
|
String |
getLocalizedMessage(String key,
Object... args)
Returns the localized error message for the given message key and use
the arguments to returned a formatted result string.
|
ResourceBundle |
getResourceBundle() |
static ResourceBundleManager |
getSingleton(String bundleName) |
void |
reload()
Reload the error message bundle based on the current locale.
|
public void reload()
public String getLocalizedMessage(String key)
key - the message keypublic String getLocalizedMessage(String key, Object... args)
key - message keyargs - arguments of messagepublic ResourceBundle getResourceBundle()
public static ResourceBundleManager getSingleton(String bundleName)
Copyright © 2020. All rights reserved.