| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class |
| Modifier and Type | Field and Description |
|---|---|
| private static final DateTimeFormatter | |
| private static final char | |
| private static final char | |
| pack-priv static final String | ERROR_MSG_SEPARATOR
Separator for error messages. |
| pack-priv static final String | ERROR_PREFIX
Prefix for errors. |
| pack-priv static final String | ERROR_SEPARATOR
Separator for errors. |
| pack-priv static final String | ERROR_SUFFIX
Suffix for errors. |
| private static final char | |
| pack-priv static final String | RECURSION_PREFIX
Prefix for recursion. |
| pack-priv static final String | RECURSION_SUFFIX
Suffix for recursion. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv static ParameterFormatter. | Returns: the analysis resulta message pattern to be analyzed pattern, final int The number of arguments to be formatted.
For instance, for a parametrized message containing 7 placeholders in the pattern and 4 arguments for formatting, analysis will only need to store the index of the first 4 placeholder characters.
A negative value indicates no limit. argCount)Analyzes – finds argument placeholder (i.e., "{}") occurrences, etc. – the given message pattern. |
| pack-priv static void | analyzePattern(final String
a message pattern to be analyzed pattern, final int The number of arguments to be formatted.
For instance, for a parametrized message containing 7 placeholders in the pattern and 4 arguments for formatting, analysis will only need to store the index of the first 4 placeholder characters.
A negative value indicates no limit. argCount, final ParameterFormatter.an object to store the results analysisAnalyzes – finds argument placeholder (i.e., "{}") occurrences, etc. – the given message pattern. |
| private static void | appendArray(final Object o, final StringBuilder str, final Set<Object> dejaVu, final Class<?> oClass)
|
| private static void | appendCollection(final Object o, final StringBuilder str, final Set<Object> dejaVu)
Specialized handler for |
| private static boolean | |
| private static void | |
| private static void | |
| private static boolean | |
| private static Set | |
| private static void | copyMessagePatternContainingEscapes(final StringBuilder buffer, final String pattern, final int startIndex, final int endIndex)
|
| private static Set | |
| pack-priv static String | Returns: The String representation.The object. o)This method performs a deep toString of the given Object. |
| pack-priv static String | |
| pack-priv static void | formatMessage(final StringBuilder buffer, final String pattern, final Object[] args, final int argCount, final ParameterFormatter.
|
| pack-priv static void | formatMessageContainingEscapes(final StringBuilder buffer, final String pattern, final Object[] args, final int argCount, final ParameterFormatter.
|
| pack-priv static void | formatMessageContainingNoEscapes(final StringBuilder buffer, final String pattern, final Object[] args, final int argCount, final ParameterFormatter.
|
| private static Set | |
| private static void | |
| pack-priv static String | Returns: the identity string as also defined in Object.toString()the Object that is to be converted into an identity string. obj)This method returns the same as if Object.toString() would not have been overridden in obj. |
| private static boolean | isMaybeRecursive(final Object o)
Returns |
| pack-priv static void | recursiveDeepToString(final Object
the o, final StringBuilder Object to convert into a Stringthe str)StringBuilder that o will be appended toThis method performs a deep |
| private static void | recursiveDeepToString(final Object
the o, final StringBuilder Object to convert into a Stringthe str, final Set<Object> StringBuilder that o will be appended toa set of container objects directly or transitively containing dejaVu)oThis method performs a deep |
| private static void |
| DATE_FORMATTER | back to summary |
|---|---|
| private static final DateTimeFormatter DATE_FORMATTER | |
| DELIM_START | back to summary |
|---|---|
| private static final char DELIM_START | |
| DELIM_STOP | back to summary |
|---|---|
| private static final char DELIM_STOP | |
| ERROR_MSG_SEPARATOR | back to summary |
|---|---|
| pack-priv static final String ERROR_MSG_SEPARATOR Separator for error messages. | |
| ERROR_PREFIX | back to summary |
|---|---|
| pack-priv static final String ERROR_PREFIX Prefix for errors. | |
| ERROR_SEPARATOR | back to summary |
|---|---|
| pack-priv static final String ERROR_SEPARATOR Separator for errors. | |
| ERROR_SUFFIX | back to summary |
|---|---|
| pack-priv static final String ERROR_SUFFIX Suffix for errors. | |
| ESCAPE_CHAR | back to summary |
|---|---|
| private static final char ESCAPE_CHAR | |
| RECURSION_PREFIX | back to summary |
|---|---|
| pack-priv static final String RECURSION_PREFIX Prefix for recursion. | |
| RECURSION_SUFFIX | back to summary |
|---|---|
| pack-priv static final String RECURSION_SUFFIX Suffix for recursion. | |
| ParameterFormatter | back to summary |
|---|---|
| private ParameterFormatter() | |
| analyzePattern | back to summary |
|---|---|
| pack-priv static ParameterFormatter. Analyzes – finds argument placeholder (i.e., "{}") occurrences, etc. – the given message pattern. Only "{}" strings are treated as argument placeholders. Escaped or incomplete argument placeholders will be ignored. Some invalid argument placeholder examples:
{ }
foo\{}
{bar
{buzz}
| |
| analyzePattern | back to summary |
|---|---|
| pack-priv static void analyzePattern(final String pattern, final int argCount, final ParameterFormatter. Analyzes – finds argument placeholder (i.e., "{}") occurrences, etc. – the given message pattern. Only "{}" strings are treated as argument placeholders. Escaped or incomplete argument placeholders will be ignored. Some invalid argument placeholder examples:
{ }
foo\{}
{bar
{buzz}
| |
| appendArray | back to summary |
|---|---|
| private static void appendArray(final Object o, final StringBuilder str, final Set<Object> dejaVu, final Class<?> oClass) | |
| appendCollection | back to summary |
|---|---|
| private static void appendCollection(final Object o, final StringBuilder str, final Set<Object> dejaVu) Specialized handler for | |
| appendDate | back to summary |
|---|---|
| private static boolean appendDate(final Object o, final StringBuilder str) | |
| appendMap | back to summary |
|---|---|
| private static void appendMap(final Object o, final StringBuilder str, final Set<Object> dejaVu) Specialized handler for | |
| appendPotentiallyRecursiveValue | back to summary |
|---|---|
| private static void appendPotentiallyRecursiveValue(final Object o, final StringBuilder str, final Set<Object> dejaVu) | |
| appendSpecialTypes | back to summary |
|---|---|
| private static boolean appendSpecialTypes(final Object o, final StringBuilder str) | |
| cloneDejaVu | back to summary |
|---|---|
| private static Set | |
| copyMessagePatternContainingEscapes | back to summary |
|---|---|
| private static void copyMessagePatternContainingEscapes(final StringBuilder buffer, final String pattern, final int startIndex, final int endIndex) | |
| createDejaVu | back to summary |
|---|---|
| private static Set | |
| deepToString | back to summary |
|---|---|
| pack-priv static String deepToString(final Object o) This method performs a deep toString of the given Object. Primitive arrays are converted using their respective Arrays.toString methods while special handling is implemented for "container types", i.e. Object[], Map and Collection because those could contain themselves. It should be noted that neither AbstractMap.toString() nor AbstractCollection.toString() implement such a behavior. They only check if the container is directly contained in itself, but not if a contained container contains the original one. Because of that, Arrays.toString(Object[]) isn't safe either. Confusing? Just read the last paragraph again and check the respective toString() implementation. This means, in effect, that logging would produce a usable output even if an ordinary System.out.println(o) would produce a relatively hard-to-debug StackOverflowError. | |
| format | back to summary |
|---|---|
| pack-priv static String format(final String pattern, final Object[] args, int argCount) Format the following pattern using provided arguments. | |
| formatMessage | back to summary |
|---|---|
| pack-priv static void formatMessage(final StringBuilder buffer, final String pattern, final Object[] args, final int argCount, final ParameterFormatter. | |
| formatMessageContainingEscapes | back to summary |
|---|---|
| pack-priv static void formatMessageContainingEscapes(final StringBuilder buffer, final String pattern, final Object[] args, final int argCount, final ParameterFormatter. | |
| formatMessageContainingNoEscapes | back to summary |
|---|---|
| pack-priv static void formatMessageContainingNoEscapes(final StringBuilder buffer, final String pattern, final Object[] args, final int argCount, final ParameterFormatter. | |
| getOrCreateDejaVu | back to summary |
|---|---|
| private static Set | |
| handleErrorInObjectToString | back to summary |
|---|---|
| private static void handleErrorInObjectToString(final Object o, final StringBuilder str, final Throwable t) | |
| identityToString | back to summary |
|---|---|
| pack-priv static String identityToString(final Object obj) This method returns the same as if Object.toString() would not have been overridden in obj. Note that this isn't 100% secure as collisions can always happen with hash codes. Copied from Object.hashCode():
As much as is reasonably practical, the hashCode method defined by
class
| |
| isMaybeRecursive | back to summary |
|---|---|
| private static boolean isMaybeRecursive(final Object o) Returns | |
| recursiveDeepToString | back to summary |
|---|---|
| pack-priv static void recursiveDeepToString(final Object o, final StringBuilder str) This method performs a deep
Primitive arrays are converted using their respective
It should be noted that neither
This means, in effect, that logging would produce a usable output even if an ordinary
| |
| recursiveDeepToString | back to summary |
|---|---|
| private static void recursiveDeepToString(final Object o, final StringBuilder str, final Set<Object> dejaVu) This method performs a deep
Primitive arrays are converted using their respective
It should be noted that neither
This means, in effect, that logging would produce a usable output even if an ordinary
| |
| tryObjectToString | back to summary |
|---|---|
| private static void tryObjectToString(final Object o, final StringBuilder str) | |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv boolean | escapedCharFound
Flag indicating if an escaped (i.e., `\`-prefixed) character is found. |
| private static final int | PLACEHOLDER_CHAR_INDEX_BUFFER_INITIAL_SIZE
The size of the |
| private static final int | PLACEHOLDER_CHAR_INDEX_BUFFER_SIZE_INCREMENT
The size |
| pack-priv int[] | placeholderCharIndices
The array of indices pointing to the first character of the found argument placeholder occurrences. |
| pack-priv int | placeholderCount
The total number of argument placeholder occurrences. |
| private static final long |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| private void |
| escapedCharFound | back to summary |
|---|---|
| pack-priv boolean escapedCharFound Flag indicating if an escaped (i.e., `\`-prefixed) character is found. | |
| PLACEHOLDER_CHAR_INDEX_BUFFER_INITIAL_SIZE | back to summary |
|---|---|
| private static final int PLACEHOLDER_CHAR_INDEX_BUFFER_INITIAL_SIZE The size of the | |
| PLACEHOLDER_CHAR_INDEX_BUFFER_SIZE_INCREMENT | back to summary |
|---|---|
| private static final int PLACEHOLDER_CHAR_INDEX_BUFFER_SIZE_INCREMENT The size | |
| placeholderCharIndices | back to summary |
|---|---|
| pack-priv int[] placeholderCharIndices The array of indices pointing to the first character of the found argument placeholder occurrences. | |
| placeholderCount | back to summary |
|---|---|
| pack-priv int placeholderCount The total number of argument placeholder occurrences. | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| MessagePatternAnalysis | back to summary |
|---|---|
| pack-priv MessagePatternAnalysis() | |
| ensurePlaceholderCharIndicesCapacity | back to summary |
|---|---|
| private void ensurePlaceholderCharIndicesCapacity(final int argCount) | |