Serializable, Message, ReusableMessage, StringBuilderFormattablepublic class ReusableObjectMessage extends Object implements ReusableMessage
| Constructor | Description |
|---|---|
ReusableObjectMessage() |
| Modifier and Type | Method | Description |
|---|---|---|
void |
formatTo(StringBuilder buffer) |
Writes a text representation of this object into the specified
StringBuilder, ideally without allocating
temporary objects. |
String |
getFormat() |
Returns the object formatted using its toString method.
|
String |
getFormattedMessage() |
Returns the formatted object message.
|
Object |
getParameter() |
Returns the object parameter.
|
short |
getParameterCount() |
This message does not have any parameters so this method always returns zero.
|
Object[] |
getParameters() |
Returns the object as if it were a parameter.
|
Throwable |
getThrowable() |
Gets the message if it is a throwable.
|
Message |
memento() |
Returns an immutable snapshot of the current internal state of this reusable message.
|
void |
set(Object object) |
|
Object[] |
swapParameters(Object[] emptyReplacement) |
This message does not have any parameters, so this method returns the specified array.
|
String |
toString() |
public void set(Object object)
public String getFormattedMessage()
getFormattedMessage in interface Messagepublic void formatTo(StringBuilder buffer)
StringBuilderFormattableStringBuilder, ideally without allocating
temporary objects.formatTo in interface StringBuilderFormattablebuffer - the StringBuilder to write intopublic String getFormat()
public Object getParameter()
public Object[] getParameters()
getParameters in interface Messagepublic Throwable getThrowable()
getThrowable in interface Messagepublic Object[] swapParameters(Object[] emptyReplacement)
swapParameters in interface ReusableMessageemptyReplacement - the parameter array to returnReusableMessage.getParameterCount()public short getParameterCount()
getParameterCount in interface ReusableMessagepublic Message memento()
ReusableMessagememento in interface ReusableMessageCopyright © 1999-2018. 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.