com.fasterxml.jackson.dataformat.xml.ser.UnwrappingXmlBeanSerializer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of swagger-all Show documentation
Show all versions of swagger-all Show documentation
swagger-all is a rebundled verison of Swagger as one OSGi bundle.
package com.fasterxml.jackson.dataformat.xml.ser;
import java.io.IOException;
import com.fasterxml.jackson.core.*;
import com.fasterxml.jackson.databind.*;
import com.fasterxml.jackson.databind.ser.*;
import com.fasterxml.jackson.databind.ser.impl.ObjectIdWriter;
import com.fasterxml.jackson.databind.ser.impl.UnwrappingBeanSerializer;
import com.fasterxml.jackson.databind.ser.std.BeanSerializerBase;
import com.fasterxml.jackson.databind.util.NameTransformer;
/**
* Copy of {@link UnwrappingBeanSerializer} required to extend
* {@link XmlBeanSerializerBase} for XML-specific handling.
*
* @author Pascal Gélinas
*
*/
public class UnwrappingXmlBeanSerializer extends XmlBeanSerializerBase {
/**
* Transformer used to add prefix and/or suffix for properties of unwrapped
* POJO.
*/
protected final NameTransformer _nameTransformer;
/*
/**********************************************************
/* Life-cycle: constructors
/**********************************************************
*/
/**
* Constructor used for creating unwrapping instance of a standard
* BeanSerializer
*/
public UnwrappingXmlBeanSerializer(XmlBeanSerializerBase src, NameTransformer transformer)
{
super(src, transformer);
_nameTransformer = transformer;
}
public UnwrappingXmlBeanSerializer(UnwrappingXmlBeanSerializer src, ObjectIdWriter objectIdWriter)
{
super(src, objectIdWriter);
_nameTransformer = src._nameTransformer;
}
public UnwrappingXmlBeanSerializer(UnwrappingXmlBeanSerializer src, ObjectIdWriter objectIdWriter, Object filterId)
{
super(src, objectIdWriter, filterId);
_nameTransformer = src._nameTransformer;
}
protected UnwrappingXmlBeanSerializer(UnwrappingXmlBeanSerializer src, String[] toIgnore)
{
super(src, toIgnore);
_nameTransformer = src._nameTransformer;
}
/*
/**********************************************************
/* Life-cycle: factory methods, fluent factories
/**********************************************************
*/
@Override
public JsonSerializer