Top Description Methods
com.sun.org.apache.xerces.internal.util

public Interface MessageFormatter

Known Direct Implementers
com.sun.org.apache.xerces.internal.xinclude.XIncludeMessageFormatter, com.sun.org.apache.xerces.internal.xpointer.XPointerMessageFormatter, com.sun.org.apache.xerces.internal.impl.msg.XMLMessageFormatter, com.sun.org.apache.xerces.internal.impl.msg.XMLMessageFormatter_de, com.sun.org.apache.xerces.internal.impl.msg.XMLMessageFormatter_es, com.sun.org.apache.xerces.internal.impl.msg.XMLMessageFormatter_fr, com.sun.org.apache.xerces.internal.impl.msg.XMLMessageFormatter_it, com.sun.org.apache.xerces.internal.impl.msg.XMLMessageFormatter_ja, com.sun.org.apache.xerces.internal.impl.msg.XMLMessageFormatter_ko, com.sun.org.apache.xerces.internal.impl.msg.XMLMessageFormatter_pt_BR, com.sun.org.apache.xerces.internal.impl.msg.XMLMessageFormatter_sv, com.sun.org.apache.xerces.internal.impl.msg.XMLMessageFormatter_zh_CN, com.sun.org.apache.xerces.internal.impl.msg.XMLMessageFormatter_zh_TW, com.sun.org.apache.xerces.internal.impl.xs.XSMessageFormatter
Imports
java.util.Locale, .MissingResourceException

This interface provides a generic message formatting mechanism and is useful for producing messages that must be localed and/or formatted with replacement text.
Author
Andy Clark
See Also
com.sun.org.apache.xerces.internal.impl.XMLErrorReporter

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

Returns the formatted message.
formatMessage
(Locale
The locale of the message.
locale
,
String
The message key.
key
,
Object[]
The message replacement text arguments. The order of the arguments must match that of the placeholders in the actual message.
arguments
)

Formats a message with the specified arguments using the given locale information.

Method Detail

formatMessageback to summary
public String formatMessage(Locale locale, String key, Object[] arguments) throws MissingResourceException

Formats a message with the specified arguments using the given locale information.

Parameters
locale:Locale

The locale of the message.

key:String

The message key.

arguments:Object[]

The message replacement text arguments. The order of the arguments must match that of the placeholders in the actual message.

Returns:String

Returns the formatted message.

Exceptions
MissingResourceException:
Thrown if the message with the specified key cannot be found.