Top Description Fields Constructors Methods
tools.jackson.databind.util

public Class TokenBufferReadContext

extends TokenStreamContext
Class Inheritance
Imports
tools.jackson.core.*, tools.jackson.core.io.ContentReference, tools.jackson.core.json.JsonReadContext

Implementation of TokenStreamContext 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.

Field Summary

Modifier and TypeField and Description
protected String
protected Object
protected final TokenStreamContext
protected final TokenStreamLocation
Inherited from tools.jackson.core.TokenStreamContext:
_index_nestingDepth_typeTYPE_ARRAYTYPE_OBJECTTYPE_ROOT

Constructor Summary

AccessConstructor and Description
protected
protected
protected
TokenBufferReadContext()

Constructor for case where there is no real surrounding context: just create virtual ROOT

protected
TokenBufferReadContext(TokenBufferReadContext parent, int type, int index)

Method Summary

Modifier and TypeMethod and Description
public void
assignCurrentValue(Object v)

Overrides tools.jackson.core.TokenStreamContext.assignCurrentValue.

Method to call to pass value to be returned via currentValue; typically called indirectly through JsonParser#assignCurrentValue or JsonGenerator#assignCurrentValue).

public TokenBufferReadContext
public TokenBufferReadContext
public static TokenBufferReadContext
public String
currentName()

Implements abstract tools.jackson.core.TokenStreamContext.currentName.

Method for accessing name associated with the current location.

public Object
currentValue()

Overrides tools.jackson.core.TokenStreamContext.currentValue.

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.

public TokenStreamContext
getParent()

Implements abstract tools.jackson.core.TokenStreamContext.getParent.

Accessor for finding parent context of this context; will return null for root context.

public boolean
public 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.

public void
public void
Inherited from tools.jackson.core.TokenStreamContext:
getCurrentIndexgetEntryCountgetNestingDepthhasCurrentIndexhasPathSegmentinArrayinObjectinRootpathAsPointerpathAsPointerstartLocationtoStringtypeDesc

Field Detail

_currentNameback to summary
protected String _currentName
_currentValueback to summary
protected Object _currentValue
_parentback to summary
protected final TokenStreamContext _parent
_startLocationback to summary
protected final TokenStreamLocation _startLocation

Constructor Detail

TokenBufferReadContextback to summary
protected TokenBufferReadContext(TokenStreamContext base, ContentReference contentRef)
TokenBufferReadContextback to summary
protected TokenBufferReadContext(TokenStreamContext base, TokenStreamLocation startLoc)
TokenBufferReadContextback to summary
protected TokenBufferReadContext()

Constructor for case where there is no real surrounding context: just create virtual ROOT

TokenBufferReadContextback to summary
protected TokenBufferReadContext(TokenBufferReadContext parent, int type, int index)

Method Detail

assignCurrentValueback to summary
public void assignCurrentValue(Object v)

Overrides tools.jackson.core.TokenStreamContext.assignCurrentValue.

Doc from tools.jackson.core.TokenStreamContext.assignCurrentValue.

Method to call to pass value to be returned via currentValue; typically called indirectly through JsonParser#assignCurrentValue or JsonGenerator#assignCurrentValue).

Annotations
@Override
createChildArrayContextback to summary
public TokenBufferReadContext createChildArrayContext()
createChildObjectContextback to summary
public TokenBufferReadContext createChildObjectContext()
createRootContextback to summary
public static TokenBufferReadContext createRootContext(TokenStreamContext origContext)
currentNameback to summary
public String currentName()

Implements abstract tools.jackson.core.TokenStreamContext.currentName.

Doc from tools.jackson.core.TokenStreamContext.currentName.

Method for accessing name associated with the current location. Non-null for PROPERTY_NAME and value events that directly follow Property names; null for root level and array values.

Annotations
@Override
currentValueback to summary
public Object currentValue()

Overrides tools.jackson.core.TokenStreamContext.currentValue.

Doc from tools.jackson.core.TokenStreamContext.currentValue.

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.

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.

Annotations
@Override
getParentback to summary
public TokenStreamContext getParent()

Implements abstract tools.jackson.core.TokenStreamContext.getParent.

Doc from tools.jackson.core.TokenStreamContext.getParent.

Accessor for finding parent context of this context; will return null for root context.

Annotations
@Override
hasCurrentNameback to summary
public boolean hasCurrentName()

Overrides tools.jackson.core.TokenStreamContext.hasCurrentName.

Annotations
@Override
parentOrCopyback to summary
public 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.

setCurrentNameback to summary
public void setCurrentName(String name)
updateForValueback to summary
public void updateForValue()