public class ResourceBundleExtensions extends Object
ResourceBundleExtensions holds extension methods for the
class ResourceBundle.| Modifier and Type | Field and Description |
|---|---|
protected static org.apache.log4j.Logger |
LOGGER
The Constant logger.
|
| Constructor and Description |
|---|
ResourceBundleExtensions() |
| Modifier and Type | Method and Description |
|---|---|
static String |
getString(BundleKey bundleKey)
|
static String |
getString(ResourceBundle resourceBundle,
String key,
Object... parameters)
Gets the string from the given
ResourceBundle object. |
static String |
getString(ResourceBundle resourceBundle,
String key,
String defaultValue)
Gets the string from the given
ResourceBundle object. |
static String |
getString(ResourceBundle resourceBundle,
String key,
String defaultValue,
Object... parameters)
Gets the string from the given
ResourceBundle object. |
static String |
getString(String baseName,
Locale locale,
String key)
Resolves from the given base name and locale the
ResourceBundle
and get the String from the given key and parameters. |
static String |
getString(String baseName,
Locale locale,
String key,
Object... parameters)
Resolves from the given base name and locale the
ResourceBundle
and get the String from the given key and parameters. |
static String |
getString(String baseName,
Locale locale,
String key,
String defaultValue)
Resolves from the given base name and locale the
ResourceBundle
and get the String from the given key and parameters. |
static String |
getString(String baseName,
Locale locale,
String key,
String defaultValue,
Object... parameters)
Resolves from the given base name and locale the
ResourceBundle
and get the String from the given key and parameters. |
static String |
getStringQuietly(ResourceBundle resourceBundle,
String key,
Object... parameters)
Gets the string from the given
ResourceBundle object. |
static String |
getStringQuietly(ResourceBundle resourceBundle,
String key,
String defaultValue)
Gets the string from the given
ResourceBundle object. |
static String |
getStringQuietly(ResourceBundle resourceBundle,
String key,
String defaultValue,
Object... parameters)
Gets the string from the given
ResourceBundle object. |
static String |
getStringQuietly(String baseName,
Locale locale,
String key,
String defaultValue,
Object... parameters)
Resolves from the given base name and locale the
ResourceBundle
and get the String from the given key and parameters. |
public static String getString(ResourceBundle resourceBundle, String key, Object... parameters) throws MissingResourceException
ResourceBundle object.resourceBundle - the resource bundle to get the String object.key - the properties keyparameters - the parametersString value from the given keyMissingResourceException - is thrown if the given key is missingpublic static String getStringQuietly(ResourceBundle resourceBundle, String key, Object... parameters)
ResourceBundle object.public static String getString(ResourceBundle resourceBundle, String key, String defaultValue) throws MissingResourceException
ResourceBundle object.resourceBundle - the resource bundle to get the String object.key - the properties keydefaultValue - the default valueString value from the given keyMissingResourceException - is thrown if the given key is missingpublic static String getStringQuietly(ResourceBundle resourceBundle, String key, String defaultValue)
ResourceBundle object.public static String getString(ResourceBundle resourceBundle, String key, String defaultValue, Object... parameters) throws MissingResourceException
ResourceBundle object.resourceBundle - the resource bundle to get the String object.key - the properties keydefaultValue - the default valueparameters - the parametersString value from the given keyMissingResourceException - is thrown if the given key is missingpublic static String getStringQuietly(ResourceBundle resourceBundle, String key, String defaultValue, Object... parameters)
ResourceBundle object.public static String getString(String baseName, Locale locale, String key, String defaultValue, Object... parameters) throws MissingResourceException
ResourceBundle
and get the String from the given key and parameters.baseName - the base name of the resource bundle, a fully qualified class
namelocale - the locale for the resource bundlekey - the properties keydefaultValue - the default valueparameters - the parametersString value from the given keyMissingResourceException - is thrown if the given key is missingpublic static String getStringQuietly(String baseName, Locale locale, String key, String defaultValue, Object... parameters)
ResourceBundle
and get the String from the given key and parameters.baseName - the base name of the resource bundle, a fully qualified class
namelocale - the locale for the resource bundlekey - the properties keydefaultValue - the default valueparameters - the parametersString value from the given keypublic static String getString(String baseName, Locale locale, String key, Object... parameters) throws MissingResourceException
ResourceBundle
and get the String from the given key and parameters.baseName - the base name of the resource bundle, a fully qualified class
namelocale - the locale for the resource bundlekey - the properties keyparameters - the parametersString value from the given keyMissingResourceException - is thrown if the given key is missingpublic static String getString(String baseName, Locale locale, String key) throws MissingResourceException
ResourceBundle
and get the String from the given key and parameters.baseName - the base name of the resource bundle, a fully qualified class
namelocale - the locale for the resource bundlekey - the properties keyString value from the given keyMissingResourceException - is thrown if the given key is missingpublic static String getString(String baseName, Locale locale, String key, String defaultValue) throws MissingResourceException
ResourceBundle
and get the String from the given key and parameters.baseName - the base name of the resource bundle, a fully qualified class
namelocale - the locale for the resource bundlekey - the properties keydefaultValue - the default valueString value from the given keyMissingResourceException - is thrown if the given key is missingpublic static String getString(BundleKey bundleKey) throws MissingResourceException
bundleKey - the bundle keyString value from the given BundleKey.MissingResourceException - is thrown if the given key is missingCopyright © 2015 Alpha Ro Group UG (haftungsbeschrÀngt). All rights reserved.