Top Description Fields Constructors Methods
tools.jackson.dataformat.xml.ser

public Class XmlBeanSerializer

extends XmlBeanSerializerBase
Class Inheritance
Imports
java.util.Set, tools.jackson.core.JacksonException, .JsonGenerator, tools.jackson.databind.ValueSerializer, .SerializationContext, tools.jackson.databind.ser.BeanPropertyWriter, .BeanSerializer, tools.jackson.databind.ser.bean.BeanAsArraySerializer, .BeanSerializerBase, tools.jackson.databind.ser.impl.ObjectIdWriter, tools.jackson.databind.util.NameTransformer

Variant of BeanSerializer for XML handling.
Author
Pascal Gélinas

Field Summary

Inherited from tools.jackson.dataformat.xml.ser.XmlBeanSerializerBase:
_attributeCount_cdata_textPropertyIndex_xmlNamesKEY_XML_INFO

Constructor Summary

AccessConstructor and Description
public
public
public
public
protected

Method Summary

Modifier and TypeMethod and Description
protected BeanSerializerBase
asArraySerializer()

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

Implementation has to check whether as-array serialization is possible reliably; if (and only if) so, will construct a BeanAsArraySerializer, otherwise will return this serializer as is.

public void
serialize(Object bean, JsonGenerator g, SerializationContext ctxt)

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

Main serialization method that will delegate actual output to configured BeanPropertyWriter instances.

public String
toString()

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

Returns a string representation of the object.

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 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.dataformat.xml.ser.XmlBeanSerializerBase:
_isAttribute_isCData_orderAttributesFirst_serializeObjectId_serializeProperties_serializePropertiesFilteredserializeWithType

Constructor Detail

XmlBeanSerializerback to summary
public XmlBeanSerializer(BeanSerializerBase src)
XmlBeanSerializerback to summary
public XmlBeanSerializer(XmlBeanSerializerBase src, ObjectIdWriter objectIdWriter, Object filterId)
XmlBeanSerializerback to summary
public XmlBeanSerializer(XmlBeanSerializerBase src, ObjectIdWriter objectIdWriter)
XmlBeanSerializerback to summary
public XmlBeanSerializer(XmlBeanSerializerBase src, Set<String> toIgnore, Set<String> toInclude)
XmlBeanSerializerback to summary
protected XmlBeanSerializer(XmlBeanSerializerBase src, BeanPropertyWriter[] properties, BeanPropertyWriter[] filteredProperties)

Method Detail

asArraySerializerback to summary
protected BeanSerializerBase asArraySerializer()

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

Implementation has to check whether as-array serialization is possible reliably; if (and only if) so, will construct a BeanAsArraySerializer, otherwise will return this serializer as is.

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

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

Main serialization method that will delegate actual output to configured BeanPropertyWriter instances.

Annotations
@Override
toStringback to summary
public String toString()

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

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Annotations
@Override
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
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