public final class Errors extends IndexedResourceBundle
format(…)
method,
the first arguments provide information about the context in which the error occurred (e.g. the
name of a method argument or the range of valid values), while the erroneous values that caused
the error are last. Note that being the last programmatic parameter does not means that the value
will appears last in the formatted text, since every localized message can reorder the parameters
as they want.Defined in the sis-utility module
Modifier and Type | Class and Description |
---|---|
static class |
Errors.Keys
Resource keys.
|
ResourceBundle.Control
parent
Modifier and Type | Method and Description |
---|---|
static String |
format(int key)
Gets a string for the given key from this resource bundle or one of its parents.
|
static String |
format(int key,
Object arg0)
Gets a string for the given key are replace all occurrence of "{0}"
with values of
arg0 . |
static String |
format(int key,
Object arg0,
Object arg1)
Gets a string for the given key are replace all occurrence of "{0}",
"{1}", with values of
arg0 , arg1 . |
static String |
format(int key,
Object arg0,
Object arg1,
Object arg2)
Gets a string for the given key are replace all occurrence of "{0}",
"{1}", with values of
arg0 , arg1 , etc. |
static String |
format(int key,
Object arg0,
Object arg1,
Object arg2,
Object arg3)
Gets a string for the given key are replace all occurrence of "{0}",
"{1}", with values of
arg0 , arg1 , etc. |
static InternationalString |
formatInternational(int key)
Gets an international string for the given key.
|
static InternationalString |
formatInternational(int key,
Object... args)
Gets an international string for the given key.
|
static InternationalString |
formatInternational(int key,
Object arg)
Gets an international string for the given key.
|
static Errors |
getResources(Locale locale)
Returns resources in the given locale.
|
getBundle, getKeys, getLabel, getLogRecord, getLogRecord, getLogRecord, getLogRecord, getLogRecord, getMenuLabel, getString, getString, getString, getString, getString, getString, handleGetObject, list, toString
clearCache, clearCache, containsKey, getBundle, getBundle, getBundle, getBundle, getBundle, getBundle, getLocale, getObject, getString, getStringArray, handleKeySet, keySet, setParent
public static Errors getResources(Locale locale) throws MissingResourceException
locale
- The locale, or null
for the default locale.MissingResourceException
- if resources can't be found.public static String format(int key) throws MissingResourceException
key
- The key for the desired string.MissingResourceException
- If no object for the given key can be found.public static String format(int key, Object arg0) throws MissingResourceException
arg0
.key
- The key for the desired string.arg0
- Value to substitute to "{0}".MissingResourceException
- If no object for the given key can be found.public static String format(int key, Object arg0, Object arg1) throws MissingResourceException
arg0
, arg1
.key
- The key for the desired string.arg0
- Value to substitute to "{0}".arg1
- Value to substitute to "{1}".MissingResourceException
- If no object for the given key can be found.public static String format(int key, Object arg0, Object arg1, Object arg2) throws MissingResourceException
arg0
, arg1
, etc.key
- The key for the desired string.arg0
- Value to substitute to "{0}".arg1
- Value to substitute to "{1}".arg2
- Value to substitute to "{2}".MissingResourceException
- If no object for the given key can be found.public static String format(int key, Object arg0, Object arg1, Object arg2, Object arg3) throws MissingResourceException
arg0
, arg1
, etc.key
- The key for the desired string.arg0
- Value to substitute to "{0}".arg1
- Value to substitute to "{1}".arg2
- Value to substitute to "{2}".arg3
- Value to substitute to "{3}".MissingResourceException
- If no object for the given key can be found.public static InternationalString formatInternational(int key)
MissingResourceException
may be thrown
when a InternationalString.toString(Locale)
method is invoked.key
- The key for the desired string.public static InternationalString formatInternational(int key, Object arg)
MissingResourceException
may be thrown
when a InternationalString.toString(Locale)
method is invoked.
Note: This method is redundant with the one expectingObject...
, but avoid the creation of a temporary array. There is no risk of confusion since the two methods delegate their work to the sameformat
method anyway.
key
- The key for the desired string.arg
- Values to substitute to "{0}".public static InternationalString formatInternational(int key, Object... args)
MissingResourceException
may be thrown
when a InternationalString.toString(Locale)
method is invoked.key
- The key for the desired string.args
- Values to substitute to "{0}", "{1}", etc.Copyright © 2010–2013 The Apache Software Foundation. All rights reserved.