org.apache.xml.res

Class XMLMessages

public class XMLMessages extends Object

A utility class for issuing XML error messages.

UNKNOWN: internal

Method Summary
static StringcreateMsg(ListResourceBundle fResourceBundle, String msgKey, Object[] args)
Creates a message from the specified key and replacement arguments, localized to the given locale.
static StringcreateXMLMessage(String msgKey, Object[] args)
Creates a message from the specified key and replacement arguments, localized to the given locale.
LocalegetLocale()
Get the Locale object that is being used.
static ListResourceBundleloadResourceBundle(String className)
Return a named ResourceBundle for a particular locale.
voidsetLocale(Locale locale)
Set the Locale object to use.

Method Detail

createMsg

public static final String createMsg(ListResourceBundle fResourceBundle, String msgKey, Object[] args)
Creates a message from the specified key and replacement arguments, localized to the given locale.

Parameters: fResourceBundle The resource bundle to use. msgKey The message key to use. args The arguments to be used as replacement text in the message created.

Returns: The formatted message string.

createXMLMessage

public static final String createXMLMessage(String msgKey, Object[] args)
Creates a message from the specified key and replacement arguments, localized to the given locale.

Parameters: msgKey The key for the message text. args The arguments to be used as replacement text in the message created.

Returns: The formatted message string.

getLocale

public Locale getLocale()
Get the Locale object that is being used.

Returns: non-null reference to Locale object.

loadResourceBundle

public static ListResourceBundle loadResourceBundle(String className)
Return a named ResourceBundle for a particular locale. This method mimics the behavior of ResourceBundle.getBundle().

Parameters: className The class name of the resource bundle.

Returns: the ResourceBundle

Throws: MissingResourceException

setLocale

public void setLocale(Locale locale)
Set the Locale object to use.

Parameters: locale non-null reference to Locale object.

Copyright B) 2006 Apache XML Project. All Rights Reserved.