Class ReadOnlyClassToSerializerMap
- java.lang.Object
-
- com.fasterxml.jackson.databind.ser.impl.ReadOnlyClassToSerializerMap
-
public final class ReadOnlyClassToSerializerMap extends java.lang.Object
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.Note that before 2.6 this class was much smaller, and referred most operations to separate
JsonSerializerMap
, but in 2.6 functions were combined.
-
-
Constructor Summary
Constructors Constructor Description ReadOnlyClassToSerializerMap(java.util.Map<TypeKey,JsonSerializer<java.lang.Object>> serializers)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ReadOnlyClassToSerializerMap
from(java.util.HashMap<TypeKey,JsonSerializer<java.lang.Object>> src)
Factory method for constructing an instance.int
size()
JsonSerializer<java.lang.Object>
typedValueSerializer(JavaType type)
JsonSerializer<java.lang.Object>
typedValueSerializer(java.lang.Class<?> type)
JsonSerializer<java.lang.Object>
untypedValueSerializer(JavaType type)
JsonSerializer<java.lang.Object>
untypedValueSerializer(java.lang.Class<?> type)
-
-
-
Constructor Detail
-
ReadOnlyClassToSerializerMap
public ReadOnlyClassToSerializerMap(java.util.Map<TypeKey,JsonSerializer<java.lang.Object>> serializers)
-
-
Method Detail
-
from
public static ReadOnlyClassToSerializerMap from(java.util.HashMap<TypeKey,JsonSerializer<java.lang.Object>> src)
Factory method for constructing an instance.
-
size
public int size()
-
typedValueSerializer
public JsonSerializer<java.lang.Object> typedValueSerializer(JavaType type)
-
typedValueSerializer
public JsonSerializer<java.lang.Object> typedValueSerializer(java.lang.Class<?> type)
-
untypedValueSerializer
public JsonSerializer<java.lang.Object> untypedValueSerializer(JavaType type)
-
untypedValueSerializer
public JsonSerializer<java.lang.Object> untypedValueSerializer(java.lang.Class<?> type)
-
-