Top Fields Constructors Methods
tools.jackson.databind.ser

public Class UnrolledBeanSerializer

extends BeanSerializerBase
Class Inheritance
Annotations
@JacksonStdImpl
Imports
java.util.Set, tools.jackson.core.JacksonException, .JsonGenerator, tools.jackson.databind.*, tools.jackson.databind.annotation.JacksonStdImpl, tools.jackson.databind.ser.bean.BeanAsArraySerializer, .BeanSerializerBase, .UnwrappingBeanSerializer, tools.jackson.databind.ser.impl.ObjectIdWriter, tools.jackson.databind.util.NameTransformer

Since
3.0

Field Summary

Modifier and TypeField and Description
protected BeanPropertyWriter
protected BeanPropertyWriter
protected BeanPropertyWriter
protected BeanPropertyWriter
protected BeanPropertyWriter
protected BeanPropertyWriter
protected final int
private static final int
Inherited from tools.jackson.databind.ser.bean.BeanSerializerBase:
_beanType_filteredProps_objectIdWriter_propertyFilterId_props_serializationShape_typeIdNAME_FOR_OBJECT_REFNO_PROPS

Constructor Summary

AccessConstructor and Description
public
UnrolledBeanSerializer(JavaType type, BeanSerializerBuilder
Builder object that contains collected information that may be needed for serializer
builder
,
BeanPropertyWriter[]
Property writers used for actual serialization
properties
,
BeanPropertyWriter[] filteredProperties)

protected
protected

Method Summary

Modifier and TypeMethod and Description
private void
protected BeanSerializerBase
asArraySerializer()

Implements abstract tools.jackson.databind.ser.bean.BeanSerializerBase.asArraySerializer.

Mutant factory for creating a variant that output POJO as a JSON Array.

public void
resolve(SerializationContext provider)

Overrides tools.jackson.databind.ser.bean.BeanSerializerBase.resolve.

We need to resolve dependant serializers here to be able to properly handle cyclic type references.

public void
serialize(Object bean, JsonGenerator gen, SerializationContext provider)

Implements abstract tools.jackson.databind.ser.bean.BeanSerializerBase.serialize.

Method that can be called to ask implementation to serialize values of type this serializer handles.

protected void
public static UnrolledBeanSerializer
tryConstruct(JavaType type, BeanSerializerBuilder builder, BeanPropertyWriter[] properties, BeanPropertyWriter[] filteredProperties)

Factory method that will construct optimized instance if all the constraints are obeyed; or, if not, return `null` to indicate that instance cannot be created.

public ValueSerializer<Object>
unwrappingSerializer(NameTransformer unwrapper)

Implements abstract tools.jackson.databind.ser.bean.BeanSerializerBase.unwrappingSerializer.

Lets force sub-classes to implement this, to avoid accidental missing of handling...

protected BeanSerializerBase
withByNameInclusion(Set<String> toIgnore, Set<String> toInclude)

Implements abstract tools.jackson.databind.ser.bean.BeanSerializerBase.withByNameInclusion.

Mutant factory used for creating a new instance with additional set of properties to ignore or include (from properties this instance otherwise has)

public BeanSerializerBase
withFilterId(Object filterId)

Implements abstract tools.jackson.databind.ser.bean.BeanSerializerBase.withFilterId.

Mutant factory used for creating a new instance with different filter id (used with JsonFilter annotation)

public ValueSerializer<?>
withIgnoredProperties(Set<String> toIgnore)

Overrides tools.jackson.databind.ValueSerializer.withIgnoredProperties.

Mutant factory method called to create a new instance after excluding specified set of properties by name, if there is any.

public BeanSerializerBase
withObjectIdWriter(ObjectIdWriter objectIdWriter)

Implements abstract tools.jackson.databind.ser.bean.BeanSerializerBase.withObjectIdWriter.

Mutant factory used for creating a new instance with different ObjectIdWriter.

protected BeanSerializerBase
withProperties(BeanPropertyWriter[] properties, BeanPropertyWriter[] filteredProperties)

Implements abstract tools.jackson.databind.ser.bean.BeanSerializerBase.withProperties.

Mutant factory used for creating a new instance with modified set of properties

Inherited from tools.jackson.databind.ser.bean.BeanSerializerBase:
_serializeObjectId_serializeProperties_serializePropertiesFiltered_serializePropertiesMaybeView_serializePropertiesNoView_serializeWithObjectId_serializeWithObjectId_typeIdDefacceptJsonFormatVisitorcanCreateArraySerializercreateContextualfindConvertingSerializergetFilterIdhasViewPropertiespropertiespropertyCountserializeWithTypetoStringusesObjectId

Field Detail

_prop1back to summary
protected BeanPropertyWriter _prop1
_prop2back to summary
protected BeanPropertyWriter _prop2
_prop3back to summary
protected BeanPropertyWriter _prop3
_prop4back to summary
protected BeanPropertyWriter _prop4
_prop5back to summary
protected BeanPropertyWriter _prop5
_prop6back to summary
protected BeanPropertyWriter _prop6
_propCountback to summary
protected final int _propCount
MAX_PROPSback to summary
private static final int MAX_PROPS

Constructor Detail

UnrolledBeanSerializerback to summary
public UnrolledBeanSerializer(JavaType type, BeanSerializerBuilder builder, BeanPropertyWriter[] properties, BeanPropertyWriter[] filteredProperties)
Parameters
builder:BeanSerializerBuilder

Builder object that contains collected information that may be needed for serializer

properties:BeanPropertyWriter[]

Property writers used for actual serialization

UnrolledBeanSerializerback to summary
protected UnrolledBeanSerializer(UnrolledBeanSerializer src, Set<String> toIgnore, Set<String> toInclude)
UnrolledBeanSerializerback to summary
protected UnrolledBeanSerializer(UnrolledBeanSerializer src, BeanPropertyWriter[] properties, BeanPropertyWriter[] filteredProperties)

Method Detail

_calcUnrolledback to summary
private void _calcUnrolled()
asArraySerializerback to summary
protected BeanSerializerBase asArraySerializer()

Implements abstract tools.jackson.databind.ser.bean.BeanSerializerBase.asArraySerializer.

Doc from tools.jackson.databind.ser.bean.BeanSerializerBase.asArraySerializer.

Mutant factory for creating a variant that output POJO as a JSON Array. Implementations may ignore this request if output as array is not possible (either at all, or reliably).

Annotations
@Override
resolveback to summary
public void resolve(SerializationContext provider)

Overrides tools.jackson.databind.ser.bean.BeanSerializerBase.resolve.

Doc from tools.jackson.databind.ser.bean.BeanSerializerBase.resolve.

We need to resolve dependant serializers here to be able to properly handle cyclic type references.

Annotations
@Override
serializeback to summary
public void serialize(Object bean, JsonGenerator gen, SerializationContext provider) throws JacksonException

Implements abstract tools.jackson.databind.ser.bean.BeanSerializerBase.serialize.

Doc from tools.jackson.databind.ValueSerializer.serialize.

Method that can be called to ask implementation to serialize values of type this serializer handles.

Annotations
@Override
serializeNonFilteredback to summary
protected void serializeNonFiltered(Object bean, JsonGenerator gen, SerializationContext provider) throws JacksonException
tryConstructback to summary
public static UnrolledBeanSerializer tryConstruct(JavaType type, BeanSerializerBuilder builder, BeanPropertyWriter[] properties, BeanPropertyWriter[] filteredProperties)

Factory method that will construct optimized instance if all the constraints are obeyed; or, if not, return `null` to indicate that instance cannot be created.

unwrappingSerializerback to summary
public ValueSerializer<Object> unwrappingSerializer(NameTransformer unwrapper)

Implements abstract tools.jackson.databind.ser.bean.BeanSerializerBase.unwrappingSerializer.

Doc from tools.jackson.databind.ser.bean.BeanSerializerBase.unwrappingSerializer.

Lets force sub-classes to implement this, to avoid accidental missing of handling...

Annotations
@Override
withByNameInclusionback to summary
protected BeanSerializerBase withByNameInclusion(Set<String> toIgnore, Set<String> toInclude)

Implements abstract tools.jackson.databind.ser.bean.BeanSerializerBase.withByNameInclusion.

Doc from tools.jackson.databind.ser.bean.BeanSerializerBase.withByNameInclusion.

Mutant factory used for creating a new instance with additional set of properties to ignore or include (from properties this instance otherwise has)

Annotations
@Override
withFilterIdback to summary
public BeanSerializerBase withFilterId(Object filterId)

Implements abstract tools.jackson.databind.ser.bean.BeanSerializerBase.withFilterId.

Doc from tools.jackson.databind.ser.bean.BeanSerializerBase.withFilterId.

Mutant factory used for creating a new instance with different filter id (used with JsonFilter annotation)

Annotations
@Override
withIgnoredPropertiesback to summary
public ValueSerializer<?> withIgnoredProperties(Set<String> toIgnore)

Overrides tools.jackson.databind.ValueSerializer.withIgnoredProperties.

Doc from tools.jackson.databind.ValueSerializer.withIgnoredProperties.

Mutant factory method called to create a new instance after excluding specified set of properties by name, if there is any.

Annotations
@Override
withObjectIdWriterback to summary
public BeanSerializerBase withObjectIdWriter(ObjectIdWriter objectIdWriter)

Implements abstract tools.jackson.databind.ser.bean.BeanSerializerBase.withObjectIdWriter.

Doc from tools.jackson.databind.ser.bean.BeanSerializerBase.withObjectIdWriter.

Mutant factory used for creating a new instance with different ObjectIdWriter.

Annotations
@Override
withPropertiesback to summary
protected BeanSerializerBase withProperties(BeanPropertyWriter[] properties, BeanPropertyWriter[] filteredProperties)

Implements abstract tools.jackson.databind.ser.bean.BeanSerializerBase.withProperties.

Doc from tools.jackson.databind.ser.bean.BeanSerializerBase.withProperties.

Mutant factory used for creating a new instance with modified set of properties

Annotations
@Override