public abstract class PropertySerializerMap extends Object
Modifier and Type | Class and Description |
---|---|
static class |
PropertySerializerMap.SerializerAndMapResult
Value class used for returning tuple that has both serializer
that was retrieved and new map instance
|
Modifier and Type | Field and Description |
---|---|
protected 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.
|
Modifier | Constructor and Description |
---|---|
protected |
PropertySerializerMap(boolean resetWhenFull) |
protected |
PropertySerializerMap(PropertySerializerMap base) |
Modifier and Type | Method and Description |
---|---|
PropertySerializerMap.SerializerAndMapResult |
addSerializer(Class<?> type,
JsonSerializer<Object> serializer)
Method that can be used to 'register' a serializer that caller has resolved
without help of this map.
|
PropertySerializerMap.SerializerAndMapResult |
addSerializer(JavaType type,
JsonSerializer<Object> serializer) |
static PropertySerializerMap |
emptyForProperties() |
static PropertySerializerMap |
emptyForRootValues() |
PropertySerializerMap.SerializerAndMapResult |
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.
|
PropertySerializerMap.SerializerAndMapResult |
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).
|
PropertySerializerMap.SerializerAndMapResult |
findAndAddPrimarySerializer(JavaType type,
SerializerProvider provider,
BeanProperty property) |
PropertySerializerMap.SerializerAndMapResult |
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
TypeSerializer wrapped
around it. |
PropertySerializerMap.SerializerAndMapResult |
findAndAddRootValueSerializer(JavaType type,
SerializerProvider provider) |
PropertySerializerMap.SerializerAndMapResult |
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).
|
PropertySerializerMap.SerializerAndMapResult |
findAndAddSecondarySerializer(JavaType type,
SerializerProvider provider,
BeanProperty property) |
abstract PropertySerializerMap |
newWith(Class<?> type,
JsonSerializer<Object> serializer) |
abstract JsonSerializer<Object> |
serializerFor(Class<?> type)
Main lookup method.
|
protected final boolean _resetWhenFull
protected PropertySerializerMap(boolean resetWhenFull)
protected PropertySerializerMap(PropertySerializerMap base)
public abstract JsonSerializer<Object> serializerFor(Class<?> type)
public final PropertySerializerMap.SerializerAndMapResult findAndAddPrimarySerializer(Class<?> type, SerializerProvider provider, BeanProperty property) throws JsonMappingException
JsonMappingException
public final PropertySerializerMap.SerializerAndMapResult findAndAddPrimarySerializer(JavaType type, SerializerProvider provider, BeanProperty property) throws JsonMappingException
JsonMappingException
public final PropertySerializerMap.SerializerAndMapResult findAndAddSecondarySerializer(Class<?> type, SerializerProvider provider, BeanProperty property) throws JsonMappingException
JsonMappingException
public final PropertySerializerMap.SerializerAndMapResult findAndAddSecondarySerializer(JavaType type, SerializerProvider provider, BeanProperty property) throws JsonMappingException
JsonMappingException
public final PropertySerializerMap.SerializerAndMapResult findAndAddRootValueSerializer(Class<?> type, SerializerProvider provider) throws JsonMappingException
TypeSerializer
wrapped
around it. Will both find the serializer
and construct new map instance if warranted, and return both.JsonMappingException
public final PropertySerializerMap.SerializerAndMapResult findAndAddRootValueSerializer(JavaType type, SerializerProvider provider) throws JsonMappingException
JsonMappingException
public final PropertySerializerMap.SerializerAndMapResult findAndAddKeySerializer(Class<?> type, SerializerProvider provider, BeanProperty property) throws JsonMappingException
JsonMappingException
public final PropertySerializerMap.SerializerAndMapResult addSerializer(Class<?> type, JsonSerializer<Object> serializer)
public final PropertySerializerMap.SerializerAndMapResult addSerializer(JavaType type, JsonSerializer<Object> serializer)
public abstract PropertySerializerMap newWith(Class<?> type, JsonSerializer<Object> serializer)
public static PropertySerializerMap emptyForProperties()
public static PropertySerializerMap emptyForRootValues()
Copyright © 2008–2021 FasterXML. All rights reserved.