Top Description Fields Constructors Methods
com.fasterxml.jackson.dataformat.avro.deser

public abstract Class AvroReadContext

extends JsonStreamContext
Class Inheritance
Known Direct Subclasses
com.fasterxml.jackson.dataformat.avro.deser.AvroStructureReader, com.fasterxml.jackson.dataformat.avro.deser.MissingReader, com.fasterxml.jackson.dataformat.avro.deser.RootReader
Imports
java.io.IOException, com.fasterxml.jackson.core.JsonStreamContext, .JsonToken

We need to use a custom context to be able to carry along Object and array records.

Field Summary

Modifier and TypeField and Description
protected Object
protected final AvroReadContext
protected final String
Inherited from com.fasterxml.jackson.core.JsonStreamContext:
_index_nestingDepth_typeTYPE_ARRAYTYPE_OBJECTTYPE_ROOT

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected void
protected abstract void
public String
getCurrentName()

Implements abstract com.fasterxml.jackson.core.JsonStreamContext.getCurrentName.

Method for accessing name associated with the current location.

public abstract JsonToken
public Object
getCurrentValue()

Overrides com.fasterxml.jackson.core.JsonStreamContext.getCurrentValue.

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 final AvroReadContext
getParent()

Implements abstract com.fasterxml.jackson.core.JsonStreamContext.getParent.

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

public long
public String
public abstract String
public abstract JsonToken
public void
setCurrentValue(Object
Current value to assign to this context
v
)

Overrides com.fasterxml.jackson.core.JsonStreamContext.setCurrentValue.

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

public abstract void
public final String
toString()

Overrides com.fasterxml.jackson.core.JsonStreamContext.toString.

Overridden to provide developer writeable "JsonPath" representation of the context.

Inherited from com.fasterxml.jackson.core.JsonStreamContext:
getCurrentIndexgetEntryCountgetNestingDepthgetStartLocationgetTypeDeschasCurrentIndexhasCurrentNamehasPathSegmentinArrayinObjectinRootpathAsPointerpathAsPointerstartLocationtypeDesc

Field Detail

_currentValueback to summary
protected Object _currentValue
Since
2.9
_parentback to summary
protected final AvroReadContext _parent
_typeIdback to summary
protected final String _typeId

Constructor Detail

AvroReadContextback to summary
public AvroReadContext(AvroReadContext parent, String typeId)

Method Detail

_reportErrorback to summary
protected void _reportError()
Since
2.8.7 public abstract boolean isEnd() { }
appendDescback to summary
protected abstract void appendDesc(StringBuilder sb)
getCurrentNameback to summary
public String getCurrentName()

Implements abstract com.fasterxml.jackson.core.JsonStreamContext.getCurrentName.

Doc from com.fasterxml.jackson.core.JsonStreamContext.getCurrentName.

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

Returns:String

Current field name within context, if any; null if none

Annotations
@Override
getCurrentTokenback to summary
public abstract JsonToken getCurrentToken()
getCurrentValueback to summary
public Object getCurrentValue()

Overrides com.fasterxml.jackson.core.JsonStreamContext.getCurrentValue.

Doc from com.fasterxml.jackson.core.JsonStreamContext.getCurrentValue.

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.

Returns:Object

Currently active value, if one has been assigned.

Annotations
@Override
getParentback to summary
public final AvroReadContext getParent()

Implements abstract com.fasterxml.jackson.core.JsonStreamContext.getParent.

Doc from com.fasterxml.jackson.core.JsonStreamContext.getParent.

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

Returns:AvroReadContext

Parent context of this context, if any; null for Root contexts

Annotations
@Override
getRemainingElementsback to summary
public long getRemainingElements()
getTypeIdback to summary
public String getTypeId()
nextFieldNameback to summary
public abstract String nextFieldName() throws IOException
nextTokenback to summary
public abstract JsonToken nextToken() throws IOException
setCurrentValueback to summary
public void setCurrentValue(Object v)

Overrides com.fasterxml.jackson.core.JsonStreamContext.setCurrentValue.

Doc from com.fasterxml.jackson.core.JsonStreamContext.setCurrentValue.

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

Parameters
v:Object

Current value to assign to this context

Annotations
@Override
skipValueback to summary
public abstract void skipValue(AvroParserImpl parser) throws IOException
toStringback to summary
public final String toString()

Overrides com.fasterxml.jackson.core.JsonStreamContext.toString.

Overridden to provide developer writeable "JsonPath" representation of the context.

Returns:String

Doc from com.fasterxml.jackson.core.JsonStreamContext.toString.

Simple developer-readable description this context layer (note: NOT constructed with parents, unlike pathAsPointer)

Annotations
@Override