public class AvroTypeIdResolver
extends com.fasterxml.jackson.databind.jsontype.impl.ClassNameIdResolver
TypeIdResolver
for Avro type IDs embedded in schemas. Avro generally uses class names,
but we want to also support named subtypes so that developers can easily remap the embedded type IDs to a different runtime class.Constructor and Description |
---|
AvroTypeIdResolver(com.fasterxml.jackson.databind.JavaType baseType,
com.fasterxml.jackson.databind.type.TypeFactory typeFactory) |
AvroTypeIdResolver(com.fasterxml.jackson.databind.JavaType baseType,
com.fasterxml.jackson.databind.type.TypeFactory typeFactory,
Collection<com.fasterxml.jackson.databind.jsontype.NamedType> subTypes) |
Modifier and Type | Method and Description |
---|---|
protected com.fasterxml.jackson.databind.JavaType |
_typeFromId(String id,
com.fasterxml.jackson.databind.DatabindContext ctxt) |
void |
registerSubtype(Class<?> type,
String name) |
_idFrom, getDescForKnownTypeIds, getMechanism, idFromValue, idFromValueAndType, typeFromId
public AvroTypeIdResolver(com.fasterxml.jackson.databind.JavaType baseType, com.fasterxml.jackson.databind.type.TypeFactory typeFactory, Collection<com.fasterxml.jackson.databind.jsontype.NamedType> subTypes)
public AvroTypeIdResolver(com.fasterxml.jackson.databind.JavaType baseType, com.fasterxml.jackson.databind.type.TypeFactory typeFactory)
public void registerSubtype(Class<?> type, String name)
registerSubtype
in class com.fasterxml.jackson.databind.jsontype.impl.ClassNameIdResolver
protected com.fasterxml.jackson.databind.JavaType _typeFromId(String id, com.fasterxml.jackson.databind.DatabindContext ctxt) throws IOException
_typeFromId
in class com.fasterxml.jackson.databind.jsontype.impl.ClassNameIdResolver
IOException
Copyright © 2017 FasterXML. All rights reserved.