com.fasterxml.jackson.dataformat.ion.polymorphism

## Class IonAnnotationTypeSerializer

- java.lang.Object
- - com.fasterxml.jackson.databind.jsontype.TypeSerializer
  - - com.fasterxml.jackson.databind.jsontype.impl.TypeSerializerBase
    - - com.fasterxml.jackson.dataformat.ion.polymorphism.IonAnnotationTypeSerializer

-     public class IonAnnotationTypeSerializer
      extends com.fasterxml.jackson.databind.jsontype.impl.TypeSerializerBase

  This is a `TypeSerializer` that places typing metadata in Ion type annotations. It requires that the underlying `JsonGenerator` is actually a `IonGenerator`.

  Type serializers are responsible for handling the preamble and postamble of values, in addition to any possible typing metadata (probably because type metadata can affect the pre/postamble content) -- in other words, once a `TypeSerializer` gets involved, serializers skip normal pre/postambles and assume the TypeSerializer will do it instead. This is why we have to do more than write type metadata in our writeTypePrefix/Suffix* implementations.

  See Also:
    `MultipleTypeIdResolver`

- - ### Field Summary

    - ### Fields inherited from class com.fasterxml.jackson.databind.jsontype.impl.TypeSerializerBase

      `_idResolver, _property`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `_generateTypeId(com.fasterxml.jackson.core.type.WritableTypeId idMetadata)`
    `com.fasterxml.jackson.databind.jsontype.TypeSerializer` | `forProperty(com.fasterxml.jackson.databind.BeanProperty prop)`
    `com.fasterxml.jackson.annotation.JsonTypeInfo.As` | `getTypeInclusion()`

    - ### Methods inherited from class com.fasterxml.jackson.databind.jsontype.impl.TypeSerializerBase

      `getPropertyName, getTypeIdResolver, handleMissingId, idFromValue, idFromValueAndType, writeTypePrefix, writeTypeSuffix`

    - ### Methods inherited from class com.fasterxml.jackson.databind.jsontype.TypeSerializer

      `_writeLegacySuffix, typeId, typeId, typeId, writeCustomTypePrefixForArray, writeCustomTypePrefixForObject, writeCustomTypePrefixForScalar, writeCustomTypeSuffixForArray, writeCustomTypeSuffixForObject, writeCustomTypeSuffixForScalar, writeTypePrefixForArray, writeTypePrefixForArray, writeTypePrefixForObject, writeTypePrefixForObject, writeTypePrefixForScalar, writeTypePrefixForScalar, writeTypeSuffixForArray, writeTypeSuffixForObject, writeTypeSuffixForScalar`

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

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

- - ### Method Detail

    - #### forProperty

          public com.fasterxml.jackson.databind.jsontype.TypeSerializer forProperty(com.fasterxml.jackson.databind.BeanProperty prop)

      Specified by:
        `forProperty` in class `com.fasterxml.jackson.databind.jsontype.TypeSerializer`

    - #### getTypeInclusion

          public com.fasterxml.jackson.annotation.JsonTypeInfo.As getTypeInclusion()

      Specified by:
        `getTypeInclusion` in class `com.fasterxml.jackson.databind.jsontype.impl.TypeSerializerBase`

    - #### _generateTypeId

          protected final void _generateTypeId(com.fasterxml.jackson.core.type.WritableTypeId idMetadata)

      Overrides:
        `_generateTypeId` in class `com.fasterxml.jackson.databind.jsontype.impl.TypeSerializerBase`

Copyright © 2017 FasterXML. All rights reserved.