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 Stringprotected Objectprotected final com.fasterxml.jackson.core.JsonStreamContextprotected final com.fasterxml.jackson.core.JsonLocationFields inherited from class com.fasterxml.jackson.core.JsonStreamContext
_index, _nestingDepth, _type, TYPE_ARRAY, TYPE_OBJECT, TYPE_ROOT -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedConstructor for case where there is no real surrounding context: just create virtual ROOTprotectedTokenBufferReadContext(com.fasterxml.jackson.core.JsonStreamContext base, com.fasterxml.jackson.core.io.ContentReference srcRef) protectedTokenBufferReadContext(com.fasterxml.jackson.core.JsonStreamContext base, com.fasterxml.jackson.core.JsonLocation startLoc) protectedTokenBufferReadContext(com.fasterxml.jackson.core.JsonStreamContext base, Object srcRef) Deprecated.protectedTokenBufferReadContext(TokenBufferReadContext parent, int type, int index) -
Method Summary
Modifier and TypeMethodDescriptionstatic TokenBufferReadContextcreateRootContext(com.fasterxml.jackson.core.JsonStreamContext origContext) com.fasterxml.jackson.core.JsonStreamContextbooleanHelper method we need to handle discontinuity between "real" contexts buffer creates, and ones from parent: problem being they are of different types.voidsetCurrentName(String name) voidvoidMethods 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:
getCurrentValuein classcom.fasterxml.jackson.core.JsonStreamContext
-
setCurrentValue
- Overrides:
setCurrentValuein 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:
getCurrentNamein classcom.fasterxml.jackson.core.JsonStreamContext
-
hasCurrentName
public boolean hasCurrentName()- Overrides:
hasCurrentNamein classcom.fasterxml.jackson.core.JsonStreamContext
-
getParent
public com.fasterxml.jackson.core.JsonStreamContext getParent()- Specified by:
getParentin classcom.fasterxml.jackson.core.JsonStreamContext
-
setCurrentName
- Throws:
com.fasterxml.jackson.core.JsonProcessingException
-
updateForValue
public void updateForValue()- Since:
- 2.10.1
-