Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.logging.log4j.message
Class ObjectMessage

    java.lang.Object
      org.apache.logging.log4j.message.ObjectMessage

All Implemented Interfaces:
  Serializable, Message

    public class ObjectMessage

extends Object
implements Message

Handles messages that contain an Object.

See Also:
  Serialized Form

Constructor Summary
`ObjectMessage(Object obj)` Create the ObjectMessage.

Method Summary
`boolean` | `equals(Object o)`
`String` | `getFormat()` Returns the object formatted using its toString method.
`String` | `getFormattedMessage()` Returns the formatted object message.
`Object[]` | `getParameters()` Returns the object as if it were a parameter.
`Throwable` | `getThrowable()` Gets the message if it is a throwable.
`int` | `hashCode()`
`String` | `toString()`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Constructor Detail

### ObjectMessage

    public ObjectMessage(Object obj)

  Create the ObjectMessage.

  Parameters:
    `obj` - The Object to format.

Method Detail

### getFormattedMessage

    public String getFormattedMessage()

  Returns the formatted object message.

  Specified by:
    `getFormattedMessage` in interface `Message`
  Returns:
    the formatted object message.

### getFormat

    public String getFormat()

  Returns the object formatted using its toString method.

  Specified by:
    `getFormat` in interface `Message`
  Returns:
    the String representation of the object.

### getParameters

    public Object[] getParameters()

  Returns the object as if it were a parameter.

  Specified by:
    `getParameters` in interface `Message`
  Returns:
    The object.

### equals

    public boolean equals(Object o)

  Overrides:
    `equals` in class `Object`

### hashCode

    public int hashCode()

  Overrides:
    `hashCode` in class `Object`

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`

### getThrowable

    public Throwable getThrowable()

  Gets the message if it is a throwable.

  Specified by:
    `getThrowable` in interface `Message`
  Returns:
    the message if it is a throwable.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 1999-2015 Apache Software Foundation. All Rights Reserved.
Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation.