protected class AbstractJsonPatternParser.ConstantValueWriter extends Object implements NodeWriter<Event>
| Constructor and Description |
|---|
ConstantValueWriter(Object value) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
shouldWrite(com.fasterxml.jackson.core.JsonGenerator generator,
Event event)
Returns true if this node should be written.
|
void |
write(com.fasterxml.jackson.core.JsonGenerator generator,
Event event)
Writes this node to the given generator
|
public ConstantValueWriter(Object value)
public void write(com.fasterxml.jackson.core.JsonGenerator generator,
Event event)
throws IOException
NodeWriterwrite in interface NodeWriter<Event>generator - the generator to which to write the nodeevent - the event from which to get data to writeIOExceptionpublic boolean shouldWrite(com.fasterxml.jackson.core.JsonGenerator generator,
Event event)
NodeWriterNodeWriter.write(JsonGenerator, Object) should not be called.
This is used to potentially omit fields containing this node
(e.g. for omitting empty values)shouldWrite in interface NodeWriter<Event>Copyright © 2019. All rights reserved.