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 | Method and Description |
---|---|
TokenBufferReadContext |
createChildArrayContext() |
TokenBufferReadContext |
createChildObjectContext() |
static TokenBufferReadContext |
createRootContext(JsonStreamContext origContext) |
java.lang.String |
getCurrentName()
Method for accessing name associated with the current location.
|
java.lang.Object |
getCurrentValue()
Method for accessing currently active value being used by data-binding
(as the source of streaming data to write, or destination of data being
read), at this level in hierarchy.
|
JsonStreamContext |
getParent()
Accessor for finding parent context of this context; will
return null for root context.
|
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(java.lang.String name) |
void |
setCurrentValue(java.lang.Object v)
Method to call to pass value to be returned via
JsonStreamContext.getCurrentValue() ; typically
called indirectly through JsonParser.setCurrentValue(java.lang.Object)
or JsonGenerator.setCurrentValue(java.lang.Object) ). |
void |
updateForValue() |
getCurrentIndex, getEntryCount, getStartLocation, getTypeDesc, hasCurrentIndex, hasPathSegment, inArray, inObject, inRoot, pathAsPointer, pathAsPointer, toString, typeDesc
public java.lang.Object getCurrentValue()
JsonStreamContext
Note that "current value" is NOT populated (or used) by Streaming parser or generator; it is only used by higher-level data-binding functionality. The reason it is included here is that it can be stored and accessed hierarchically, and gets passed through data-binding.
getCurrentValue
in class JsonStreamContext
public void setCurrentValue(java.lang.Object v)
JsonStreamContext
JsonStreamContext.getCurrentValue()
; typically
called indirectly through JsonParser.setCurrentValue(java.lang.Object)
or JsonGenerator.setCurrentValue(java.lang.Object)
).setCurrentValue
in class JsonStreamContext
public static TokenBufferReadContext createRootContext(JsonStreamContext origContext)
public TokenBufferReadContext createChildArrayContext()
public TokenBufferReadContext createChildObjectContext()
public TokenBufferReadContext parentOrCopy()
public java.lang.String getCurrentName()
JsonStreamContext
FIELD_NAME
and value events that directly
follow field names; null for root level and array values.getCurrentName
in class JsonStreamContext
public boolean hasCurrentName()
hasCurrentName
in class JsonStreamContext
public JsonStreamContext getParent()
JsonStreamContext
getParent
in class JsonStreamContext
public void setCurrentName(java.lang.String name) throws JsonProcessingException
JsonProcessingException
public void updateForValue()
Copyright © 2010 - 2020 Adobe. All Rights Reserved