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

public Class AvroTypeDeserializer

extends TypeDeserializerBase
Class Inheritance
Imports
java.io.IOException, com.fasterxml.jackson.annotation.JsonTypeInfo, com.fasterxml.jackson.core.JsonParser, com.fasterxml.jackson.databind.*, com.fasterxml.jackson.databind.jsontype.TypeDeserializer, .TypeIdResolver, com.fasterxml.jackson.databind.jsontype.impl.TypeDeserializerBase, com.fasterxml.jackson.dataformat.avro.schema.AvroSchemaHelper

Since
2.9

Field Summary

Modifier and TypeField and Description
private static final long
Inherited from com.fasterxml.jackson.databind.jsontype.impl.TypeDeserializerBase:
_baseType_defaultImpl_defaultImplDeserializer_deserializers_idResolver_property_typeIdVisible_typePropertyName

Constructor Summary

AccessConstructor and Description
protected
AvroTypeDeserializer(JavaType baseType, TypeIdResolver idRes, String typePropertyName, boolean typeIdVisible, JavaType defaultImpl)

protected

Method Summary

Modifier and TypeMethod and Description
protected JavaType
_handleUnknownTypeId(DeserializationContext ctxt, String typeId)

Overrides com.fasterxml.jackson.databind.jsontype.impl.TypeDeserializerBase._handleUnknownTypeId.

Helper method called when given type id cannot be resolved into concrete deserializer either directly (using given TypeIdResolver), or using default type.

public Object
deserializeTypedFromAny(JsonParser p, DeserializationContext ctxt)

Implements abstract com.fasterxml.jackson.databind.jsontype.TypeDeserializer.deserializeTypedFromAny.

Method called to let this type deserializer handle deserialization of "typed" object, when value itself may have been serialized using any kind of JSON value (Array, Object, scalar).

public Object
deserializeTypedFromArray(JsonParser p, DeserializationContext ctxt)

Implements abstract com.fasterxml.jackson.databind.jsontype.TypeDeserializer.deserializeTypedFromArray.

Method called to let this type deserializer handle deserialization of "typed" object, when value itself is serialized as JSON Array (regardless of Java type).

public Object
deserializeTypedFromObject(JsonParser p, DeserializationContext ctxt)

Implements abstract com.fasterxml.jackson.databind.jsontype.TypeDeserializer.deserializeTypedFromObject.

Method called to let this type deserializer handle deserialization of "typed" object, when value itself is serialized as JSON Object (regardless of Java type).

public Object
deserializeTypedFromScalar(JsonParser p, DeserializationContext ctxt)

Implements abstract com.fasterxml.jackson.databind.jsontype.TypeDeserializer.deserializeTypedFromScalar.

Method called to let this type deserializer handle deserialization of "typed" object, when value itself is serialized as a scalar JSON value (something other than Array or Object), regardless of Java type.

public TypeDeserializer
forProperty(BeanProperty prop)

Implements abstract com.fasterxml.jackson.databind.jsontype.impl.TypeDeserializerBase.forProperty.

Method called to create contextual version, to be used for values of given property.

public JsonTypeInfo.As
getTypeInclusion()

Implements abstract com.fasterxml.jackson.databind.jsontype.impl.TypeDeserializerBase.getTypeInclusion.

Accessor for type information inclusion method that deserializer uses; indicates how type information is (expected to be) embedded in JSON input.

Inherited from com.fasterxml.jackson.databind.jsontype.impl.TypeDeserializerBase:
_deserializeWithNativeTypeId_deserializeWithNativeTypeId_findDefaultImplDeserializer_findDeserializer_handleMissingTypeIdbaseTypebaseTypeNamegetDefaultImplgetPropertyNamegetTypeIdResolverhasDefaultImpltoString

Field Detail

serialVersionUIDback to summary
private static final long serialVersionUID

Hides com.fasterxml.jackson.databind.jsontype.impl.TypeDeserializerBase.serialVersionUID.

Constructor Detail

AvroTypeDeserializerback to summary
protected AvroTypeDeserializer(JavaType baseType, TypeIdResolver idRes, String typePropertyName, boolean typeIdVisible, JavaType defaultImpl)
AvroTypeDeserializerback to summary
protected AvroTypeDeserializer(TypeDeserializerBase src, BeanProperty property)

Method Detail

_handleUnknownTypeIdback to summary
protected JavaType _handleUnknownTypeId(DeserializationContext ctxt, String typeId) throws IOException

Overrides com.fasterxml.jackson.databind.jsontype.impl.TypeDeserializerBase._handleUnknownTypeId.

Doc from com.fasterxml.jackson.databind.jsontype.impl.TypeDeserializerBase._handleUnknownTypeId.

Helper method called when given type id cannot be resolved into concrete deserializer either directly (using given TypeIdResolver), or using default type. Default implementation simply throws a com.fasterxml.jackson.databind.JsonMappingException to indicate the problem; sub-classes may choose

Returns:JavaType

If it is possible to resolve type id into a JsonDeserializer should return that deserializer; otherwise throw an exception to indicate the problem.

Annotations
@Override
deserializeTypedFromAnyback to summary
public Object deserializeTypedFromAny(JsonParser p, DeserializationContext ctxt) throws IOException

Implements abstract com.fasterxml.jackson.databind.jsontype.TypeDeserializer.deserializeTypedFromAny.

Doc from com.fasterxml.jackson.databind.jsontype.TypeDeserializer.deserializeTypedFromAny.

Method called to let this type deserializer handle deserialization of "typed" object, when value itself may have been serialized using any kind of JSON value (Array, Object, scalar). Should only be called if JSON serialization is polymorphic (not Java type); for example when using JSON node representation, or "untyped" Java object (which may be Map, Collection, wrapper/primitive etc).

Annotations
@Override
deserializeTypedFromArrayback to summary
public Object deserializeTypedFromArray(JsonParser p, DeserializationContext ctxt) throws IOException

Implements abstract com.fasterxml.jackson.databind.jsontype.TypeDeserializer.deserializeTypedFromArray.

Doc from com.fasterxml.jackson.databind.jsontype.TypeDeserializer.deserializeTypedFromArray.

Method called to let this type deserializer handle deserialization of "typed" object, when value itself is serialized as JSON Array (regardless of Java type). Method needs to figure out intended polymorphic type, locate JsonDeserializer to use, and call it with JSON data to deserializer (which does not contain type information).

Annotations
@Override
deserializeTypedFromObjectback to summary
public Object deserializeTypedFromObject(JsonParser p, DeserializationContext ctxt) throws IOException

Implements abstract com.fasterxml.jackson.databind.jsontype.TypeDeserializer.deserializeTypedFromObject.

Doc from com.fasterxml.jackson.databind.jsontype.TypeDeserializer.deserializeTypedFromObject.

Method called to let this type deserializer handle deserialization of "typed" object, when value itself is serialized as JSON Object (regardless of Java type). Method needs to figure out intended polymorphic type, locate JsonDeserializer to use, and call it with JSON data to deserializer (which does not contain type information).

Annotations
@Override
deserializeTypedFromScalarback to summary
public Object deserializeTypedFromScalar(JsonParser p, DeserializationContext ctxt) throws IOException

Implements abstract com.fasterxml.jackson.databind.jsontype.TypeDeserializer.deserializeTypedFromScalar.

Doc from com.fasterxml.jackson.databind.jsontype.TypeDeserializer.deserializeTypedFromScalar.

Method called to let this type deserializer handle deserialization of "typed" object, when value itself is serialized as a scalar JSON value (something other than Array or Object), regardless of Java type. Method needs to figure out intended polymorphic type, locate JsonDeserializer to use, and call it with JSON data to deserializer (which does not contain type information).

Annotations
@Override
forPropertyback to summary
public TypeDeserializer forProperty(BeanProperty prop)

Implements abstract com.fasterxml.jackson.databind.jsontype.impl.TypeDeserializerBase.forProperty.

Doc from com.fasterxml.jackson.databind.jsontype.TypeDeserializer.forProperty.

Method called to create contextual version, to be used for values of given property. This may be the type itself (as is the case for bean properties), or values contained (for java.util.Collection or java.util.Map valued properties).

Annotations
@Override
getTypeInclusionback to summary
public JsonTypeInfo.As getTypeInclusion()

Implements abstract com.fasterxml.jackson.databind.jsontype.impl.TypeDeserializerBase.getTypeInclusion.

Doc from com.fasterxml.jackson.databind.jsontype.TypeDeserializer.getTypeInclusion.

Accessor for type information inclusion method that deserializer uses; indicates how type information is (expected to be) embedded in JSON input.

Annotations
@Override