Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.xml.res
Class XMLMessages

    java.lang.Object
      org.apache.xml.res.XMLMessages

Direct Known Subclasses:
  XPATHMessages

public class XMLMessages
extends java.lang.Object

A utility class for issuing XML error messages.

Usage:
  **For internal use only**

Constructor Summary
`XMLMessages()`

Method Summary
`static java.lang.String` | `createMsg(java.util.ListResourceBundle fResourceBundle, java.lang.String msgKey, java.lang.Object[] args)` Creates a message from the specified key and replacement arguments, localized to the given locale.
`static java.lang.String` | `createXMLMessage(java.lang.String msgKey, java.lang.Object[] args)` Creates a message from the specified key and replacement arguments, localized to the given locale.
`java.util.Locale` | `getLocale()` Get the Locale object that is being used.
`static java.util.ListResourceBundle` | `loadResourceBundle(java.lang.String className)` Return a named ResourceBundle for a particular locale.
`void` | `setLocale(java.util.Locale locale)` Set the Locale object to use.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### XMLMessages

    public XMLMessages()

Method Detail

### setLocale

    public void setLocale(java.util.Locale locale)

  Set the Locale object to use.

  Parameters:
    `locale` - non-null reference to Locale object.

### getLocale

    public java.util.Locale getLocale()

  Get the Locale object that is being used.

  Returns:
    non-null reference to Locale object.

### createXMLMessage

    public static final java.lang.String createXMLMessage(java.lang.String msgKey,
                                                          java.lang.Object[] args)

  Creates a message from the specified key and replacement arguments, localized to the given locale.

  Parameters:
    `args` - The arguments to be used as replacement text in the message created.
  Returns:
    The formatted message string.

### createMsg

    public static final java.lang.String createMsg(java.util.ListResourceBundle fResourceBundle,
                                                   java.lang.String msgKey,
                                                   java.lang.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.

### loadResourceBundle

    public static java.util.ListResourceBundle loadResourceBundle(java.lang.String className)
                                                           throws java.util.MissingResourceException

  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:
    `java.util.MissingResourceException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004 Apache XML Project. All Rights Reserved.