@FunctionalInterface public interface TemplateResolver<V>
Modifier and Type | Method and Description |
---|---|
default boolean |
isFlattening()
Indicates if the resolution should be appended to the parent JSON object.
|
default boolean |
isResolvable()
Indicates if the resolver if applicable at all.
|
default boolean |
isResolvable(V value)
Indicates if the resolver if applicable for the given
value . |
void |
resolve(V value,
JsonWriter jsonWriter)
Resolves the given
value using the provided JsonWriter . |
default void |
resolve(V value,
JsonWriter jsonWriter,
boolean succeedingEntry)
Resolves the given
value using the provided JsonWriter . |
default boolean isFlattening()
For instance, ThreadContextDataResolver
, i.e., MDC resolver,
uses this flag to indicate whether the contents should be appended to the
parent JSON object or not.
default boolean isResolvable()
For instance, the source line resolver can be short-circuited using this check if the location information is disabled in the layout configuration.
default boolean isResolvable(V value)
value
.
For instance, the stack trace resolver can be short-circuited using this check if the stack traces are disabled in the layout configuration.
void resolve(V value, JsonWriter jsonWriter)
value
using the provided JsonWriter
.default void resolve(V value, JsonWriter jsonWriter, boolean succeedingEntry)
value
using the provided JsonWriter
.succeedingEntry
- false, if this is the first element in a collection; true, otherwiseCopyright © 1999-2022 The 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.