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 ofJsonStreamContext
used byTokenBuffer
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
Fields Modifier and Type Field Description protected java.lang.String
_currentName
protected java.lang.Object
_currentValue
protected com.fasterxml.jackson.core.JsonStreamContext
_parent
protected com.fasterxml.jackson.core.JsonLocation
_startLocation
-
Constructor Summary
Constructors Modifier Constructor Description protected
TokenBufferReadContext()
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.JsonLocation startLoc)
protected
TokenBufferReadContext(com.fasterxml.jackson.core.JsonStreamContext base, java.lang.Object srcRef)
protected
TokenBufferReadContext(TokenBufferReadContext parent, int type, int index)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description TokenBufferReadContext
createChildArrayContext()
TokenBufferReadContext
createChildObjectContext()
static TokenBufferReadContext
createRootContext(com.fasterxml.jackson.core.JsonStreamContext origContext)
java.lang.String
getCurrentName()
java.lang.Object
getCurrentValue()
com.fasterxml.jackson.core.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(java.lang.String name)
void
setCurrentValue(java.lang.Object v)
void
updateForValue()
-
-
-
Constructor Detail
-
TokenBufferReadContext
protected TokenBufferReadContext(com.fasterxml.jackson.core.JsonStreamContext base, java.lang.Object srcRef)
-
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
protected TokenBufferReadContext(TokenBufferReadContext parent, int type, int index)
-
-
Method Detail
-
getCurrentValue
public java.lang.Object getCurrentValue()
- Overrides:
getCurrentValue
in classcom.fasterxml.jackson.core.JsonStreamContext
-
setCurrentValue
public void setCurrentValue(java.lang.Object v)
- Overrides:
setCurrentValue
in classcom.fasterxml.jackson.core.JsonStreamContext
-
createRootContext
public static TokenBufferReadContext createRootContext(com.fasterxml.jackson.core.JsonStreamContext origContext)
-
createChildArrayContext
public TokenBufferReadContext createChildArrayContext()
-
createChildObjectContext
public TokenBufferReadContext createChildObjectContext()
-
parentOrCopy
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.
-
getCurrentName
public java.lang.String 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
public void setCurrentName(java.lang.String name) throws com.fasterxml.jackson.core.JsonProcessingException
- Throws:
com.fasterxml.jackson.core.JsonProcessingException
-
updateForValue
public void updateForValue()
- Since:
- 2.10.1
-
-