public final class SimpleTokenWriteContext
extends com.fasterxml.jackson.core.JsonStreamContext
jackson-core| Modifier and Type | Field and Description |
|---|---|
protected SimpleTokenWriteContext |
_childToRecycle |
protected String |
_currentName
Name of the field of which value is to be written; only
used for OBJECT contexts
|
protected Object |
_currentValue |
protected com.fasterxml.jackson.core.json.DupDetector |
_dups |
protected boolean |
_gotFieldId
Marker used to indicate that we just wrote a field name
and now expect a value to write
|
protected SimpleTokenWriteContext |
_parent
Parent context for this context; null for root context.
|
| Modifier | Constructor and Description |
|---|---|
protected |
SimpleTokenWriteContext(int type,
SimpleTokenWriteContext parent,
com.fasterxml.jackson.core.json.DupDetector dups,
Object currentValue) |
| Modifier and Type | Method and Description |
|---|---|
SimpleTokenWriteContext |
clearAndGetParent()
Method that can be used to both clear the accumulated references
(specifically value set with
setCurrentValue(Object))
that should not be retained, and returns parent (as would
getParent() do). |
SimpleTokenWriteContext |
createChildArrayContext(Object currentValue) |
SimpleTokenWriteContext |
createChildObjectContext(Object currentValue) |
static SimpleTokenWriteContext |
createRootContext(com.fasterxml.jackson.core.json.DupDetector dd) |
String |
getCurrentName() |
Object |
getCurrentValue() |
com.fasterxml.jackson.core.json.DupDetector |
getDupDetector() |
SimpleTokenWriteContext |
getParent() |
boolean |
hasCurrentName() |
void |
setCurrentValue(Object v) |
SimpleTokenWriteContext |
withDupDetector(com.fasterxml.jackson.core.json.DupDetector dups) |
boolean |
writeFieldName(String name)
Method that writer is to call before it writes a field name.
|
boolean |
writeValue() |
protected final SimpleTokenWriteContext _parent
protected com.fasterxml.jackson.core.json.DupDetector _dups
protected SimpleTokenWriteContext _childToRecycle
protected String _currentName
protected Object _currentValue
protected boolean _gotFieldId
protected SimpleTokenWriteContext(int type,
SimpleTokenWriteContext parent,
com.fasterxml.jackson.core.json.DupDetector dups,
Object currentValue)
public SimpleTokenWriteContext withDupDetector(com.fasterxml.jackson.core.json.DupDetector dups)
public Object getCurrentValue()
getCurrentValue in class com.fasterxml.jackson.core.JsonStreamContextpublic void setCurrentValue(Object v)
setCurrentValue in class com.fasterxml.jackson.core.JsonStreamContextpublic static SimpleTokenWriteContext createRootContext(com.fasterxml.jackson.core.json.DupDetector dd)
public SimpleTokenWriteContext createChildArrayContext(Object currentValue)
public SimpleTokenWriteContext createChildObjectContext(Object currentValue)
public final SimpleTokenWriteContext getParent()
getParent in class com.fasterxml.jackson.core.JsonStreamContextpublic final String getCurrentName()
getCurrentName in class com.fasterxml.jackson.core.JsonStreamContextpublic boolean hasCurrentName()
hasCurrentName in class com.fasterxml.jackson.core.JsonStreamContextpublic SimpleTokenWriteContext clearAndGetParent()
setCurrentValue(Object))
that should not be retained, and returns parent (as would
getParent() do). Typically called when closing the active
context when encountering JsonToken.END_ARRAY or
JsonToken.END_OBJECT.public com.fasterxml.jackson.core.json.DupDetector getDupDetector()
public boolean writeFieldName(String name) throws com.fasterxml.jackson.core.JsonProcessingException
com.fasterxml.jackson.core.JsonProcessingExceptionpublic boolean writeValue()
Copyright © 2021 FasterXML. All rights reserved.