public final class SerializerCache
extends java.lang.Object
Cache contains three kinds of entries, based on combination of class pair key. First class in key is for the type to serialize, and second one is type used for determining how to resolve value type. One (but not both) of entries can be null.
Constructor and Description |
---|
SerializerCache() |
Modifier and Type | Method and Description |
---|---|
void |
addAndResolveNonTypedSerializer(java.lang.Class<?> rawType,
JavaType fullType,
JsonSerializer<java.lang.Object> ser,
SerializerProvider provider)
Another alternative that will cover both access via raw type and matching
fully resolved type, in one fell swoop.
|
void |
addAndResolveNonTypedSerializer(java.lang.Class<?> type,
JsonSerializer<java.lang.Object> ser,
SerializerProvider provider) |
void |
addAndResolveNonTypedSerializer(JavaType type,
JsonSerializer<java.lang.Object> ser,
SerializerProvider provider) |
void |
addTypedSerializer(java.lang.Class<?> cls,
JsonSerializer<java.lang.Object> ser) |
void |
addTypedSerializer(JavaType type,
JsonSerializer<java.lang.Object> ser)
Method called if none of lookups succeeded, and caller had to construct
a serializer.
|
void |
flush()
Method called by StdSerializerProvider#flushCachedSerializers() to
clear all cached serializers
|
ReadOnlyClassToSerializerMap |
getReadOnlyLookupMap()
Method that can be called to get a read-only instance populated from the
most recent version of the shared lookup Map.
|
int |
size() |
JsonSerializer<java.lang.Object> |
typedValueSerializer(java.lang.Class<?> cls) |
JsonSerializer<java.lang.Object> |
typedValueSerializer(JavaType type) |
JsonSerializer<java.lang.Object> |
untypedValueSerializer(java.lang.Class<?> type)
Method that checks if the shared (and hence, synchronized) lookup Map might have
untyped serializer for given type.
|
JsonSerializer<java.lang.Object> |
untypedValueSerializer(JavaType type) |
public ReadOnlyClassToSerializerMap getReadOnlyLookupMap()
public int size()
public JsonSerializer<java.lang.Object> untypedValueSerializer(java.lang.Class<?> type)
public JsonSerializer<java.lang.Object> untypedValueSerializer(JavaType type)
public JsonSerializer<java.lang.Object> typedValueSerializer(JavaType type)
public JsonSerializer<java.lang.Object> typedValueSerializer(java.lang.Class<?> cls)
public void addTypedSerializer(JavaType type, JsonSerializer<java.lang.Object> ser)
public void addTypedSerializer(java.lang.Class<?> cls, JsonSerializer<java.lang.Object> ser)
public void addAndResolveNonTypedSerializer(java.lang.Class<?> type, JsonSerializer<java.lang.Object> ser, SerializerProvider provider) throws JsonMappingException
JsonMappingException
public void addAndResolveNonTypedSerializer(JavaType type, JsonSerializer<java.lang.Object> ser, SerializerProvider provider) throws JsonMappingException
JsonMappingException
public void addAndResolveNonTypedSerializer(java.lang.Class<?> rawType, JavaType fullType, JsonSerializer<java.lang.Object> ser, SerializerProvider provider) throws JsonMappingException
JsonMappingException
public void flush()
Copyright © 2010 - 2020 Adobe. All Rights Reserved