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
FieldsModifier and TypeFieldDescriptionprotected com.fasterxml.jackson.databind.ser.impl.PropertySerializerMapIf element type cannot be statically determined, mapping from runtime type to serializer is handled using this objectprotected final com.fasterxml.jackson.databind.JsonSerializer<Object> Value serializer to use, if it can be statically determinedprotected final com.fasterxml.jackson.databind.JavaTypeprotected final com.fasterxml.jackson.databind.util.NameTransformerTransformer used to add prefix and/or suffix for properties of unwrapped POJO.protected final com.fasterxml.jackson.databind.BeanPropertyCollection-valued property being serialized with this instanceprotected final booleanprotected final com.fasterxml.jackson.databind.jsontype.TypeSerializerType serializer used for values, if any.Fields inherited from class com.fasterxml.jackson.databind.ser.std.StdSerializer
_handledType -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedUnwrappingAsArraySerializerBase(UnwrappingAsArraySerializerBase<?> src, com.fasterxml.jackson.databind.BeanProperty property, com.fasterxml.jackson.databind.jsontype.TypeSerializer vts, com.fasterxml.jackson.databind.JsonSerializer<?> elementSerializer) protectedUnwrappingAsArraySerializerBase(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.protectedUnwrappingAsArraySerializerBase(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 TypeMethodDescriptionprotected 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) voidacceptJsonFormatVisitor(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 tocreateContextualof content serializer, if known statically.com.fasterxml.jackson.databind.JsonSerializer<?> com.fasterxml.jackson.databind.JavaTypevoidserialize(T value, com.fasterxml.jackson.core.JsonGenerator gen, com.fasterxml.jackson.databind.SerializerProvider provider) protected abstract voidserializeContents(T value, com.fasterxml.jackson.core.JsonGenerator gen, com.fasterxml.jackson.databind.SerializerProvider provider) voidserializeWithType(T value, com.fasterxml.jackson.core.JsonGenerator gen, com.fasterxml.jackson.databind.SerializerProvider provider, com.fasterxml.jackson.databind.jsontype.TypeSerializer typeSer) abstract UnwrappingAsArraySerializerBase<T> 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, withValueTypeSerializerMethods 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, wrapAndThrowMethods inherited from class com.fasterxml.jackson.databind.JsonSerializer
getDelegatee, isEmpty, isEmpty, isUnwrappingSerializer, properties, replaceDelegatee, unwrappingSerializer, usesObjectId, withFilterId, withIgnoredProperties
-
Field Details
-
_elementType
protected final com.fasterxml.jackson.databind.JavaType _elementType -
_property
protected final com.fasterxml.jackson.databind.BeanProperty _propertyCollection-valued property being serialized with this instance -
_staticTyping
protected final boolean _staticTyping -
_valueTypeSerializer
protected final com.fasterxml.jackson.databind.jsontype.TypeSerializer _valueTypeSerializerType serializer used for values, if any. -
_elementSerializer
Value serializer to use, if it can be statically determined -
_dynamicSerializers
protected com.fasterxml.jackson.databind.ser.impl.PropertySerializerMap _dynamicSerializersIf 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 _nameTransformerTransformer 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 tocreateContextualof content serializer, if known statically.- Specified by:
createContextualin interfacecom.fasterxml.jackson.databind.ser.ContextualSerializer- Throws:
com.fasterxml.jackson.databind.JsonMappingException
-
getContentType
public com.fasterxml.jackson.databind.JavaType getContentType()- Specified by:
getContentTypein classcom.fasterxml.jackson.databind.ser.ContainerSerializer<T>
-
getContentSerializer
public com.fasterxml.jackson.databind.JsonSerializer<?> getContentSerializer()- Specified by:
getContentSerializerin classcom.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:
serializein classcom.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:
serializeWithTypein classcom.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:
acceptJsonFormatVisitorin interfacecom.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatVisitable- Overrides:
acceptJsonFormatVisitorin classcom.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
-