Interface MessageFormatter

All Known Implementing Classes:
XIncludeMessageFormatter, XMLMessageFormatter, XSMessageFormatter

public interface MessageFormatter
This interface provides a generic message formatting mechanism and is useful for producing messages that must be localized and/or formatted with replacement text.
Version:
$Id: MessageFormatter.java 809242 2009-08-30 03:34:31Z mrglavas $
Author:
Andy Clark
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    formatMessage(Locale locale, String key, Object[] arguments)
    Formats a message with the specified arguments using the given locale information.
  • Method Details

    • formatMessage

      String formatMessage(Locale locale, String key, Object[] arguments) throws MissingResourceException
      Formats a message with the specified arguments using the given locale information.
      Parameters:
      locale - The locale of the message.
      key - The message key.
      arguments - The message replacement text arguments. The order of the arguments must match that of the placeholders in the actual message.
      Returns:
      Returns the formatted message.
      Throws:
      MissingResourceException - Thrown if the message with the specified key cannot be found.