Serializers which allows registration of
serializers based on raw (type erased class).
It can work well for basic bean and scalar type serializers, but is not
a good fit for handling generic types (like Maps and Collections).
Type registrations are assumed to be general; meaning that registration of serializer
for a super type will also be used for handling subtypes, unless an exact match
is found first. As an example, handler for CharSequence would also be used
serializing StringBuilder instances, unless a direct mapping was found.
| Modifier and Type | Field and Description |
|---|---|
| protected HashMap | _classMappings
Class-based mappings that are used both for exact and sub-class matches. |
| protected boolean | _hasEnumSerializer
Flag to help find "generic" enum serializer, if one has been registered. |
| protected HashMap | _interfaceMappings
Interface-based matches. |
| private static final long |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected void | |
| protected ValueSerializer | |
| protected ValueSerializer | |
| public SimpleSerializers | addSerializer(ValueSerializer<?> ser)
Method for adding given serializer for type that |
| public <T> SimpleSerializers | |
| public SimpleSerializers | |
| public ValueSerializer | findArraySerializer(SerializationConfig config, ArrayType type, BeanDescription.
Overrides default tools. Method called by serialization framework first time a serializer is needed for specified array type. |
| public ValueSerializer | findCollectionLikeSerializer(SerializationConfig config, CollectionLikeType type, BeanDescription.
Overrides default tools. Method called by serialization framework first time a serializer is needed for
specified "Collection-like" type (type that acts like |
| public ValueSerializer | findCollectionSerializer(SerializationConfig config, CollectionType type, BeanDescription.
Overrides default tools. Method called by serialization framework first time a serializer is needed for
specified |
| public ValueSerializer | findEnumSerializer(SerializationConfig config, JavaType type, BeanDescription.
Overrides default tools. Method called by serialization framework first time a serializer is needed for
given |
| public ValueSerializer | findMapLikeSerializer(SerializationConfig config, MapLikeType type, BeanDescription.
Overrides default tools. Method called by serialization framework first time a serializer is needed for
specified "Map-like" type (type that acts like |
| public ValueSerializer | findMapSerializer(SerializationConfig config, MapType type, BeanDescription.
Overrides default tools. Method called by serialization framework first time a serializer is needed for
specified |
| public ValueSerializer | findReferenceSerializer(SerializationConfig config, ReferenceType type, BeanDescription.
Overrides default tools. Method called by serialization framework first time a serializer is needed for
given |
| public ValueSerializer | findSerializer(SerializationConfig config, JavaType type, BeanDescription.
Overrides default tools. Fallback ethod called by serialization framework first time a serializer is needed for given type, which is not of any more specific type (like enum, tree node, reference or container type) for which other methods are called). |
| public ValueSerializer | findTreeNodeSerializer(SerializationConfig config, JavaType type, BeanDescription.
Overrides default tools. Method called by serialization framework first time a serializer is needed for
given |
| _classMappings | back to summary |
|---|---|
| protected HashMap<ClassKey, ValueSerializer<?>> _classMappings Class-based mappings that are used both for exact and sub-class matches. | |
| _hasEnumSerializer | back to summary |
|---|---|
| protected boolean _hasEnumSerializer Flag to help find "generic" enum serializer, if one has been registered. | |
| _interfaceMappings | back to summary |
|---|---|
| protected HashMap<ClassKey, ValueSerializer<?>> _interfaceMappings Interface-based matches. | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| SimpleSerializers | back to summary |
|---|---|
| public SimpleSerializers() | |
| SimpleSerializers | back to summary |
|---|---|
| public SimpleSerializers(List<ValueSerializer<?>> sers) | |
| _addSerializer | back to summary |
|---|---|
| protected void _addSerializer(Class<?> cls, ValueSerializer<?> ser) | |
| _findInterfaceMapping | back to summary |
|---|---|
| protected ValueSerializer | |
| _findSerializer | back to summary |
|---|---|
| protected ValueSerializer | |
| addSerializer | back to summary |
|---|---|
| public SimpleSerializers addSerializer(ValueSerializer<?> ser) Method for adding given serializer for type that | |
| addSerializer | back to summary |
|---|---|
| public <T> SimpleSerializers addSerializer(Class<? extends T> type, ValueSerializer<T> ser) | |
| addSerializers | back to summary |
|---|---|
| public SimpleSerializers addSerializers(List<ValueSerializer<?>> sers) | |
| findArraySerializer | back to summary |
|---|---|
| public ValueSerializer Overrides default tools. Doc from tools. Method called by serialization framework first time a serializer is needed for specified array type. Implementation should return a serializer instance if it supports specified type; or null if it does not.
| |
| findCollectionLikeSerializer | back to summary |
|---|---|
| public ValueSerializer Overrides default tools. Doc from tools. Method called by serialization framework first time a serializer is needed for
specified "Collection-like" type (type that acts like
| |
| findCollectionSerializer | back to summary |
|---|---|
| public ValueSerializer Overrides default tools. Doc from tools. Method called by serialization framework first time a serializer is needed for
specified
| |
| findEnumSerializer | back to summary |
|---|---|
| public ValueSerializer Overrides default tools. Doc from tools. Method called by serialization framework first time a serializer is needed for
given
| |
| findMapLikeSerializer | back to summary |
|---|---|
| public ValueSerializer Overrides default tools. Doc from tools. Method called by serialization framework first time a serializer is needed for
specified "Map-like" type (type that acts like
| |
| findMapSerializer | back to summary |
|---|---|
| public ValueSerializer Overrides default tools. Doc from tools. Method called by serialization framework first time a serializer is needed for
specified
| |
| findReferenceSerializer | back to summary |
|---|---|
| public ValueSerializer Overrides default tools. Doc from tools. Method called by serialization framework first time a serializer is needed for
given
| |
| findSerializer | back to summary |
|---|---|
| public ValueSerializer Overrides default tools. Doc from tools. Fallback ethod called by serialization framework first time a serializer is needed for given type, which is not of any more specific type (like enum, tree node, reference or container type) for which other methods are called). Basically called for types for which none of other callbacks are called.
| |
| findTreeNodeSerializer | back to summary |
|---|---|
| public ValueSerializer Overrides default tools. Doc from tools. Method called by serialization framework first time a serializer is needed for
given
| |