Class ObjectArrayMessage

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

    public final class ObjectArrayMessage
    extends java.lang.Object
    implements Message
    Handles messages that contain an Object[].

    Created for use with the CSV layout. For example:

    logger.debug(new ObjectArrayMessage(1, 2, "Bob"));

    Since:
    2.4
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.Object[] array  
      private java.lang.String arrayString  
      private static long serialVersionUID  
    • Constructor Summary

      Constructors 
      Constructor Description
      ObjectArrayMessage​(java.lang.Object... obj)
      Creates the ObjectMessage.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private boolean equalObjectsOrStrings​(java.lang.Object[] left, java.lang.Object[] right)  
      boolean equals​(java.lang.Object o)  
      java.lang.String getFormat()
      Returns the object formatted using its toString method.
      java.lang.String getFormattedMessage()
      Returns the formatted object message.
      java.lang.Object[] getParameters()
      Returns the object as if it were a parameter.
      java.lang.Throwable getThrowable()
      Returns null.
      int hashCode()  
      private void readObject​(java.io.ObjectInputStream in)  
      java.lang.String toString()  
      private void writeObject​(java.io.ObjectOutputStream out)  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • array

        private transient java.lang.Object[] array
      • arrayString

        private transient java.lang.String arrayString
    • Constructor Detail

      • ObjectArrayMessage

        public ObjectArrayMessage​(java.lang.Object... obj)
        Creates the ObjectMessage.
        Parameters:
        obj - The Object to format.
    • Method Detail

      • equalObjectsOrStrings

        private boolean equalObjectsOrStrings​(java.lang.Object[] left,
                                              java.lang.Object[] right)
      • equals

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

        public java.lang.String getFormat()
        Returns the object formatted using its toString method.
        Specified by:
        getFormat in interface Message
        Returns:
        the String representation of the object.
      • getFormattedMessage

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

        public java.lang.Object[] getParameters()
        Returns the object as if it were a parameter.
        Specified by:
        getParameters in interface Message
        Returns:
        The object.
      • getThrowable

        public java.lang.Throwable getThrowable()
        Returns null.
        Specified by:
        getThrowable in interface Message
        Returns:
        null.
      • hashCode

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

        private void readObject​(java.io.ObjectInputStream in)
                         throws java.io.IOException,
                                java.lang.ClassNotFoundException
        Throws:
        java.io.IOException
        java.lang.ClassNotFoundException
      • toString

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

        private void writeObject​(java.io.ObjectOutputStream out)
                          throws java.io.IOException
        Throws:
        java.io.IOException