Class TokenBufferReadContext
java.lang.Object
com.fasterxml.jackson.core.JsonStreamContext
com.fasterxml.jackson.databind.util.TokenBufferReadContext
public class TokenBufferReadContext
extends com.fasterxml.jackson.core.JsonStreamContext
Implementation of
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.- Since:
- 2.9
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected String
protected Object
protected final com.fasterxml.jackson.core.JsonStreamContext
protected final com.fasterxml.jackson.core.JsonLocation
Fields inherited from class com.fasterxml.jackson.core.JsonStreamContext
_index, _nestingDepth, _type, TYPE_ARRAY, TYPE_OBJECT, TYPE_ROOT
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Constructor for case where there is no real surrounding context: just create virtual ROOTprotected
TokenBufferReadContext
(com.fasterxml.jackson.core.JsonStreamContext base, com.fasterxml.jackson.core.io.ContentReference srcRef) protected
TokenBufferReadContext
(com.fasterxml.jackson.core.JsonStreamContext base, com.fasterxml.jackson.core.JsonLocation startLoc) protected
TokenBufferReadContext
(com.fasterxml.jackson.core.JsonStreamContext base, Object srcRef) Deprecated.protected
TokenBufferReadContext
(TokenBufferReadContext parent, int type, int index) -
Method Summary
Modifier and TypeMethodDescriptionstatic TokenBufferReadContext
createRootContext
(com.fasterxml.jackson.core.JsonStreamContext origContext) com.fasterxml.jackson.core.JsonStreamContext
boolean
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
void
Methods inherited from class com.fasterxml.jackson.core.JsonStreamContext
getCurrentIndex, getEntryCount, getNestingDepth, getStartLocation, getTypeDesc, hasCurrentIndex, hasPathSegment, inArray, inObject, inRoot, pathAsPointer, pathAsPointer, startLocation, toString, typeDesc
-
Field Details
-
_parent
protected final com.fasterxml.jackson.core.JsonStreamContext _parent -
_startLocation
protected final com.fasterxml.jackson.core.JsonLocation _startLocation -
_currentName
-
_currentValue
-
-
Constructor Details
-
TokenBufferReadContext
protected TokenBufferReadContext(com.fasterxml.jackson.core.JsonStreamContext base, com.fasterxml.jackson.core.io.ContentReference srcRef) - Since:
- 2.13
-
TokenBufferReadContext
@Deprecated protected TokenBufferReadContext(com.fasterxml.jackson.core.JsonStreamContext base, Object srcRef) Deprecated. -
TokenBufferReadContext
protected TokenBufferReadContext(com.fasterxml.jackson.core.JsonStreamContext base, com.fasterxml.jackson.core.JsonLocation startLoc) -
TokenBufferReadContext
protected TokenBufferReadContext()Constructor for case where there is no real surrounding context: just create virtual ROOT -
TokenBufferReadContext
-
-
Method Details
-
getCurrentValue
- Overrides:
getCurrentValue
in classcom.fasterxml.jackson.core.JsonStreamContext
-
setCurrentValue
- Overrides:
setCurrentValue
in classcom.fasterxml.jackson.core.JsonStreamContext
-
createRootContext
public static TokenBufferReadContext createRootContext(com.fasterxml.jackson.core.JsonStreamContext origContext) -
createChildArrayContext
-
createChildObjectContext
-
parentOrCopy
Helper method we need to handle discontinuity between "real" contexts buffer creates, and ones from parent: problem being they are of different types. -
getCurrentName
- Specified by:
getCurrentName
in classcom.fasterxml.jackson.core.JsonStreamContext
-
hasCurrentName
public boolean hasCurrentName()- Overrides:
hasCurrentName
in classcom.fasterxml.jackson.core.JsonStreamContext
-
getParent
public com.fasterxml.jackson.core.JsonStreamContext getParent()- Specified by:
getParent
in classcom.fasterxml.jackson.core.JsonStreamContext
-
setCurrentName
- Throws:
com.fasterxml.jackson.core.JsonProcessingException
-
updateForValue
public void updateForValue()- Since:
- 2.10.1
-