Class StringFormattedMessage

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

    public class StringFormattedMessage
    extends java.lang.Object
    implements Message
    Handles messages that consist of a format string conforming to Formatter.

    Note to implementors

    This class implements the unrolled args API even though StringFormattedMessage does not. This leaves the room for StringFormattedMessage to unroll itself later.

    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      StringFormattedMessage​(java.lang.String messagePattern, java.lang.Object... arguments)
      Constructs a message.
      StringFormattedMessage​(java.util.Locale locale, java.lang.String messagePattern, java.lang.Object... arguments)
      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

      • StringFormattedMessage

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

        public StringFormattedMessage​(java.lang.String messagePattern,
                                      java.lang.Object... arguments)
        Constructs a message.
        Parameters:
        messagePattern - the pattern for this message format
        arguments - The objects to format
        Since:
        2.6
    • 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.