| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.fasterxml.jackson.databind.ser.BeanSerializerModifier
public abstract class BeanSerializerModifier
Abstract class that defines API for objects that can be registered (for BeanSerializerFactory
 to participate in constructing BeanSerializer instances.
 This is typically done by modules that want alter some aspects of serialization
 process; and is preferable to sub-classing of BeanSerializerFactory.
Sequence in which callback methods are called is as follows:
BeanPropertyWriter) is sent for modification via
     changeProperties(com.fasterxml.jackson.databind.SerializationConfig, com.fasterxml.jackson.databind.BeanDescription, java.util.List) . Changes can include removal, addition and
     replacement of suggested properties.
  orderProperties(com.fasterxml.jackson.databind.SerializationConfig, com.fasterxml.jackson.databind.BeanDescription, java.util.List)  is called to allow
     modifiers to alter ordering.
  updateBuilder(com.fasterxml.jackson.databind.SerializationConfig, com.fasterxml.jackson.databind.BeanDescription, com.fasterxml.jackson.databind.ser.BeanSerializerBuilder) is called with builder, to allow builder state
     to be modified (including possibly replacing builder itself if necessary)
  BeanSerializer instance and passes
     it to modifiers using modifySerializer(com.fasterxml.jackson.databind.SerializationConfig, com.fasterxml.jackson.databind.BeanDescription, com.fasterxml.jackson.databind.JsonSerializer>), for possible
     modification or replacement (by any JsonSerializer instance)
 Default method implementations are "no-op"s, meaning that methods are implemented but have no effect.
| Constructor Summary | |
|---|---|
| BeanSerializerModifier() | |
| Method Summary | |
|---|---|
|  List<BeanPropertyWriter> | changeProperties(SerializationConfig config,
                 BeanDescription beanDesc,
                 List<BeanPropertyWriter> beanProperties)Method called by BeanSerializerFactorywith tentative set
 of discovered properties. | 
|  JsonSerializer<?> | modifySerializer(SerializationConfig config,
                 BeanDescription beanDesc,
                 JsonSerializer<?> serializer)Method called by BeanSerializerFactoryafter constructing default
 bean serializer instance with properties collected and ordered earlier. | 
|  List<BeanPropertyWriter> | orderProperties(SerializationConfig config,
                BeanDescription beanDesc,
                List<BeanPropertyWriter> beanProperties)Method called by BeanSerializerFactorywith set of properties
 to serialize, in default ordering (based on defaults as well as 
 possible type annotations). | 
|  BeanSerializerBuilder | updateBuilder(SerializationConfig config,
              BeanDescription beanDesc,
              BeanSerializerBuilder builder)Method called by BeanSerializerFactoryafter collecting all information
 regarding POJO to serialize and updating builder with it, but before constructing
 serializer. | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public BeanSerializerModifier()
| Method Detail | 
|---|
public List<BeanPropertyWriter> changeProperties(SerializationConfig config,
                                                 BeanDescription beanDesc,
                                                 List<BeanPropertyWriter> beanProperties)
BeanSerializerFactory with tentative set
 of discovered properties.
 Implementations can add, remove or replace any of passed properties.
 Properties List passed as argument is modifiable, and returned List must
 likewise be modifiable as it may be passed to multiple registered
 modifiers.
public List<BeanPropertyWriter> orderProperties(SerializationConfig config,
                                                BeanDescription beanDesc,
                                                List<BeanPropertyWriter> beanProperties)
BeanSerializerFactory with set of properties
 to serialize, in default ordering (based on defaults as well as 
 possible type annotations).
 Implementations can change ordering any way they like.
 Properties List passed as argument is modifiable, and returned List must
 likewise be modifiable as it may be passed to multiple registered
 modifiers.
public BeanSerializerBuilder updateBuilder(SerializationConfig config,
                                           BeanDescription beanDesc,
                                           BeanSerializerBuilder builder)
BeanSerializerFactory after collecting all information
 regarding POJO to serialize and updating builder with it, but before constructing
 serializer.
 Implementations may choose to modify state of builder (to affect serializer being
 built), or even completely replace it (if they want to build different kind of
 serializer). Typically, however, passed-in builder is returned, possibly with
 some modifications.
public JsonSerializer<?> modifySerializer(SerializationConfig config,
                                          BeanDescription beanDesc,
                                          JsonSerializer<?> serializer)
BeanSerializerFactory after constructing default
 bean serializer instance with properties collected and ordered earlier.
 Implementations can modify or replace given serializer and return serializer
 to use. Note that although initial serializer being passed is of type
 BeanSerializer, modifiers may return serializers of other types;
 and this is why implementations must check for type before casting.
| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||