Class TokenBufferReadContext
- java.lang.Object
-
- com.fasterxml.jackson.core.JsonStreamContext
-
- com.fasterxml.jackson.databind.util.TokenBufferReadContext
-
public class TokenBufferReadContext extends com.fasterxml.jackson.core.JsonStreamContextImplementation ofJsonStreamContextused byTokenBufferto 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 String_currentNameprotected Object_currentValueprotected com.fasterxml.jackson.core.JsonStreamContext_parentprotected com.fasterxml.jackson.core.JsonLocation_startLocation
-
Constructor Summary
Constructors Modifier Constructor Description protectedTokenBufferReadContext()Constructor for case where there is no real surrounding context: just create virtual ROOTprotectedTokenBufferReadContext(com.fasterxml.jackson.core.JsonStreamContext base, com.fasterxml.jackson.core.JsonLocation startLoc)protectedTokenBufferReadContext(com.fasterxml.jackson.core.JsonStreamContext base, Object srcRef)protectedTokenBufferReadContext(TokenBufferReadContext parent, int type, int index)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description TokenBufferReadContextcreateChildArrayContext()TokenBufferReadContextcreateChildObjectContext()static TokenBufferReadContextcreateRootContext(com.fasterxml.jackson.core.JsonStreamContext origContext)StringgetCurrentName()ObjectgetCurrentValue()com.fasterxml.jackson.core.JsonStreamContextgetParent()booleanhasCurrentName()TokenBufferReadContextparentOrCopy()Helper 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)voidsetCurrentValue(Object v)voidupdateForValue()
-
-
-
Constructor Detail
-
TokenBufferReadContext
protected TokenBufferReadContext(com.fasterxml.jackson.core.JsonStreamContext base, 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 Object getCurrentValue()
- Overrides:
getCurrentValuein classcom.fasterxml.jackson.core.JsonStreamContext
-
setCurrentValue
public void setCurrentValue(Object v)
- Overrides:
setCurrentValuein 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 String 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
public void setCurrentName(String name) throws com.fasterxml.jackson.core.JsonProcessingException
- Throws:
com.fasterxml.jackson.core.JsonProcessingException
-
updateForValue
public void updateForValue()
- Since:
- 2.10.1
-
-