BeanPropertyWriters that will handle
access value to serialize and call appropriate serializers to
write out JSON.Implementation Note
we will post-process resulting serializer,
to figure out actual serializers for final types. This must be
done from resolve method, and NOT from constructor;
otherwise we could end up with an infinite loop.
| Access | Constructor and Description |
|---|---|
| public | BeanSerializer(JavaType type, BeanSerializerBuilder
Builder object that contains collected information
that may be needed for serializer builder, BeanPropertyWriter[] Property writers used for actual serialization properties, BeanPropertyWriter[] filteredProperties)
|
| protected | BeanSerializer(BeanSerializerBase src)
Alternate copy constructor that can be used to construct
standard |
| protected | |
| protected | |
| protected | |
| protected | BeanSerializer(BeanSerializerBase src, BeanPropertyWriter[] properties, BeanPropertyWriter[] filteredProperties)
|
| Modifier and Type | Method and Description |
|---|---|
| protected BeanSerializerBase | asArraySerializer()
Implements abstract tools. Implementation has to check whether as-array serialization
is possible reliably; if (and only if) so, will construct
a |
| public static BeanSerializer | createDummy(JavaType forType, BeanSerializerBuilder builder)
Method for constructing dummy bean serializer; one that never outputs any properties |
| public void | serialize(Object bean, JsonGenerator gen, SerializationContext provider)
Implements abstract tools. Main serialization method that will delegate actual output to
configured
|
| public ValueSerializer | unwrappingSerializer(NameTransformer unwrapper)
Implements abstract tools. 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. 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. Mutant factory used for creating a new instance with different
filter id (used with |
| public ValueSerializer | withIgnoredProperties(Set<String> toIgnore)
Overrides tools. Mutant factory method called to create a new instance after excluding specified set of properties by name, if there is any. |
| public BeanSerializerBase | withObjectIdWriter(ObjectIdWriter objectIdWriter)
Implements abstract tools. Mutant factory used for creating a new instance with different
|
| protected BeanSerializerBase | withProperties(BeanPropertyWriter[] properties, BeanPropertyWriter[] filteredProperties)
Implements abstract tools. Mutant factory used for creating a new instance with modified set of properties |
| BeanSerializer | back to summary |
|---|---|
public BeanSerializer(JavaType type, BeanSerializerBuilder builder, BeanPropertyWriter[] properties, BeanPropertyWriter[] filteredProperties)
| |
| BeanSerializer | back to summary |
|---|---|
| protected BeanSerializer(BeanSerializerBase src) Alternate copy constructor that can be used to construct
standard | |
| BeanSerializer | back to summary |
|---|---|
| protected BeanSerializer(BeanSerializerBase src, ObjectIdWriter objectIdWriter) | |
| BeanSerializer | back to summary |
|---|---|
| protected BeanSerializer(BeanSerializerBase src, ObjectIdWriter objectIdWriter, Object filterId) | |
| BeanSerializer | back to summary |
|---|---|
| protected BeanSerializer(BeanSerializerBase src, Set<String> toIgnore, Set<String> toInclude) | |
| BeanSerializer | back to summary |
|---|---|
| protected BeanSerializer(BeanSerializerBase src, BeanPropertyWriter[] properties, BeanPropertyWriter[] filteredProperties) | |
| asArraySerializer | back to summary |
|---|---|
| protected BeanSerializerBase asArraySerializer() Implements abstract tools. Implementation has to check whether as-array serialization
is possible reliably; if (and only if) so, will construct
a
| |
| createDummy | back to summary |
|---|---|
| public static BeanSerializer createDummy(JavaType forType, BeanSerializerBuilder builder) Method for constructing dummy bean serializer; one that never outputs any properties | |
| serialize | back to summary |
|---|---|
| public void serialize(Object bean, JsonGenerator gen, SerializationContext provider) throws JacksonException Implements abstract tools. Main serialization method that will delegate actual output to
configured
| |
| unwrappingSerializer | back to summary |
|---|---|
| public ValueSerializer Implements abstract tools. Doc from tools. Lets force sub-classes to implement this, to avoid accidental missing of handling...
| |
| withByNameInclusion | back to summary |
|---|---|
| protected BeanSerializerBase withByNameInclusion(Set<String> toIgnore, Set<String> toInclude) Implements abstract tools. Doc from tools. Mutant factory used for creating a new instance with additional set of properties to ignore or include (from properties this instance otherwise has)
| |
| withFilterId | back to summary |
|---|---|
| public BeanSerializerBase withFilterId(Object filterId) Implements abstract tools. Doc from tools. Mutant factory used for creating a new instance with different
filter id (used with
| |
| withIgnoredProperties | back to summary |
|---|---|
| public ValueSerializer Overrides tools. Doc from tools. Mutant factory method called to create a new instance after excluding specified set of properties by name, if there is any.
| |
| withObjectIdWriter | back to summary |
|---|---|
| public BeanSerializerBase withObjectIdWriter(ObjectIdWriter objectIdWriter) Implements abstract tools. Doc from tools. Mutant factory used for creating a new instance with different
| |
| withProperties | back to summary |
|---|---|
| protected BeanSerializerBase withProperties(BeanPropertyWriter[] properties, BeanPropertyWriter[] filteredProperties) Implements abstract tools. Doc from tools. Mutant factory used for creating a new instance with modified set of properties
| |