JsonSerializer for serializing
instances.
Main reason for using separate builder class is that this makes it easier
to make actual serializer class fully immutable.
| Modifier and Type | Field and Description |
|---|---|
| protected AnyGetterWriter | _anyGetter
Writer used for "any getter" properties, if any. |
| protected final BeanDescription | |
| protected SerializationConfig | |
| protected BeanPropertyWriter[] | _filteredProperties
Optional array of filtered property writers; if null, no view-based filtering is performed. |
| protected Object | _filterId
Id of the property filter to use for POJO, if any. |
| protected ObjectIdWriter | _objectIdWriter
Object responsible for serializing Object Ids for the handled type, if any. |
| protected List | _properties
Bean properties, in order of serialization |
| protected AnnotatedMember | _typeId
Property that is used for type id (and not serialized as regular property) |
| private static final BeanPropertyWriter[] |
| Access | Constructor and Description |
|---|---|
| public | |
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public JsonSerializer | |
| public BeanSerializer | createDummy()
Deprecated
as a consequence of
Factory method for constructing an "empty" serializer; one that
outputs no properties (but handles JSON objects properly, including
type information)
BeanSerializer being deprecated.
|
| public AnyGetterWriter | |
| public BeanDescription | |
| public AnnotatedClass | |
| public BeanPropertyWriter[] | |
| public Object | |
| public ObjectIdWriter | |
| public List | |
| public AnnotatedMember | |
| public boolean | |
| public void | |
| protected void | setConfig(SerializationConfig config)
Initialization method called right after construction, to specify configuration to use. |
| public void | setFilteredProperties(BeanPropertyWriter[]
Number and order of properties here MUST match that
of "regular" properties set earlier using properties)setProperties(List); if not,
an IllegalArgumentException will be thrown
|
| public void | |
| public void | |
| public void | |
| public void |
| _anyGetter | back to summary |
|---|---|
| protected AnyGetterWriter _anyGetter Writer used for "any getter" properties, if any. | |
| _beanDesc | back to summary |
|---|---|
| protected final BeanDescription _beanDesc | |
| _config | back to summary |
|---|---|
| protected SerializationConfig _config | |
| _filteredProperties | back to summary |
|---|---|
| protected BeanPropertyWriter[] _filteredProperties Optional array of filtered property writers; if null, no view-based filtering is performed. | |
| _filterId | back to summary |
|---|---|
| protected Object _filterId Id of the property filter to use for POJO, if any. | |
| _objectIdWriter | back to summary |
|---|---|
| protected ObjectIdWriter _objectIdWriter Object responsible for serializing Object Ids for the handled type, if any. | |
| _properties | back to summary |
|---|---|
| protected List<BeanPropertyWriter> _properties Bean properties, in order of serialization | |
| _typeId | back to summary |
|---|---|
| protected AnnotatedMember _typeId Property that is used for type id (and not serialized as regular property) | |
| NO_PROPERTIES | back to summary |
|---|---|
| private static final BeanPropertyWriter[] NO_PROPERTIES | |
| BeanSerializerBuilder | back to summary |
|---|---|
| public BeanSerializerBuilder(BeanDescription beanDesc) | |
| BeanSerializerBuilder | back to summary |
|---|---|
| protected BeanSerializerBuilder(BeanSerializerBuilder src) Copy-constructor that may be used for sub-classing | |
| build | back to summary |
|---|---|
| public JsonSerializer Method called to create | |
| createDummy | back to summary |
|---|---|
| public BeanSerializer createDummy()
Deprecated as a consequence of Factory method for constructing an "empty" serializer; one that outputs no properties (but handles JSON objects properly, including type information) | |
| getAnyGetter | back to summary |
|---|---|
| public AnyGetterWriter getAnyGetter() | |
| getBeanDescription | back to summary |
|---|---|
| public BeanDescription getBeanDescription() | |
| getClassInfo | back to summary |
|---|---|
| public AnnotatedClass getClassInfo() | |
| getFilteredProperties | back to summary |
|---|---|
| public BeanPropertyWriter[] getFilteredProperties() | |
| getFilterId | back to summary |
|---|---|
| public Object getFilterId() | |
| getObjectIdWriter | back to summary |
|---|---|
| public ObjectIdWriter getObjectIdWriter() | |
| getProperties | back to summary |
|---|---|
| public List | |
| getTypeId | back to summary |
|---|---|
| public AnnotatedMember getTypeId() | |
| hasProperties | back to summary |
|---|---|
| public boolean hasProperties() | |
| setAnyGetter | back to summary |
|---|---|
| public void setAnyGetter(AnyGetterWriter anyGetter) | |
| setConfig | back to summary |
|---|---|
| protected void setConfig(SerializationConfig config) Initialization method called right after construction, to specify configuration to use. Note ideally should be passed in constructor, but for backwards compatibility, needed to add a setter instead
| |
| setFilteredProperties | back to summary |
|---|---|
public void setFilteredProperties(BeanPropertyWriter[] properties)
| |
| setFilterId | back to summary |
|---|---|
| public void setFilterId(Object filterId) | |
| setObjectIdWriter | back to summary |
|---|---|
| public void setObjectIdWriter(ObjectIdWriter w) | |
| setProperties | back to summary |
|---|---|
| public void setProperties(List<BeanPropertyWriter> properties) | |
| setTypeId | back to summary |
|---|---|
| public void setTypeId(AnnotatedMember idProp) | |