| Modifier and Type | Class and Description |
|---|---|
| private static class | |
| private static class | PropertySerializerMap.
Bogus instance that contains no serializers; used as the default map with new serializers. |
| private static class | |
| public static class | PropertySerializerMap.
Value class used for returning tuple that has both serializer that was retrieved and new map instance |
| private static class | PropertySerializerMap.
Map that contains a single serializer; although seemingly silly this is probably the most commonly used variant because many theoretically dynamic or polymorphic types just have single actual type. |
| private static class | PropertySerializerMap.
Trivial container for bundling type + serializer entries. |
| Modifier and Type | Field and Description |
|---|---|
| protected final boolean | _resetWhenFull
Configuration setting that determines what happens when maximum size (currently 8) is reached: if true, will "start from beginning"; if false, will simply stop adding new entries. |
| Access | Constructor and Description |
|---|---|
| protected | |
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public final PropertySerializerMap. | addSerializer(Class<?> type, JsonSerializer<Object> serializer)
Method that can be used to 'register' a serializer that caller has resolved without help of this map. |
| public final PropertySerializerMap. | |
| public static PropertySerializerMap | |
| public static PropertySerializerMap | |
| public final PropertySerializerMap. | findAndAddKeySerializer(Class<?> type, SerializerProvider provider, BeanProperty property)
Method called if initial lookup fails, when looking for a key serializer (possible attached indirectly to a property) Will both find serializer and construct new map instance if warranted, and return both. |
| public final PropertySerializerMap. | findAndAddPrimarySerializer(Class<?> type, SerializerProvider provider, BeanProperty property)
Method called if initial lookup fails, when looking for a primary serializer (one that is directly attached to a property). |
| public final PropertySerializerMap. | |
| public final PropertySerializerMap. | findAndAddRootValueSerializer(Class<?> type, SerializerProvider provider)
Method called if initial lookup fails, when looking for a root value
serializer: one that is not directly attached to a property, but needs to
have |
| public final PropertySerializerMap. | |
| public final PropertySerializerMap. | findAndAddSecondarySerializer(Class<?> type, SerializerProvider provider, BeanProperty property)
Method called if initial lookup fails, when looking for a non-primary serializer (one that is not directly attached to a property). |
| public final PropertySerializerMap. | |
| public abstract PropertySerializerMap | |
| public abstract JsonSerializer |
| _resetWhenFull | back to summary |
|---|---|
| protected final boolean _resetWhenFull Configuration setting that determines what happens when maximum size (currently 8) is reached: if true, will "start from beginning"; if false, will simply stop adding new entries.
| |
| PropertySerializerMap | back to summary |
|---|---|
protected PropertySerializerMap(boolean resetWhenFull)
| |
| PropertySerializerMap | back to summary |
|---|---|
| protected PropertySerializerMap(PropertySerializerMap base) | |
| addSerializer | back to summary |
|---|---|
| public final PropertySerializerMap. Method that can be used to 'register' a serializer that caller has resolved without help of this map.
| |
| addSerializer | back to summary |
|---|---|
public final PropertySerializerMap.
| |
| emptyForProperties | back to summary |
|---|---|
public static PropertySerializerMap emptyForProperties()
| |
| emptyForRootValues | back to summary |
|---|---|
public static PropertySerializerMap emptyForRootValues()
| |
| findAndAddKeySerializer | back to summary |
|---|---|
| public final PropertySerializerMap. Method called if initial lookup fails, when looking for a key serializer (possible attached indirectly to a property) Will both find serializer and construct new map instance if warranted, and return both.
| |
| findAndAddPrimarySerializer | back to summary |
|---|---|
| public final PropertySerializerMap. Method called if initial lookup fails, when looking for a primary serializer (one that is directly attached to a property). Will both find serializer and construct new map instance if warranted, and return both.
| |
| findAndAddPrimarySerializer | back to summary |
|---|---|
| public final PropertySerializerMap. | |
| findAndAddRootValueSerializer | back to summary |
|---|---|
| public final PropertySerializerMap. Method called if initial lookup fails, when looking for a root value
serializer: one that is not directly attached to a property, but needs to
have
| |
| findAndAddRootValueSerializer | back to summary |
|---|---|
public final PropertySerializerMap.
| |
| findAndAddSecondarySerializer | back to summary |
|---|---|
| public final PropertySerializerMap. Method called if initial lookup fails, when looking for a non-primary serializer (one that is not directly attached to a property). Will both find serializer and construct new map instance if warranted, and return both.
| |
| findAndAddSecondarySerializer | back to summary |
|---|---|
| public final PropertySerializerMap. | |
| newWith | back to summary |
|---|---|
| public abstract PropertySerializerMap newWith(Class<?> type, JsonSerializer<Object> serializer) | |
| serializerFor | back to summary |
|---|---|
| public abstract JsonSerializer Main lookup method. Takes a "raw" type since usage is always from place where parameterization is fixed such that there cannot be type-parametric variations. | |
| Modifier and Type | Field and Description |
|---|---|
| private final JsonSerializer | |
| private final JsonSerializer | |
| private final Class | |
| private final Class |
| Access | Constructor and Description |
|---|---|
| public | Double(PropertySerializerMap base, Class<?> type1, JsonSerializer<Object> serializer1, Class<?> type2, JsonSerializer<Object> serializer2)
|
| Modifier and Type | Method and Description |
|---|---|
| public PropertySerializerMap | newWith(Class<?> type, JsonSerializer<Object> serializer)
Implements abstract com.
|
| public JsonSerializer | serializerFor(Class<?> type)
Implements abstract com. Main lookup method. |
| _serializer1 | back to summary |
|---|---|
| private final JsonSerializer<Object> _serializer1 | |
| _serializer2 | back to summary |
|---|---|
| private final JsonSerializer<Object> _serializer2 | |
| _type1 | back to summary |
|---|---|
| private final Class<?> _type1 | |
| _type2 | back to summary |
|---|---|
| private final Class<?> _type2 | |
| Double | back to summary |
|---|---|
| public Double(PropertySerializerMap base, Class<?> type1, JsonSerializer<Object> serializer1, Class<?> type2, JsonSerializer<Object> serializer2) | |
| newWith | back to summary |
|---|---|
| public PropertySerializerMap newWith(Class<?> type, JsonSerializer<Object> serializer) Implements abstract com.
| |
| serializerFor | back to summary |
|---|---|
| public JsonSerializer Implements abstract com. Doc from com. Main lookup method. Takes a "raw" type since usage is always from place where parameterization is fixed such that there cannot be type-parametric variations.
| |
| Modifier and Type | Field and Description |
|---|---|
| public static final PropertySerializerMap. | |
| public static final PropertySerializerMap. |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public PropertySerializerMap | newWith(Class<?> type, JsonSerializer<Object> serializer)
Implements abstract com.
|
| public JsonSerializer | serializerFor(Class<?> type)
Implements abstract com. Main lookup method. |
| FOR_PROPERTIES | back to summary |
|---|---|
| public static final PropertySerializerMap. | |
| FOR_ROOT_VALUES | back to summary |
|---|---|
| public static final PropertySerializerMap. | |
| Empty | back to summary |
|---|---|
| protected Empty(boolean resetWhenFull) | |
| newWith | back to summary |
|---|---|
| public PropertySerializerMap newWith(Class<?> type, JsonSerializer<Object> serializer) Implements abstract com.
| |
| serializerFor | back to summary |
|---|---|
| public JsonSerializer Implements abstract com. Doc from com. Main lookup method. Takes a "raw" type since usage is always from place where parameterization is fixed such that there cannot be type-parametric variations.
| |
| Modifier and Type | Field and Description |
|---|---|
| private final PropertySerializerMap. | |
| private static final int | MAX_ENTRIES
Let's limit number of serializers we actually cache; linear lookup won't scale too well beyond smallish number, and if we really want to support larger collections should use a hash map. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public PropertySerializerMap | newWith(Class<?> type, JsonSerializer<Object> serializer)
Implements abstract com.
|
| public JsonSerializer | serializerFor(Class<?> type)
Implements abstract com. Main lookup method. |
| _entries | back to summary |
|---|---|
| private final PropertySerializerMap. | |
| MAX_ENTRIES | back to summary |
|---|---|
| private static final int MAX_ENTRIES Let's limit number of serializers we actually cache; linear lookup won't scale too well beyond smallish number, and if we really want to support larger collections should use a hash map. But it seems unlikely this is a common use case so for now let's just stop building after hard-coded limit. 8 sounds like a reasonable stab for now. | |
| Multi | back to summary |
|---|---|
| public Multi(PropertySerializerMap base, PropertySerializerMap. | |
| newWith | back to summary |
|---|---|
| public PropertySerializerMap newWith(Class<?> type, JsonSerializer<Object> serializer) Implements abstract com.
| |
| serializerFor | back to summary |
|---|---|
| public JsonSerializer Implements abstract com. Doc from com. Main lookup method. Takes a "raw" type since usage is always from place where parameterization is fixed such that there cannot be type-parametric variations.
| |
| Modifier and Type | Field and Description |
|---|---|
| public final PropertySerializerMap | |
| public final JsonSerializer |
| Access | Constructor and Description |
|---|---|
| public |
| map | back to summary |
|---|---|
| public final PropertySerializerMap map | |
| serializer | back to summary |
|---|---|
| public final JsonSerializer<Object> serializer | |
| SerializerAndMapResult | back to summary |
|---|---|
| public SerializerAndMapResult(JsonSerializer<Object> serializer, PropertySerializerMap map) | |
| Modifier and Type | Field and Description |
|---|---|
| private final JsonSerializer | |
| private final Class |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public PropertySerializerMap | newWith(Class<?> type, JsonSerializer<Object> serializer)
Implements abstract com.
|
| public JsonSerializer | serializerFor(Class<?> type)
Implements abstract com. Main lookup method. |
| _serializer | back to summary |
|---|---|
| private final JsonSerializer<Object> _serializer | |
| _type | back to summary |
|---|---|
| private final Class<?> _type | |
| Single | back to summary |
|---|---|
| public Single(PropertySerializerMap base, Class<?> type, JsonSerializer<Object> serializer) | |
| newWith | back to summary |
|---|---|
| public PropertySerializerMap newWith(Class<?> type, JsonSerializer<Object> serializer) Implements abstract com.
| |
| serializerFor | back to summary |
|---|---|
| public JsonSerializer Implements abstract com. Doc from com. Main lookup method. Takes a "raw" type since usage is always from place where parameterization is fixed such that there cannot be type-parametric variations.
| |
| Modifier and Type | Field and Description |
|---|---|
| public final JsonSerializer | |
| public final Class |
| Access | Constructor and Description |
|---|---|
| public |
| serializer | back to summary |
|---|---|
| public final JsonSerializer<Object> serializer | |
| type | back to summary |
|---|---|
| public final Class<?> type | |
| TypeAndSerializer | back to summary |
|---|---|
| public TypeAndSerializer(Class<?> type, JsonSerializer<Object> serializer) | |