public final class ProtobufReadContext
extends com.fasterxml.jackson.core.JsonStreamContext
JsonReadContext
to support features needed to decode nested Protobuf messages.Modifier and Type | Field and Description |
---|---|
protected ProtobufReadContext |
_child |
protected String |
_currentName |
protected Object |
_currentValue |
protected int |
_endOffset
Offset within input buffer where the message represented
by this context (if message context) ends.
|
protected ProtobufField |
_field
For array contexts: field that defines type of array values.
|
protected ProtobufMessage |
_messageType
Type of current context.
|
protected ProtobufReadContext |
_parent
Parent context for this context; null for root context.
|
Constructor and Description |
---|
ProtobufReadContext(ProtobufReadContext parent,
ProtobufMessage messageType,
int type,
int endOffset) |
Modifier and Type | Method and Description |
---|---|
int |
adjustEnd(int bytesConsumed)
Method called when loading more input, or moving existing data;
this requires adjusting relative end offset as well, except for
root context.
|
ProtobufReadContext |
createChildArrayContext(ProtobufField f) |
ProtobufReadContext |
createChildArrayContext(ProtobufField f,
int endOffset) |
ProtobufReadContext |
createChildObjectContext(ProtobufMessage messageType,
ProtobufField f,
int endOffset) |
static ProtobufReadContext |
createRootContext() |
String |
getCurrentName() |
Object |
getCurrentValue() |
int |
getEndOffset() |
ProtobufField |
getField() |
ProtobufMessage |
getMessageType() |
ProtobufReadContext |
getParent() |
protected void |
reset(ProtobufMessage messageType,
int type,
int endOffset) |
void |
setCurrentName(String name) |
void |
setCurrentValue(Object v) |
void |
setMessageType(ProtobufMessage mt) |
com.fasterxml.jackson.core.JsonLocation |
startLocation(com.fasterxml.jackson.core.io.ContentReference srcRef,
long byteOffset) |
String |
toString()
Overridden to provide developer readable "JsonPath" representation
of the context.
|
protected final ProtobufReadContext _parent
protected ProtobufMessage _messageType
protected ProtobufField _field
protected String _currentName
protected Object _currentValue
protected int _endOffset
protected ProtobufReadContext _child
public ProtobufReadContext(ProtobufReadContext parent, ProtobufMessage messageType, int type, int endOffset)
protected void reset(ProtobufMessage messageType, int type, int endOffset)
public Object getCurrentValue()
getCurrentValue
in class com.fasterxml.jackson.core.JsonStreamContext
public void setCurrentValue(Object v)
setCurrentValue
in class com.fasterxml.jackson.core.JsonStreamContext
public static ProtobufReadContext createRootContext()
public ProtobufReadContext createChildArrayContext(ProtobufField f)
public ProtobufReadContext createChildArrayContext(ProtobufField f, int endOffset)
public ProtobufReadContext createChildObjectContext(ProtobufMessage messageType, ProtobufField f, int endOffset)
public String getCurrentName()
getCurrentName
in class com.fasterxml.jackson.core.JsonStreamContext
public ProtobufReadContext getParent()
getParent
in class com.fasterxml.jackson.core.JsonStreamContext
public int adjustEnd(int bytesConsumed)
public int getEndOffset()
public ProtobufMessage getMessageType()
public ProtobufField getField()
public void setMessageType(ProtobufMessage mt)
public com.fasterxml.jackson.core.JsonLocation startLocation(com.fasterxml.jackson.core.io.ContentReference srcRef, long byteOffset)
public void setCurrentName(String name)
public String toString()
toString
in class com.fasterxml.jackson.core.JsonStreamContext
Copyright © 2022 FasterXML. All rights reserved.