Class UnwrappingAsArraySerializerBase<T>

java.lang.Object
com.fasterxml.jackson.databind.JsonSerializer<T>
com.fasterxml.jackson.databind.ser.std.StdSerializer<T>
com.fasterxml.jackson.databind.ser.ContainerSerializer<T>
com.regnosys.rosetta.common.serialisation.xml.serialization.UnwrappingAsArraySerializerBase<T>
All Implemented Interfaces:
com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatVisitable, com.fasterxml.jackson.databind.jsonschema.SchemaAware, com.fasterxml.jackson.databind.ser.ContextualSerializer, Serializable
Direct Known Subclasses:
UnwrappingIndexedListSerializer

public abstract class UnwrappingAsArraySerializerBase<T> extends com.fasterxml.jackson.databind.ser.ContainerSerializer<T> implements com.fasterxml.jackson.databind.ser.ContextualSerializer
A copy of the class AsArraySerializerBase, except that it will unwrap all items.
See Also:
  • Nested Class Summary

    Nested classes/interfaces inherited from class com.fasterxml.jackson.databind.JsonSerializer

    com.fasterxml.jackson.databind.JsonSerializer.None
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected com.fasterxml.jackson.databind.ser.impl.PropertySerializerMap
    If element type cannot be statically determined, mapping from runtime type to serializer is handled using this object
    protected final com.fasterxml.jackson.databind.JsonSerializer<Object>
    Value serializer to use, if it can be statically determined
    protected final com.fasterxml.jackson.databind.JavaType
     
    protected final com.fasterxml.jackson.databind.util.NameTransformer
    Transformer used to add prefix and/or suffix for properties of unwrapped POJO.
    protected final com.fasterxml.jackson.databind.BeanProperty
    Collection-valued property being serialized with this instance
    protected final boolean
     
    protected final com.fasterxml.jackson.databind.jsontype.TypeSerializer
    Type serializer used for values, if any.

    Fields inherited from class com.fasterxml.jackson.databind.ser.std.StdSerializer

    _handledType
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    UnwrappingAsArraySerializerBase(UnwrappingAsArraySerializerBase<?> src, com.fasterxml.jackson.databind.BeanProperty property, com.fasterxml.jackson.databind.jsontype.TypeSerializer vts, com.fasterxml.jackson.databind.JsonSerializer<?> elementSerializer)
     
    protected
    UnwrappingAsArraySerializerBase(Class<?> cls, com.fasterxml.jackson.databind.JavaType elementType, boolean staticTyping, com.fasterxml.jackson.databind.jsontype.TypeSerializer vts, com.fasterxml.jackson.databind.BeanProperty property, com.fasterxml.jackson.databind.JsonSerializer<?> elementSerializer, com.fasterxml.jackson.databind.util.NameTransformer nameTransformer)
    General purpose constructor.
    protected
    UnwrappingAsArraySerializerBase(Class<?> cls, com.fasterxml.jackson.databind.JavaType et, boolean staticTyping, com.fasterxml.jackson.databind.jsontype.TypeSerializer vts, com.fasterxml.jackson.databind.JsonSerializer<Object> elementSerializer, com.fasterxml.jackson.databind.util.NameTransformer nameTransformer)
    Non-contextual, "blueprint" constructor typically called when the first instance is created, without knowledge of property it was used via.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected final com.fasterxml.jackson.databind.JsonSerializer<Object>
    _findAndAddDynamic(com.fasterxml.jackson.databind.ser.impl.PropertySerializerMap map, com.fasterxml.jackson.databind.JavaType type, com.fasterxml.jackson.databind.SerializerProvider provider)
     
    protected final com.fasterxml.jackson.databind.JsonSerializer<Object>
    _findAndAddDynamic(com.fasterxml.jackson.databind.ser.impl.PropertySerializerMap map, Class<?> type, com.fasterxml.jackson.databind.SerializerProvider provider)
     
    void
    acceptJsonFormatVisitor(com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatVisitorWrapper visitor, com.fasterxml.jackson.databind.JavaType typeHint)
     
    com.fasterxml.jackson.databind.JsonSerializer<?>
    createContextual(com.fasterxml.jackson.databind.SerializerProvider serializers, com.fasterxml.jackson.databind.BeanProperty property)
    This method is needed to resolve contextual annotations like per-property overrides, as well as do recursive call to createContextual of content serializer, if known statically.
    com.fasterxml.jackson.databind.JsonSerializer<?>
     
    com.fasterxml.jackson.databind.JavaType
     
    void
    serialize(T value, com.fasterxml.jackson.core.JsonGenerator gen, com.fasterxml.jackson.databind.SerializerProvider provider)
     
    protected abstract void
    serializeContents(T value, com.fasterxml.jackson.core.JsonGenerator gen, com.fasterxml.jackson.databind.SerializerProvider provider)
     
    void
    serializeWithType(T value, com.fasterxml.jackson.core.JsonGenerator gen, com.fasterxml.jackson.databind.SerializerProvider provider, com.fasterxml.jackson.databind.jsontype.TypeSerializer typeSer)
     
    withResolved(com.fasterxml.jackson.databind.BeanProperty property, com.fasterxml.jackson.databind.jsontype.TypeSerializer vts, com.fasterxml.jackson.databind.JsonSerializer<?> elementSerializer)
     

    Methods inherited from class com.fasterxml.jackson.databind.ser.ContainerSerializer

    _withValueTypeSerializer, hasContentTypeAnnotation, hasSingleElement, withValueTypeSerializer

    Methods inherited from class com.fasterxml.jackson.databind.ser.std.StdSerializer

    _neitherNull, _nonEmpty, createSchemaNode, createSchemaNode, findAnnotatedContentSerializer, findContextualConvertingSerializer, findConvertingContentSerializer, findFormatFeature, findFormatOverrides, findIncludeOverrides, findPropertyFilter, getSchema, getSchema, handledType, isDefaultSerializer, visitArrayFormat, visitArrayFormat, visitFloatFormat, visitIntFormat, visitIntFormat, visitStringFormat, visitStringFormat, wrapAndThrow, wrapAndThrow

    Methods inherited from class com.fasterxml.jackson.databind.JsonSerializer

    getDelegatee, isEmpty, isEmpty, isUnwrappingSerializer, properties, replaceDelegatee, unwrappingSerializer, usesObjectId, withFilterId, withIgnoredProperties

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • _elementType

      protected final com.fasterxml.jackson.databind.JavaType _elementType
    • _property

      protected final com.fasterxml.jackson.databind.BeanProperty _property
      Collection-valued property being serialized with this instance
    • _staticTyping

      protected final boolean _staticTyping
    • _valueTypeSerializer

      protected final com.fasterxml.jackson.databind.jsontype.TypeSerializer _valueTypeSerializer
      Type serializer used for values, if any.
    • _elementSerializer

      protected final com.fasterxml.jackson.databind.JsonSerializer<Object> _elementSerializer
      Value serializer to use, if it can be statically determined
    • _dynamicSerializers

      protected com.fasterxml.jackson.databind.ser.impl.PropertySerializerMap _dynamicSerializers
      If element type cannot be statically determined, mapping from runtime type to serializer is handled using this object
    • _nameTransformer

      protected final com.fasterxml.jackson.databind.util.NameTransformer _nameTransformer
      Transformer used to add prefix and/or suffix for properties of unwrapped POJO.
  • Constructor Details

    • UnwrappingAsArraySerializerBase

      protected UnwrappingAsArraySerializerBase(Class<?> cls, com.fasterxml.jackson.databind.JavaType et, boolean staticTyping, com.fasterxml.jackson.databind.jsontype.TypeSerializer vts, com.fasterxml.jackson.databind.JsonSerializer<Object> elementSerializer, com.fasterxml.jackson.databind.util.NameTransformer nameTransformer)
      Non-contextual, "blueprint" constructor typically called when the first instance is created, without knowledge of property it was used via.
      Since:
      2.6
    • UnwrappingAsArraySerializerBase

      protected UnwrappingAsArraySerializerBase(Class<?> cls, com.fasterxml.jackson.databind.JavaType elementType, boolean staticTyping, com.fasterxml.jackson.databind.jsontype.TypeSerializer vts, com.fasterxml.jackson.databind.BeanProperty property, com.fasterxml.jackson.databind.JsonSerializer<?> elementSerializer, com.fasterxml.jackson.databind.util.NameTransformer nameTransformer)
      General purpose constructor. Use contextual constructors, if possible.
      Since:
      2.12
    • UnwrappingAsArraySerializerBase

      protected UnwrappingAsArraySerializerBase(UnwrappingAsArraySerializerBase<?> src, com.fasterxml.jackson.databind.BeanProperty property, com.fasterxml.jackson.databind.jsontype.TypeSerializer vts, com.fasterxml.jackson.databind.JsonSerializer<?> elementSerializer)
  • Method Details

    • withResolved

      public abstract UnwrappingAsArraySerializerBase<T> withResolved(com.fasterxml.jackson.databind.BeanProperty property, com.fasterxml.jackson.databind.jsontype.TypeSerializer vts, com.fasterxml.jackson.databind.JsonSerializer<?> elementSerializer)
      Since:
      2.6
    • createContextual

      public com.fasterxml.jackson.databind.JsonSerializer<?> createContextual(com.fasterxml.jackson.databind.SerializerProvider serializers, com.fasterxml.jackson.databind.BeanProperty property) throws com.fasterxml.jackson.databind.JsonMappingException
      This method is needed to resolve contextual annotations like per-property overrides, as well as do recursive call to createContextual of content serializer, if known statically.
      Specified by:
      createContextual in interface com.fasterxml.jackson.databind.ser.ContextualSerializer
      Throws:
      com.fasterxml.jackson.databind.JsonMappingException
    • getContentType

      public com.fasterxml.jackson.databind.JavaType getContentType()
      Specified by:
      getContentType in class com.fasterxml.jackson.databind.ser.ContainerSerializer<T>
    • getContentSerializer

      public com.fasterxml.jackson.databind.JsonSerializer<?> getContentSerializer()
      Specified by:
      getContentSerializer in class com.fasterxml.jackson.databind.ser.ContainerSerializer<T>
    • serialize

      public void serialize(T value, com.fasterxml.jackson.core.JsonGenerator gen, com.fasterxml.jackson.databind.SerializerProvider provider) throws IOException
      Specified by:
      serialize in class com.fasterxml.jackson.databind.ser.std.StdSerializer<T>
      Throws:
      IOException
    • serializeWithType

      public void serializeWithType(T value, com.fasterxml.jackson.core.JsonGenerator gen, com.fasterxml.jackson.databind.SerializerProvider provider, com.fasterxml.jackson.databind.jsontype.TypeSerializer typeSer) throws IOException
      Overrides:
      serializeWithType in class com.fasterxml.jackson.databind.JsonSerializer<T>
      Throws:
      IOException
    • serializeContents

      protected abstract void serializeContents(T value, com.fasterxml.jackson.core.JsonGenerator gen, com.fasterxml.jackson.databind.SerializerProvider provider) throws IOException
      Throws:
      IOException
    • acceptJsonFormatVisitor

      public void acceptJsonFormatVisitor(com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatVisitorWrapper visitor, com.fasterxml.jackson.databind.JavaType typeHint) throws com.fasterxml.jackson.databind.JsonMappingException
      Specified by:
      acceptJsonFormatVisitor in interface com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatVisitable
      Overrides:
      acceptJsonFormatVisitor in class com.fasterxml.jackson.databind.ser.std.StdSerializer<T>
      Throws:
      com.fasterxml.jackson.databind.JsonMappingException
    • _findAndAddDynamic

      protected final com.fasterxml.jackson.databind.JsonSerializer<Object> _findAndAddDynamic(com.fasterxml.jackson.databind.ser.impl.PropertySerializerMap map, Class<?> type, com.fasterxml.jackson.databind.SerializerProvider provider) throws com.fasterxml.jackson.databind.JsonMappingException
      Throws:
      com.fasterxml.jackson.databind.JsonMappingException
    • _findAndAddDynamic

      protected final com.fasterxml.jackson.databind.JsonSerializer<Object> _findAndAddDynamic(com.fasterxml.jackson.databind.ser.impl.PropertySerializerMap map, com.fasterxml.jackson.databind.JavaType type, com.fasterxml.jackson.databind.SerializerProvider provider) throws com.fasterxml.jackson.databind.JsonMappingException
      Throws:
      com.fasterxml.jackson.databind.JsonMappingException