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,
com.fasterxml.jackson.databind.jsontype.PolymorphicTypeValidator ptv) |
AvroTypeIdResolver(com.fasterxml.jackson.databind.JavaType baseType,
com.fasterxml.jackson.databind.type.TypeFactory typeFactory,
com.fasterxml.jackson.databind.jsontype.PolymorphicTypeValidator ptv,
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, construct, getDescForKnownTypeIds, getMechanism, idFromValue, idFromValueAndType, typeFromIdpublic AvroTypeIdResolver(com.fasterxml.jackson.databind.JavaType baseType,
com.fasterxml.jackson.databind.type.TypeFactory typeFactory,
com.fasterxml.jackson.databind.jsontype.PolymorphicTypeValidator ptv,
Collection<com.fasterxml.jackson.databind.jsontype.NamedType> subTypes)
public AvroTypeIdResolver(com.fasterxml.jackson.databind.JavaType baseType,
com.fasterxml.jackson.databind.type.TypeFactory typeFactory,
com.fasterxml.jackson.databind.jsontype.PolymorphicTypeValidator ptv)
public void registerSubtype(Class<?> type, String name)
registerSubtype in class com.fasterxml.jackson.databind.jsontype.impl.ClassNameIdResolverprotected 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.ClassNameIdResolverIOExceptionCopyright © 2020 FasterXML. All rights reserved.