Module tools.jackson.dataformat.xml
Package tools.jackson.dataformat.xml.ser
Class XmlBeanPropertyWriter
java.lang.Object
tools.jackson.databind.introspect.ConcreteBeanPropertyBase
tools.jackson.databind.ser.PropertyWriter
tools.jackson.databind.ser.BeanPropertyWriter
tools.jackson.dataformat.xml.ser.XmlBeanPropertyWriter
- All Implemented Interfaces:
tools.jackson.core.util.Named,tools.jackson.databind.BeanProperty,tools.jackson.databind.util.FullyNamed
public class XmlBeanPropertyWriter
extends tools.jackson.databind.ser.BeanPropertyWriter
Property writer sub-class used for handling element wrapping needed for serializing
collection (array, Collection; not Map) types.
-
Nested Class Summary
Nested classes/interfaces inherited from interface tools.jackson.databind.BeanProperty
tools.jackson.databind.BeanProperty.Bogus, tools.jackson.databind.BeanProperty.StdNested classes/interfaces inherited from interface tools.jackson.core.util.Named
tools.jackson.core.util.Named.StringAsNamed -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final booleanWhether wrapping should be checked dynamically based on the runtime value type.protected final QNameElement name used for items in the collectionprotected final QNameElement name used as wrapper for collection.Fields inherited from class tools.jackson.databind.ser.BeanPropertyWriter
_accessor, _applyView, _cfgSerializationType, _contextAnnotations, _declaredType, _dynamicSerializers, _includeInViews, _inclusion, _internalSettings, _member, _name, _nonTrivialBaseType, _nullSerializer, _serializer, _suppressableValue, _suppressNulls, _typeSerializer, _wrapperName, MARKER_FOR_EMPTYFields inherited from class tools.jackson.databind.introspect.ConcreteBeanPropertyBase
_aliases, _metadataFields inherited from interface tools.jackson.databind.BeanProperty
EMPTY_FORMAT, EMPTY_INCLUDE -
Constructor Summary
ConstructorsConstructorDescriptionXmlBeanPropertyWriter(tools.jackson.databind.ser.BeanPropertyWriter wrapped, tools.jackson.databind.PropertyName wrapperName, tools.jackson.databind.PropertyName wrappedName) Deprecated.Since 3.2XmlBeanPropertyWriter(tools.jackson.databind.ser.BeanPropertyWriter wrapped, tools.jackson.databind.PropertyName wrapperName, tools.jackson.databind.PropertyName wrappedName, boolean dynamicWrapping) XmlBeanPropertyWriter(tools.jackson.databind.ser.BeanPropertyWriter wrapped, tools.jackson.databind.PropertyName wrapperName, tools.jackson.databind.PropertyName wrappedName, tools.jackson.databind.ValueSerializer<Object> serializer) Deprecated.Since 3.2 -
Method Summary
Modifier and TypeMethodDescriptionvoidserializeAsProperty(Object bean, tools.jackson.core.JsonGenerator g, tools.jackson.databind.SerializationContext ctxt) Overridden version so that we can wrap output within wrapper element if and as necessary.Methods inherited from class tools.jackson.databind.ser.BeanPropertyWriter
_depositSchemaProperty, _findAndAddDynamic, _handleSelfReference, _new, assignNullSerializer, assignSerializer, assignTypeSerializer, depositSchemaProperty, findPropertyInclusion, fixAccess, get, getAnnotation, getContextAnnotation, getFullName, getInternalSetting, getMember, getName, getSerializationType, getSerializedName, getSerializer, getType, getTypeSerializer, getViews, getWrapperName, hasNullSerializer, hasSerializer, isUnwrapping, removeInternalSetting, rename, serializeAsElement, serializeAsOmittedElement, serializeAsOmittedProperty, setInternalSetting, setNonTrivialBaseType, toString, unwrappingWriter, willSuppressNulls, wouldConflictWithNameMethods inherited from class tools.jackson.databind.ser.PropertyWriter
findAnnotationMethods inherited from class tools.jackson.databind.introspect.ConcreteBeanPropertyBase
findAliases, findFormatOverrides, findPropertyFormat, getMetadata, isRequired, isVirtualMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface tools.jackson.databind.util.FullyNamed
hasName
-
Field Details
-
_wrapperQName
Element name used as wrapper for collection. -
_wrappedQName
Element name used for items in the collection -
_dynamicWrapping
protected final boolean _dynamicWrappingWhether wrapping should be checked dynamically based on the runtime value type. Whentrue, wrapping is only applied if the runtime value is actually a Collection, Iterable, or array. Used for properties declared asObjectthat may or may not contain a collection at runtime.- Since:
- 3.2
-
-
Constructor Details
-
XmlBeanPropertyWriter
@Deprecated public XmlBeanPropertyWriter(tools.jackson.databind.ser.BeanPropertyWriter wrapped, tools.jackson.databind.PropertyName wrapperName, tools.jackson.databind.PropertyName wrappedName) Deprecated.Since 3.2 -
XmlBeanPropertyWriter
@Deprecated public XmlBeanPropertyWriter(tools.jackson.databind.ser.BeanPropertyWriter wrapped, tools.jackson.databind.PropertyName wrapperName, tools.jackson.databind.PropertyName wrappedName, tools.jackson.databind.ValueSerializer<Object> serializer) Deprecated.Since 3.2 -
XmlBeanPropertyWriter
public XmlBeanPropertyWriter(tools.jackson.databind.ser.BeanPropertyWriter wrapped, tools.jackson.databind.PropertyName wrapperName, tools.jackson.databind.PropertyName wrappedName, boolean dynamicWrapping) - Since:
- 3.2
-
-
Method Details
-
serializeAsProperty
public void serializeAsProperty(Object bean, tools.jackson.core.JsonGenerator g, tools.jackson.databind.SerializationContext ctxt) throws Exception Overridden version so that we can wrap output within wrapper element if and as necessary.- Overrides:
serializeAsPropertyin classtools.jackson.databind.ser.BeanPropertyWriter- Throws:
Exception
-