public class TokenBufferReadContext extends JsonStreamContext
JsonStreamContext
used by TokenBuffer
to link back to the original context to try to keep location information
consistent between source location and buffered content when it's re-read
from the buffer.Modifier and Type | Field and Description |
---|---|
protected String |
_currentName |
protected Object |
_currentValue |
protected JsonStreamContext |
_parent |
protected JsonLocation |
_startLocation |
_index, _type, TYPE_ARRAY, TYPE_OBJECT, TYPE_ROOT
Modifier | Constructor and Description |
---|---|
protected |
TokenBufferReadContext()
Constructor for case where there is no real surrounding context: just create
virtual ROOT
|
protected |
TokenBufferReadContext(JsonStreamContext base,
ContentReference srcRef) |
protected |
TokenBufferReadContext(JsonStreamContext base,
JsonLocation startLoc) |
protected |
TokenBufferReadContext(JsonStreamContext base,
Object srcRef)
Deprecated.
|
protected |
TokenBufferReadContext(TokenBufferReadContext parent,
int type,
int index) |
Modifier and Type | Method and Description |
---|---|
TokenBufferReadContext |
createChildArrayContext() |
TokenBufferReadContext |
createChildObjectContext() |
static TokenBufferReadContext |
createRootContext(JsonStreamContext origContext) |
String |
getCurrentName() |
Object |
getCurrentValue() |
JsonStreamContext |
getParent() |
boolean |
hasCurrentName() |
TokenBufferReadContext |
parentOrCopy()
Helper method we need to handle discontinuity between "real" contexts buffer
creates, and ones from parent: problem being they are of different types.
|
void |
setCurrentName(String name) |
void |
setCurrentValue(Object v) |
void |
updateForValue() |
getCurrentIndex, getEntryCount, getStartLocation, getTypeDesc, hasCurrentIndex, hasPathSegment, inArray, inObject, inRoot, pathAsPointer, pathAsPointer, startLocation, toString, typeDesc
protected final JsonStreamContext _parent
protected final JsonLocation _startLocation
protected String _currentName
protected Object _currentValue
protected TokenBufferReadContext(JsonStreamContext base, ContentReference srcRef)
@Deprecated protected TokenBufferReadContext(JsonStreamContext base, Object srcRef)
protected TokenBufferReadContext(JsonStreamContext base, JsonLocation startLoc)
protected TokenBufferReadContext()
protected TokenBufferReadContext(TokenBufferReadContext parent, int type, int index)
public Object getCurrentValue()
getCurrentValue
in class JsonStreamContext
public void setCurrentValue(Object v)
setCurrentValue
in class JsonStreamContext
public static TokenBufferReadContext createRootContext(JsonStreamContext origContext)
public TokenBufferReadContext createChildArrayContext()
public TokenBufferReadContext createChildObjectContext()
public TokenBufferReadContext parentOrCopy()
public String getCurrentName()
getCurrentName
in class JsonStreamContext
public boolean hasCurrentName()
hasCurrentName
in class JsonStreamContext
public JsonStreamContext getParent()
getParent
in class JsonStreamContext
public void setCurrentName(String name) throws JsonProcessingException
JsonProcessingException
public void updateForValue()
Copyright © 2008–2021 FasterXML. All rights reserved.