TypeResolverBuilder which produces TypeSerializers and TypeDeserializers that use
Ion type annotations to communicate type metadata. Jackson polymorphism, the Ion way.
This TypeResolverBuilder expects to be initialized with a functional TypeIdResolver, and will serialize
type information (and deserialize to something other than the default type) when it resolves the provided
JavaType to a non-null type identifier, and vice versa.
| Modifier and Type | Field and Description |
|---|---|
| private Class | |
| private TypeIdResolver | |
| private boolean | typeIdVisible
Whether type id should be exposed to deserializers or not |
| Access | Constructor and Description |
|---|---|
| protected | |
| protected | |
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public TypeDeserializer | buildTypeDeserializer(DeserializationContext ctxt, JavaType baseType, Collection<NamedType> subtypes)
Implements tools. Creates a Jackson |
| public TypeSerializer | buildTypeSerializer(SerializationContext ctxt, JavaType baseType, Collection<NamedType> subtypes)
Implements tools. Creates a Jackson |
| public static IonAnnotationTypeResolverBuilder | |
| public Class | getDefaultImpl()
Implements tools. Accessor for currently configured default type; implementation class that may be used in case no valid type information is available during type resolution |
| public IonAnnotationTypeResolverBuilder | init(JsonTypeInfo.
Implements tools. Initialization method that is called right after constructing the builder instance, in cases where information could not be passed directly (for example when instantiated for an annotation) |
| public IonAnnotationTypeResolverBuilder | withDefaultImpl(Class<?> newDefaultImpl)
Implements tools. "Mutant factory" method for creating a new instance with different default implementation to use if type id is either not available, or cannot be resolved. |
| public IonAnnotationTypeResolverBuilder | withSettings(JsonTypeInfo.
Implements tools. Method for overriding type information. |
| defaultImpl | back to summary |
|---|---|
| private Class<?> defaultImpl | |
| typeIdResolver | back to summary |
|---|---|
| private TypeIdResolver typeIdResolver | |
| typeIdVisible | back to summary |
|---|---|
| private boolean typeIdVisible Whether type id should be exposed to deserializers or not | |
| IonAnnotationTypeResolverBuilder | back to summary |
|---|---|
| protected IonAnnotationTypeResolverBuilder() | |
| IonAnnotationTypeResolverBuilder | back to summary |
|---|---|
| protected IonAnnotationTypeResolverBuilder(Class<?> defaultImpl, TypeIdResolver idResolver) | |
| IonAnnotationTypeResolverBuilder | back to summary |
|---|---|
| protected IonAnnotationTypeResolverBuilder(IonAnnotationTypeResolverBuilder base, Class<?> defaultImpl) | |
| buildTypeDeserializer | back to summary |
|---|---|
| public TypeDeserializer buildTypeDeserializer(DeserializationContext ctxt, JavaType baseType, Collection<NamedType> subtypes) Implements tools. Creates a Jackson
| |
| buildTypeSerializer | back to summary |
|---|---|
| public TypeSerializer buildTypeSerializer(SerializationContext ctxt, JavaType baseType, Collection<NamedType> subtypes) Implements tools. Creates a Jackson
| |
| construct | back to summary |
|---|---|
| public static IonAnnotationTypeResolverBuilder construct(JavaType baseType, JsonTypeInfo. | |
| getDefaultImpl | back to summary |
|---|---|
| public Class Implements tools. Doc from tools. Accessor for currently configured default type; implementation class that may be used in case no valid type information is available during type resolution
| |
| init | back to summary |
|---|---|
| public IonAnnotationTypeResolverBuilder init(JsonTypeInfo. Implements tools. Doc from tools. Initialization method that is called right after constructing the builder instance, in cases where information could not be passed directly (for example when instantiated for an annotation)
| |
| withDefaultImpl | back to summary |
|---|---|
| public IonAnnotationTypeResolverBuilder withDefaultImpl(Class<?> newDefaultImpl) Implements tools. Doc from tools. "Mutant factory" method for creating a new instance with different default implementation to use if type id is either not available, or cannot be resolved.
In Jackson 2.x there was instead method
| |
| withSettings | back to summary |
|---|---|
| public IonAnnotationTypeResolverBuilder withSettings(JsonTypeInfo. Implements tools. Doc from tools. Method for overriding type information.
| |