Class MessageFormatMessage

  • All Implemented Interfaces:
    java.io.Serializable, Message

    public class MessageFormatMessage
    extends java.lang.Object
    implements Message
    Handles messages that consist of a format string conforming to java.text.MessageFormat.
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      MessageFormatMessage​(java.lang.String messagePattern, java.lang.Object... parameters)
      Constructs a message.
      MessageFormatMessage​(java.util.Locale locale, java.lang.String messagePattern, java.lang.Object... parameters)
      Constructs a message.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object o)  
      java.lang.String getFormat()
      Returns the message pattern.
      java.lang.String getFormattedMessage()
      Returns the formatted message.
      java.lang.Object[] getParameters()
      Returns the message parameters.
      java.lang.Throwable getThrowable()
      Return the throwable passed to the Message.
      int hashCode()  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • MessageFormatMessage

        public MessageFormatMessage​(java.util.Locale locale,
                                    java.lang.String messagePattern,
                                    java.lang.Object... parameters)
        Constructs a message.
        Parameters:
        locale - the locale for this message format
        messagePattern - the pattern for this message format
        parameters - The objects to format
        Since:
        2.6
      • MessageFormatMessage

        public MessageFormatMessage​(java.lang.String messagePattern,
                                    java.lang.Object... parameters)
        Constructs a message.
        Parameters:
        messagePattern - the pattern for this message format
        parameters - The objects to format
    • Method Detail

      • getFormattedMessage

        public java.lang.String getFormattedMessage()
        Returns the formatted message.
        Specified by:
        getFormattedMessage in interface Message
        Returns:
        the formatted message.
      • getFormat

        public java.lang.String getFormat()
        Returns the message pattern.
        Specified by:
        getFormat in interface Message
        Returns:
        the message pattern.
      • getParameters

        public java.lang.Object[] getParameters()
        Returns the message parameters.
        Specified by:
        getParameters in interface Message
        Returns:
        the message parameters.
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • getThrowable

        public java.lang.Throwable getThrowable()
        Return the throwable passed to the Message.
        Specified by:
        getThrowable in interface Message
        Returns:
        the Throwable.