ParameterizedMessage
| Modifier and Type | Field and Description |
|---|---|
| private int | |
| private transient ThreadLocal | |
| private static final int | |
| private String | |
| private static final int | |
| private transient Object[] | |
| private final ParameterFormatter. | |
| pack-priv transient boolean | |
| private static final long | |
| private transient Throwable | |
| private transient Object[] |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | clear()
Implements org. Resets the object to a clean state. |
| private static Throwable | |
| public <S> void | forEachParameter(final ParameterConsumer<S>
The action to be performed for each key-value pair in this collection action, final S the object to be passed as the third parameter to each invocation on the
specified ParameterConsumer. state)Implements org. Performs the given action for each parameter until all values have been processed or the action throws an exception. |
| public void | formatTo(final StringBuilder
the StringBuilder to write into builder)Implements org. Writes a text representation of this object into the specified |
| private StringBuilder | |
| public String | Returns: the message pattern.Implements org. Returns the message pattern. |
| public String | Returns: the formatted message.Implements org. Returns the formatted message. |
| public short | getParameterCount()
Implements org. Returns the number of parameters that was used to initialize this reusable message for the current content. |
| public Object[] | Returns: the message parameters.Implements org. Returns the message parameters. |
| private Object[] | |
| public Throwable | Returns: the Throwable, if any.Implements org. Returns the Throwable that was given as the last argument, if any. |
| private Object[] | |
| private void | |
| public Message | memento()
Implements org. Returns an immutable snapshot of the current internal state of this reusable message. |
| pack-priv ReusableParameterizedMessage | |
| pack-priv ReusableParameterizedMessage | |
| pack-priv ReusableParameterizedMessage | |
| pack-priv ReusableParameterizedMessage | |
| pack-priv ReusableParameterizedMessage | |
| pack-priv ReusableParameterizedMessage | |
| pack-priv ReusableParameterizedMessage | |
| pack-priv ReusableParameterizedMessage | |
| pack-priv ReusableParameterizedMessage | |
| pack-priv ReusableParameterizedMessage | |
| pack-priv ReusableParameterizedMessage | |
| pack-priv ReusableParameterizedMessage | |
| public Object[] | swapParameters(final Object[]
the parameter array that can be used for subsequent uses of this reusable message.
This replacement array must have at least 10 elements (the number of varargs supported by the Logger
API). emptyReplacement)Implements org. Returns the parameter array that was used to initialize this reusable message and replaces it with the specified array. |
| public String | |
| private Object |
| argCount | back to summary |
|---|---|
| private int argCount | |
| buffer | back to summary |
|---|---|
| private transient ThreadLocal<StringBuilder> buffer | |
| MAX_PARAMS | back to summary |
|---|---|
| private static final int MAX_PARAMS | |
| messagePattern | back to summary |
|---|---|
| private String messagePattern | |
| MIN_BUILDER_SIZE | back to summary |
|---|---|
| private static final int MIN_BUILDER_SIZE | |
| params | back to summary |
|---|---|
| private transient Object[] params | |
| patternAnalysis | back to summary |
|---|---|
| private final ParameterFormatter. | |
| reserved | back to summary |
|---|---|
| pack-priv transient boolean reserved | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| throwable | back to summary |
|---|---|
| private transient Throwable throwable | |
| varargs | back to summary |
|---|---|
| private transient Object[] varargs | |
| ReusableParameterizedMessage | back to summary |
|---|---|
| public ReusableParameterizedMessage() Creates a reusable message. | |
| clear | back to summary |
|---|---|
| public void clear() Implements org. Doc from org. Resets the object to a clean state.
| |
| determineThrowable | back to summary |
|---|---|
| private static Throwable determineThrowable(final Object[] args, final int argCount, final int placeholderCount) | |
| forEachParameter | back to summary |
|---|---|
| public <S> void forEachParameter(final ParameterConsumer<S> action, final S state) Implements org. Doc from org. Performs the given action for each parameter until all values have been processed or the action throws an exception. The second parameter lets callers pass in a stateful object to be modified with the key-value pairs, so the TriConsumer implementation itself can be stateless and potentially reusable.
| |
| formatTo | back to summary |
|---|---|
| public void formatTo(final StringBuilder builder) Implements org. Doc from org. Writes a text representation of this object into the specified
| |
| getBuffer | back to summary |
|---|---|
| private StringBuilder getBuffer() | |
| getFormat | back to summary |
|---|---|
| public String getFormat() Implements org. Returns the message pattern. | |
| getFormattedMessage | back to summary |
|---|---|
| public String getFormattedMessage() Implements org. Returns the formatted message. | |
| getParameterCount | back to summary |
|---|---|
| public short getParameterCount() Implements org. Doc from org. Returns the number of parameters that was used to initialize this reusable message for the current content.
The parameter array returned by
| |
| getParameters | back to summary |
|---|---|
| public Object[] getParameters() Implements org. Returns the message parameters. | |
| getParams | back to summary |
|---|---|
| private Object[] getParams() | |
| getThrowable | back to summary |
|---|---|
| public Throwable getThrowable() Implements org. Returns the Throwable that was given as the last argument, if any. It will not survive serialization. The Throwable exists as part of the message primarily so that it can be extracted from the end of the list of parameters and then be added to the LogEvent. As such, the Throwable in the event should not be used once the LogEvent has been constructed. | |
| getTrimmedParams | back to summary |
|---|---|
| private Object[] getTrimmedParams() | |
| init | back to summary |
|---|---|
| private void init(final String messagePattern, final int argCount, final Object[] args) | |
| memento | back to summary |
|---|---|
| public Message memento() Implements org. Doc from org. Returns an immutable snapshot of the current internal state of this reusable message. The returned snapshot will not be affected by subsequent modifications of this reusable message. | |
| reserve | back to summary |
|---|---|
| pack-priv ReusableParameterizedMessage reserve() Sets the reserved flag to true and returns this object.
| |
| set | back to summary |
|---|---|
| pack-priv ReusableParameterizedMessage set(final String messagePattern, final Object... arguments) | |
| set | back to summary |
|---|---|
| pack-priv ReusableParameterizedMessage set(final String messagePattern, final Object p0) | |
| set | back to summary |
|---|---|
| pack-priv ReusableParameterizedMessage set(final String messagePattern, final Object p0, final Object p1) | |
| set | back to summary |
|---|---|
| pack-priv ReusableParameterizedMessage set(final String messagePattern, final Object p0, final Object p1, final Object p2) | |
| set | back to summary |
|---|---|
| pack-priv ReusableParameterizedMessage set(final String messagePattern, final Object p0, final Object p1, final Object p2, final Object p3) | |
| set | back to summary |
|---|---|
| pack-priv ReusableParameterizedMessage set(final String messagePattern, final Object p0, final Object p1, final Object p2, final Object p3, final Object p4) | |
| set | back to summary |
|---|---|
| pack-priv ReusableParameterizedMessage set(final String messagePattern, final Object p0, final Object p1, final Object p2, final Object p3, final Object p4, final Object p5) | |
| set | back to summary |
|---|---|
| pack-priv ReusableParameterizedMessage set(final String messagePattern, final Object p0, final Object p1, final Object p2, final Object p3, final Object p4, final Object p5, final Object p6) | |
| set | back to summary |
|---|---|
| pack-priv ReusableParameterizedMessage set(final String messagePattern, final Object p0, final Object p1, final Object p2, final Object p3, final Object p4, final Object p5, final Object p6, final Object p7) | |
| set | back to summary |
|---|---|
| pack-priv ReusableParameterizedMessage set(final String messagePattern, final Object p0, final Object p1, final Object p2, final Object p3, final Object p4, final Object p5, final Object p6, final Object p7, final Object p8) | |
| set | back to summary |
|---|---|
| pack-priv ReusableParameterizedMessage set(final String messagePattern, final Object p0, final Object p1, final Object p2, final Object p3, final Object p4, final Object p5, final Object p6, final Object p7, final Object p8, final Object p9) | |
| swapParameters | back to summary |
|---|---|
| public Object[] swapParameters(final Object[] emptyReplacement) Implements org. Doc from org. Returns the parameter array that was used to initialize this reusable message and replaces it with the specified array. The returned parameter array will no longer be modified by this reusable message. The specified array is now "owned" by this reusable message and can be modified if necessary for the next log event. ReusableMessages that have no parameters return the specified array.
This method is used by asynchronous loggers to pass the parameter array to a background thread without
allocating new objects.
The actual number of parameters in the returned array can be determined with
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |
| writeReplace | back to summary |
|---|---|
| private Object writeReplace() | |