org.apache.xml.res
Class XMLMessages
java.lang.Object
org.apache.xml.res.XMLMessages
public class XMLMessages
extends java.lang.Object
A utility class for issuing XML error messages.
static String | createMsg(ListResourceBundle fResourceBundle, String msgKey, args[] ) - Creates a message from the specified key and replacement
arguments, localized to the given locale.
|
static String | createXMLMessage(String msgKey, args[] ) - Creates a message from the specified key and replacement
arguments, localized to the given locale.
|
Locale | getLocale() - Get the Locale object that is being used.
|
static ListResourceBundle | loadResourceBundle(String className) - Return a named ResourceBundle for a particular locale.
|
void | setLocale(Locale locale) - Set the Locale object to use.
|
createMsg
public static final String createMsg(ListResourceBundle fResourceBundle,
String msgKey,
args[] )
Creates a message from the specified key and replacement
arguments, localized to the given locale.
fResourceBundle
- The resource bundle to use.msgKey
- The message key to use.
- The formatted message string.
createXMLMessage
public static final String createXMLMessage(String msgKey,
args[] )
Creates a message from the specified key and replacement
arguments, localized to the given locale.
msgKey
- The key for the message text.
- The formatted message string.
getLocale
public Locale getLocale()
Get the Locale object that is being used.
- non-null reference to Locale object.
loadResourceBundle
public static ListResourceBundle loadResourceBundle(String className)
throws MissingResourceException
Return a named ResourceBundle for a particular locale. This method mimics the behavior
of ResourceBundle.getBundle().
className
- The class name of the resource bundle.
setLocale
public void setLocale(Locale locale)
Set the Locale object to use.
locale
- non-null reference to Locale object.
Copyright B) 2006 Apache XML Project. All Rights Reserved.