Class ReadOnlyClassToSerializerMap
java.lang.Object
org.codehaus.jackson.map.ser.impl.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.
- Since:
- 1.7
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final SerializerCache.TypeKey
We'll reuse key class to avoid unnecessary instantiations; since this is not shared between threads, we can just reuse single instance.protected final JsonSerializerMap
Actual mappings from type key to serializers -
Method Summary
Modifier and TypeMethodDescriptionstatic ReadOnlyClassToSerializerMap
Factory method for creating the "blueprint" lookup map.instance()
typedValueSerializer
(Class<?> cls) typedValueSerializer
(JavaType type) untypedValueSerializer
(Class<?> cls)
-
Field Details
-
_map
Actual mappings from type key to serializers -
_cacheKey
We'll reuse key class to avoid unnecessary instantiations; since this is not shared between threads, we can just reuse single instance.
-
-
Method Details
-
instance
-
from
public static ReadOnlyClassToSerializerMap from(HashMap<SerializerCache.TypeKey, JsonSerializer<Object>> src) Factory method for creating the "blueprint" lookup map. Such map can not be used as is but just shared: to get an actual usable instance,instance()
has to be called first. -
typedValueSerializer
-
typedValueSerializer
-
untypedValueSerializer
-
untypedValueSerializer
-