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 Details

    • _parent

      protected final com.fasterxml.jackson.core.JsonStreamContext _parent
    • _startLocation

      protected final com.fasterxml.jackson.core.JsonLocation _startLocation
    • _currentName

      protected String _currentName
    • _currentValue

      protected Object _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

      protected TokenBufferReadContext(TokenBufferReadContext parent, int type, int index)
  • Method Details

    • getCurrentValue

      public Object getCurrentValue()
      Overrides:
      getCurrentValue in class com.fasterxml.jackson.core.JsonStreamContext
    • setCurrentValue

      public void setCurrentValue(Object v)
      Overrides:
      setCurrentValue in class com.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:
      getCurrentName in class com.fasterxml.jackson.core.JsonStreamContext
    • hasCurrentName

      public boolean hasCurrentName()
      Overrides:
      hasCurrentName in class com.fasterxml.jackson.core.JsonStreamContext
    • getParent

      public com.fasterxml.jackson.core.JsonStreamContext getParent()
      Specified by:
      getParent in class com.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