com.fasterxml.jackson.dataformat.ion.polymorphism

## Class IonAnnotationTypeResolverBuilder

- java.lang.Object
- - com.fasterxml.jackson.dataformat.ion.polymorphism.IonAnnotationTypeResolverBuilder

- All Implemented Interfaces:
    com.fasterxml.jackson.databind.jsontype.TypeResolverBuilder<IonAnnotationTypeResolverBuilder>

      public class IonAnnotationTypeResolverBuilder
      extends Object
      implements com.fasterxml.jackson.databind.jsontype.TypeResolverBuilder<IonAnnotationTypeResolverBuilder>

  A `TypeResolverBuilder` which produces `TypeSerializer`s and `TypeDeserializer`s 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.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `IonAnnotationTypeResolverBuilder()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `com.fasterxml.jackson.databind.jsontype.TypeDeserializer` | `buildTypeDeserializer(com.fasterxml.jackson.databind.DeserializationConfig config, com.fasterxml.jackson.databind.JavaType baseType, Collection<com.fasterxml.jackson.databind.jsontype.NamedType> subtypes)` Creates a Jackson `TypeDeserializer`.
    `com.fasterxml.jackson.databind.jsontype.TypeSerializer` | `buildTypeSerializer(com.fasterxml.jackson.databind.SerializationConfig config, com.fasterxml.jackson.databind.JavaType baseType, Collection<com.fasterxml.jackson.databind.jsontype.NamedType> subtypes)` Creates a Jackson `TypeSerializer`.
    `IonAnnotationTypeResolverBuilder` | `defaultImpl(Class<?> di)`
    `Class<?>` | `getDefaultImpl()`
    `IonAnnotationTypeResolverBuilder` | `inclusion(com.fasterxml.jackson.annotation.JsonTypeInfo.As includeAs)`
    `IonAnnotationTypeResolverBuilder` | `init(com.fasterxml.jackson.annotation.JsonTypeInfo.Id idType, com.fasterxml.jackson.databind.jsontype.TypeIdResolver res)`
    `IonAnnotationTypeResolverBuilder` | `typeIdVisibility(boolean isVisible)`
    `IonAnnotationTypeResolverBuilder` | `typeProperty(String propName)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### IonAnnotationTypeResolverBuilder

          public IonAnnotationTypeResolverBuilder()

  - ### Method Detail

    - #### getDefaultImpl

          public Class<?> getDefaultImpl()

      Specified by:
        `getDefaultImpl` in interface `com.fasterxml.jackson.databind.jsontype.TypeResolverBuilder<IonAnnotationTypeResolverBuilder>`

    - #### buildTypeSerializer

          public com.fasterxml.jackson.databind.jsontype.TypeSerializer buildTypeSerializer(com.fasterxml.jackson.databind.SerializationConfig config,
                                                                                   com.fasterxml.jackson.databind.JavaType baseType,
                                                                                   Collection<com.fasterxml.jackson.databind.jsontype.NamedType> subtypes)

      Creates a Jackson `TypeSerializer`. Note that while Jackson type serializers are responsible for writing opening and closing metadata for types *in addition* to any type information, they are not involved with writing actual object data.
      Specified by:
        `buildTypeSerializer` in interface `com.fasterxml.jackson.databind.jsontype.TypeResolverBuilder<IonAnnotationTypeResolverBuilder>`
      Parameters:
        `config` -
        `baseType` -
        `subtypes` -

    - #### buildTypeDeserializer

          public com.fasterxml.jackson.databind.jsontype.TypeDeserializer buildTypeDeserializer(com.fasterxml.jackson.databind.DeserializationConfig config,
                                                                                       com.fasterxml.jackson.databind.JavaType baseType,
                                                                                       Collection<com.fasterxml.jackson.databind.jsontype.NamedType> subtypes)

      Creates a Jackson `TypeDeserializer`. Unlike type serializers, deserializers are responsible for *all* steps of value deserialization: read type information, find the actual object deserializer, and run it.
      Specified by:
        `buildTypeDeserializer` in interface `com.fasterxml.jackson.databind.jsontype.TypeResolverBuilder<IonAnnotationTypeResolverBuilder>`
      Parameters:
        `config` -
        `baseType` -
        `subtypes` -

    - #### init

          public IonAnnotationTypeResolverBuilder init(com.fasterxml.jackson.annotation.JsonTypeInfo.Id idType,
                                              com.fasterxml.jackson.databind.jsontype.TypeIdResolver res)

      Specified by:
        `init` in interface `com.fasterxml.jackson.databind.jsontype.TypeResolverBuilder<IonAnnotationTypeResolverBuilder>`

    - #### inclusion

          public IonAnnotationTypeResolverBuilder inclusion(com.fasterxml.jackson.annotation.JsonTypeInfo.As includeAs)

      Specified by:
        `inclusion` in interface `com.fasterxml.jackson.databind.jsontype.TypeResolverBuilder<IonAnnotationTypeResolverBuilder>`

    - #### typeProperty

          public IonAnnotationTypeResolverBuilder typeProperty(String propName)

      Specified by:
        `typeProperty` in interface `com.fasterxml.jackson.databind.jsontype.TypeResolverBuilder<IonAnnotationTypeResolverBuilder>`

    - #### defaultImpl

          public IonAnnotationTypeResolverBuilder defaultImpl(Class<?> di)

      Specified by:
        `defaultImpl` in interface `com.fasterxml.jackson.databind.jsontype.TypeResolverBuilder<IonAnnotationTypeResolverBuilder>`

    - #### typeIdVisibility

          public IonAnnotationTypeResolverBuilder typeIdVisibility(boolean isVisible)

      Specified by:
        `typeIdVisibility` in interface `com.fasterxml.jackson.databind.jsontype.TypeResolverBuilder<IonAnnotationTypeResolverBuilder>`

Copyright © 2017 FasterXML. All rights reserved.