Deprecated
as a consequence of BeanSerializerBase being deprecated. See corresponding docs for further information.
BeanSerializerBase needed to take care
of some xml-specific aspects, such as distinction between attributes
and elements.
| Modifier and Type | Field and Description |
|---|---|
| protected final int | _attributeCount
Number of attributes to write; these will have been ordered to be the first properties to write. |
| protected final BitSet | _cdata
Optional set of indexes of properties that should be serialized as CDATA, instead of regular XML text segment. |
| protected final int | _textPropertyIndex
Index of "text value" property we have, if any; can have at most one such property. |
| protected final QName[] | _xmlNames
Array that contains namespace URIs associated with properties, if any; null if no namespace definitions have been assigned |
| public static final String | KEY_XML_INFO
Marker used for storing associated internal data with |
| Access | Constructor and Description |
|---|---|
| public | XmlBeanSerializerBase(BeanSerializerBase src)
Deprecated
as a consequence of
BeanSerializerBase being deprecated.
|
| protected | XmlBeanSerializerBase(XmlBeanSerializerBase src, ObjectIdWriter objectIdWriter)
Deprecated
as a consequence of
XmlBeanSerializerBase being deprecated.
|
| protected | XmlBeanSerializerBase(XmlBeanSerializerBase src, ObjectIdWriter objectIdWriter, Object filterId)
Deprecated
as a consequence of
XmlBeanSerializerBase being deprecated.
|
| protected | XmlBeanSerializerBase(XmlBeanSerializerBase src, Set<String> toIgnore, Set<String> toInclude)
Deprecated
as a consequence of
XmlBeanSerializerBase being deprecated.
|
| public | XmlBeanSerializerBase(XmlBeanSerializerBase src, NameTransformer transformer)
Deprecated
as a consequence of
XmlBeanSerializerBase being deprecated.
|
| protected | XmlBeanSerializerBase(XmlBeanSerializerBase src, BeanPropertyWriter[] properties, BeanPropertyWriter[] filteredProperties)
Deprecated
as a consequence of
XmlBeanSerializerBase being deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
| protected static boolean | |
| protected static boolean | |
| protected static int | _orderAttributesFirst(BeanPropertyWriter[] properties, BeanPropertyWriter[] filteredProperties)
Method for re-sorting lists of bean properties such that attributes are strictly written before elements. |
| protected void | _serializeObjectId(Object bean, JsonGenerator gen, SerializerProvider provider, TypeSerializer typeSer, WritableObjectId objectId)
Overrides com. |
| protected void | serializeFields(Object bean, JsonGenerator gen0, SerializerProvider provider)
Overrides com. |
| protected void | serializeFieldsFiltered(Object bean, JsonGenerator gen0, SerializerProvider provider)
Overrides com. PropertyFilter that needs to be called to determine
which properties are to be serialized (and possibly how)
|
| public void | serializeWithType(Object
Value to serialize; can not be null. bean, JsonGenerator Generator used to output resulting Json content gen, SerializerProvider Provider that can be used to get serializers for
serializing Objects value contains, if any. provider, TypeSerializer Type serializer to use for including type information typeSer)Overrides com. |
| _attributeCount | back to summary |
|---|---|
| protected final int _attributeCount Number of attributes to write; these will have been ordered to be the first properties to write. | |
| _cdata | back to summary |
|---|---|
| protected final BitSet _cdata Optional set of indexes of properties that should be serialized as CDATA, instead of regular XML text segment. Left as null in cases where none of element values are to be written in such a way. | |
| _textPropertyIndex | back to summary |
|---|---|
| protected final int _textPropertyIndex Index of "text value" property we have, if any; can have at most one such property. | |
| _xmlNames | back to summary |
|---|---|
| protected final QName[] _xmlNames Array that contains namespace URIs associated with properties, if any; null if no namespace definitions have been assigned | |
| KEY_XML_INFO | back to summary |
|---|---|
| public static final String KEY_XML_INFO Marker used for storing associated internal data with | |
| XmlBeanSerializerBase | back to summary |
|---|---|
| public XmlBeanSerializerBase(BeanSerializerBase src)
Deprecated as a consequence of | |
| XmlBeanSerializerBase | back to summary |
|---|---|
| protected XmlBeanSerializerBase(XmlBeanSerializerBase src, ObjectIdWriter objectIdWriter)
Deprecated as a consequence of | |
| XmlBeanSerializerBase | back to summary |
|---|---|
| protected XmlBeanSerializerBase(XmlBeanSerializerBase src, ObjectIdWriter objectIdWriter, Object filterId)
Deprecated as a consequence of | |
| XmlBeanSerializerBase | back to summary |
|---|---|
| protected XmlBeanSerializerBase(XmlBeanSerializerBase src, Set<String> toIgnore, Set<String> toInclude)
Deprecated as a consequence of | |
| XmlBeanSerializerBase | back to summary |
|---|---|
| public XmlBeanSerializerBase(XmlBeanSerializerBase src, NameTransformer transformer)
Deprecated as a consequence of | |
| XmlBeanSerializerBase | back to summary |
|---|---|
| protected XmlBeanSerializerBase(XmlBeanSerializerBase src, BeanPropertyWriter[] properties, BeanPropertyWriter[] filteredProperties)
Deprecated as a consequence of | |
| _isAttribute | back to summary |
|---|---|
| protected static boolean _isAttribute(BeanPropertyWriter bpw) | |
| _isCData | back to summary |
|---|---|
| protected static boolean _isCData(BeanPropertyWriter bpw) | |
| _orderAttributesFirst | back to summary |
|---|---|
| protected static int _orderAttributesFirst(BeanPropertyWriter[] properties, BeanPropertyWriter[] filteredProperties) Method for re-sorting lists of bean properties such that attributes are strictly written before elements. | |
| _serializeObjectId | back to summary |
|---|---|
| protected void _serializeObjectId(Object bean, JsonGenerator gen, SerializerProvider provider, TypeSerializer typeSer, WritableObjectId objectId) throws IOException Overrides com.
| |
| serializeFields | back to summary |
|---|---|
| protected void serializeFields(Object bean, JsonGenerator gen0, SerializerProvider provider) throws IOException Overrides com. Main serialization method needs to be overridden to allow XML-specific extra handling, such as indication of whether to write attributes or elements.
| |
| serializeFieldsFiltered | back to summary |
|---|---|
| protected void serializeFieldsFiltered(Object bean, JsonGenerator gen0, SerializerProvider provider) throws IOException Overrides com. Doc from com. Alternative serialization method that gets called when there is a
| |
| serializeWithType | back to summary |
|---|---|
| public void serializeWithType(Object bean, JsonGenerator gen, SerializerProvider provider, TypeSerializer typeSer) throws IOException Overrides com. Doc from com. Method that can be called to ask implementation to serialize values of type this serializer handles, using specified type serializer for embedding necessary type information.
Default implementation will throw For simple datatypes written as a single scalar value (JSON String, Number, Boolean), implementation would look like: // note: method to call depends on whether this type is serialized as JSON scalar, object or Array! typeSer.writeTypePrefixForScalar(value, gen); serialize(value, gen, provider); typeSer.writeTypeSuffixForScalar(value, gen);and implementations for type serialized as JSON Arrays or Objects would differ slightly, as START-ARRAY/END-ARRAY and
START-OBJECT/END-OBJECT pairs
need to be properly handled with respect to serializing of contents.
| |