public class ReusableSimpleMessage extends Object implements ReusableMessage, CharSequence
| Constructor and Description |
|---|
ReusableSimpleMessage() |
| Modifier and Type | Method and Description |
|---|---|
char |
charAt(int index) |
void |
formatTo(StringBuilder buffer)
Writes a text representation of this object into the specified
StringBuilder, ideally without allocating
temporary objects. |
String |
getFormat()
Gets the format portion of the Message.
|
String |
getFormattedMessage()
Gets the Message formatted as a String.
|
short |
getParameterCount()
This message does not have any parameters so this method always returns zero.
|
Object[] |
getParameters()
Gets parameter values, if any.
|
Throwable |
getThrowable()
Gets the throwable, if any.
|
int |
length() |
Message |
memento()
Returns an immutable snapshot of the current internal state of this reusable message.
|
void |
set(CharSequence charSequence) |
void |
set(String message) |
CharSequence |
subSequence(int start,
int end) |
Object[] |
swapParameters(Object[] emptyReplacement)
This message does not have any parameters, so this method returns the specified array.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waittoStringpublic void set(String message)
public void set(CharSequence charSequence)
public String getFormattedMessage()
Message
This method will not be called for Messages that implement the
StringBuilderFormattable interface: instead, the
formatTo(StringBuilder) method will be called so the
Message can format its contents without creating intermediate String objects.
getFormattedMessage in interface Messagepublic String getFormat()
MessagegetFormat in interface Messagepublic Object[] getParameters()
MessagegetParameters in interface Messagepublic Throwable getThrowable()
MessagegetThrowable in interface Messagepublic void formatTo(StringBuilder buffer)
StringBuilderFormattableStringBuilder, ideally without allocating
temporary objects.formatTo in interface StringBuilderFormattablebuffer - the StringBuilder to write intopublic 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 ReusableMessagepublic int length()
length in interface CharSequencepublic char charAt(int index)
charAt in interface CharSequencepublic CharSequence subSequence(int start, int end)
subSequence in interface CharSequenceCopyright © 1999-2016 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.