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

public Class UnwrappingXmlBeanSerializer

extends XmlBeanSerializerBase
Class Inheritance
Imports
java.util.Set, tools.jackson.core.*, tools.jackson.databind.*, tools.jackson.databind.ser.*, tools.jackson.databind.ser.bean.BeanSerializerBase, .UnwrappingBeanSerializer, tools.jackson.databind.ser.impl.ObjectIdWriter, tools.jackson.databind.util.NameTransformer

Copy of UnwrappingBeanSerializer required to extend XmlBeanSerializerBase for XML-specific handling.

Field Summary

Modifier and TypeField and Description
protected final NameTransformer
_nameTransformer

Transformer used to add prefix and/or suffix for properties of unwrapped POJO.

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

Constructor Summary

AccessConstructor and Description
public
UnwrappingXmlBeanSerializer(XmlBeanSerializerBase src, NameTransformer transformer)

Constructor used for creating unwrapping instance of a standard BeanSerializer

public
public
protected
protected

Method Summary

Modifier and TypeMethod and Description
protected BeanSerializerBase
asArraySerializer()

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

JSON Array output can not be done if unwrapping operation is requested; so implementation will simply return 'this'.

public boolean
isUnwrappingSerializer()

Overrides tools.jackson.databind.ValueSerializer.isUnwrappingSerializer.

Accessor for checking whether this serializer is an "unwrapping" serializer; this is necessary to know since it may also require caller to suppress writing of the leading property name.

public final 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 transformer)

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

Field Detail

_nameTransformerback to summary
protected final NameTransformer _nameTransformer

Transformer used to add prefix and/or suffix for properties of unwrapped POJO.

Constructor Detail

UnwrappingXmlBeanSerializerback to summary
public UnwrappingXmlBeanSerializer(XmlBeanSerializerBase src, NameTransformer transformer)

Constructor used for creating unwrapping instance of a standard BeanSerializer

UnwrappingXmlBeanSerializerback to summary
public UnwrappingXmlBeanSerializer(UnwrappingXmlBeanSerializer src, ObjectIdWriter objectIdWriter)
UnwrappingXmlBeanSerializerback to summary
public UnwrappingXmlBeanSerializer(UnwrappingXmlBeanSerializer src, ObjectIdWriter objectIdWriter, Object filterId)
UnwrappingXmlBeanSerializerback to summary
protected UnwrappingXmlBeanSerializer(UnwrappingXmlBeanSerializer src, Set<String> toIgnore, Set<String> toInclude)
UnwrappingXmlBeanSerializerback to summary
protected UnwrappingXmlBeanSerializer(UnwrappingXmlBeanSerializer src, BeanPropertyWriter[] properties, BeanPropertyWriter[] filteredProperties)

Method Detail

asArraySerializerback to summary
protected BeanSerializerBase asArraySerializer()

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

JSON Array output can not be done if unwrapping operation is requested; so implementation will simply return 'this'.

Annotations
@Override
isUnwrappingSerializerback to summary
public boolean isUnwrappingSerializer()

Overrides tools.jackson.databind.ValueSerializer.isUnwrappingSerializer.

Doc from tools.jackson.databind.ValueSerializer.isUnwrappingSerializer.

Accessor for checking whether this serializer is an "unwrapping" serializer; this is necessary to know since it may also require caller to suppress writing of the leading property name.

Annotations
@Override
serializeback to summary
public final 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 transformer)

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