Class XMLMessages

java.lang.Object
org.apache.xml.res.XMLMessages
Direct Known Subclasses:
XPATHMessages

public class XMLMessages
extends Object
A utility class for issuing XML error messages.
  • Field Details

    • fLocale

      protected Locale fLocale
      The local object to use.
    • BAD_CODE

      protected static final String BAD_CODE
      String to use if a bad message code is used.
      See Also:
      Constant Field Values
    • FORMAT_FAILED

      protected static final String FORMAT_FAILED
      String to use if the message format operation failed.
      See Also:
      Constant Field Values
  • Constructor Details

    • XMLMessages

      public XMLMessages()
  • Method Details

    • setLocale

      public void setLocale​(Locale locale)
      Set the Locale object to use.
      Parameters:
      locale - non-null reference to Locale object.
    • getLocale

      public Locale getLocale()
      Get the Locale object that is being used.
      Returns:
      non-null reference to Locale object.
    • 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.
    • 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.