|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.fasterxml.jackson.databind.ser.impl.ReadOnlyClassToSerializerMap
public final class ReadOnlyClassToSerializerMap
Optimized lookup table for accessing two types of serializers; typed and non-typed. Only accessed from a single thread, so no synchronization needed for accessors.
Field Summary | |
---|---|
protected SerializerCache.TypeKey |
_cacheKey
We'll reuse key class to avoid unnecessary instantiations; since this is not shared between threads, we can just reuse single instance. |
protected JsonSerializerMap |
_map
Actual mappings from type key to serializers |
Method Summary | |
---|---|
static ReadOnlyClassToSerializerMap |
from(HashMap<SerializerCache.TypeKey,JsonSerializer<Object>> src)
Factory method for creating the "blueprint" lookup map. |
ReadOnlyClassToSerializerMap |
instance()
|
JsonSerializer<Object> |
typedValueSerializer(Class<?> cls)
|
JsonSerializer<Object> |
typedValueSerializer(JavaType type)
|
JsonSerializer<Object> |
untypedValueSerializer(Class<?> cls)
|
JsonSerializer<Object> |
untypedValueSerializer(JavaType type)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final JsonSerializerMap _map
protected final SerializerCache.TypeKey _cacheKey
Method Detail |
---|
public ReadOnlyClassToSerializerMap instance()
public static ReadOnlyClassToSerializerMap from(HashMap<SerializerCache.TypeKey,JsonSerializer<Object>> src)
instance()
has to be called first.
public JsonSerializer<Object> typedValueSerializer(JavaType type)
public JsonSerializer<Object> typedValueSerializer(Class<?> cls)
public JsonSerializer<Object> untypedValueSerializer(Class<?> cls)
public JsonSerializer<Object> untypedValueSerializer(JavaType type)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |