public class StringManagerBase extends Object
One StringManagerBase per resource bundle name can be created and accessed by the getManager method call.
| Modifier | Constructor and Description |
|---|---|
protected |
StringManagerBase(String resourceBundleName,
ClassLoader classLoader)
Initializes the resource bundle.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getString(String key)
Returns a localized string.
|
String |
getString(String key,
Object arg1)
Returns a local string for the caller and format the arguments
accordingly.
|
String |
getString(String key,
Object[] args)
Returns a local string for the caller and format the arguments
accordingly.
|
String |
getString(String key,
Object arg1,
Object arg2)
Returns a local string for the caller and format the arguments
accordingly.
|
String |
getString(String key,
Object arg1,
Object arg2,
Object arg3)
Returns a local string for the caller and format the arguments
accordingly.
|
String |
getString(String key,
Object arg1,
Object arg2,
Object arg3,
Object arg4)
Returns a local string for the caller and format the arguments
accordingly.
|
static StringManagerBase |
getStringManager(String resourceBundleName,
ClassLoader classLoader)
Returns a local string manager for the given resourceBundle name.
|
String |
getStringWithDefault(String key,
String defaultValue)
Returns a localized string.
|
String |
getStringWithDefault(String key,
String defaultFormat,
Object[] arguments)
Returns a local string for the caller and format the arguments
accordingly.
|
protected StringManagerBase(String resourceBundleName, ClassLoader classLoader)
resourceBundleName - name of the resource bundlepublic static StringManagerBase getStringManager(String resourceBundleName, ClassLoader classLoader)
resourceBundleName - name of the resource bundlepublic String getString(String key)
key - the name of the resource to fetchpublic String getStringWithDefault(String key, String defaultValue)
key - the name of the resource to fetchdefaultValue - the default return value if not foundpublic String getStringWithDefault(String key, String defaultFormat, Object[] arguments)
key - the key to the local format stringdefaultFormat - the default format if not found in the resourcesarguments - the set of arguments to provide to the formatterpublic String getString(String key, Object arg1)
key - the key to the local format stringarg1 - the one argument to be provided to the formatterpublic String getString(String key, Object arg1, Object arg2)
key - the key to the local format stringarg1 - first argument to be provided to the formatterarg2 - second argument to be provided to the formatterpublic String getString(String key, Object arg1, Object arg2, Object arg3)
key - the key to the local format stringarg1 - first argument to be provided to the formatterarg2 - second argument to be provided to the formatterarg3 - third argument to be provided to the formatterpublic String getString(String key, Object arg1, Object arg2, Object arg3, Object arg4)
key - the key to the local format stringarg1 - first argument to be provided to the formatterarg2 - second argument to be provided to the formatterarg3 - third argument to be provided to the formatterarg4 - fourth argument to be provided to the formatterCopyright © 2017–2020 Eclipse Foundation. All rights reserved.