public JsonSerializer<Object> typedValueSerializer(Class<?> cls) { synchronized (this) { return _sharedMap.get(new TypeKey(cls, true)); } }
/** * Method that checks if the shared (and hence, synchronized) lookup Map might have * untyped serializer for given type. */ public JsonSerializer<Object> untypedValueSerializer(Class<?> type) { synchronized (this) { return _sharedMap.get(new TypeKey(type, false)); } }
public JsonSerializer<Object> typedValueSerializer(JavaType type) { synchronized (this) { return _sharedMap.get(new TypeKey(type, true)); } }
public void addTypedSerializer(Class<?> cls, JsonSerializer<Object> ser) { synchronized (this) { if (_sharedMap.put(new TypeKey(cls, true), ser) == null) { // let's invalidate the read-only copy, too, to get it updated _readOnlyMap = null; } } }
public JsonSerializer<Object> typedValueSerializer(Class<?> cls) { synchronized (this) { return _sharedMap.get(new TypeKey(cls, true)); } }
/** * @since 1.5 */ public JsonSerializer<Object> untypedValueSerializer(JavaType type) { synchronized (this) { return _sharedMap.get(new TypeKey(type, false)); } }
public JsonSerializer<Object> typedValueSerializer(JavaType type) { synchronized (this) { return _sharedMap.get(new TypeKey(type, true)); } }
/** * @since 1.8 */ public void addAndResolveNonTypedSerializer(Class<?> type, JsonSerializer<Object> ser, SerializerProvider provider) throws JsonMappingException { synchronized (this) { if (_sharedMap.put(new TypeKey(type, false), ser) == null) { // let's invalidate the read-only copy, too, to get it updated _readOnlyMap = null; } /* Finally: some serializers want to do post-processing, after * getting registered (to handle cyclic deps). */ /* 14-May-2011, tatu: As per [JACKSON-570], resolving needs to be done * in synchronized manner; this because while we do need to register * instance first, we also must keep lock until resolution is complete */ if (ser instanceof ResolvableSerializer) { ((ResolvableSerializer) ser).resolve(provider); } } }
/** * @since 1.8 */ public void addAndResolveNonTypedSerializer(JavaType type, JsonSerializer<Object> ser, SerializerProvider provider) throws JsonMappingException { synchronized (this) { if (_sharedMap.put(new TypeKey(type, false), ser) == null) { // let's invalidate the read-only copy, too, to get it updated _readOnlyMap = null; } /* Finally: some serializers want to do post-processing, after * getting registered (to handle cyclic deps). */ /* 14-May-2011, tatu: As per [JACKSON-570], resolving needs to be done * in synchronized manner; this because while we do need to register * instance first, we also must keep lock until resolution is complete */ if (ser instanceof ResolvableSerializer) { ((ResolvableSerializer) ser).resolve(provider); } } }
/** * Method called if none of lookups succeeded, and caller had to construct * a serializer. If so, we will update the shared lookup map so that it * can be resolved via it next time. */ public void addTypedSerializer(JavaType type, JsonSerializer<Object> ser) { synchronized (this) { if (_sharedMap.put(new TypeKey(type, true), ser) == null) { // let's invalidate the read-only copy, too, to get it updated _readOnlyMap = null; } } }
public void addTypedSerializer(Class<?> cls, JsonSerializer<Object> ser) { synchronized (this) { if (_sharedMap.put(new TypeKey(cls, true), ser) == null) { // let's invalidate the read-only copy, too, to get it updated _readOnlyMap = null; } } }
public JsonSerializer<Object> typedValueSerializer(Class<?> cls) { synchronized (this) { return _sharedMap.get(new TypeKey(cls, true)); } }
/** * Method that checks if the shared (and hence, synchronized) lookup Map might have * untyped serializer for given type. */ public JsonSerializer<Object> untypedValueSerializer(Class<?> type) { synchronized (this) { return _sharedMap.get(new TypeKey(type, false)); } }
public JsonSerializer<Object> typedValueSerializer(JavaType type) { synchronized (this) { return _sharedMap.get(new TypeKey(type, true)); } }
/** * @since 1.5 */ public JsonSerializer<Object> untypedValueSerializer(JavaType type) { synchronized (this) { return _sharedMap.get(new TypeKey(type, false)); } }
/** * @since 1.8 */ public void addAndResolveNonTypedSerializer(JavaType type, JsonSerializer<Object> ser, SerializerProvider provider) throws JsonMappingException { synchronized (this) { if (_sharedMap.put(new TypeKey(type, false), ser) == null) { // let's invalidate the read-only copy, too, to get it updated _readOnlyMap = null; } /* Finally: some serializers want to do post-processing, after * getting registered (to handle cyclic deps). */ /* 14-May-2011, tatu: As per [JACKSON-570], resolving needs to be done * in synchronized manner; this because while we do need to register * instance first, we also must keep lock until resolution is complete */ if (ser instanceof ResolvableSerializer) { ((ResolvableSerializer) ser).resolve(provider); } } }
/** * @since 1.8 */ public void addAndResolveNonTypedSerializer(Class<?> type, JsonSerializer<Object> ser, SerializerProvider provider) throws JsonMappingException { synchronized (this) { if (_sharedMap.put(new TypeKey(type, false), ser) == null) { // let's invalidate the read-only copy, too, to get it updated _readOnlyMap = null; } /* Finally: some serializers want to do post-processing, after * getting registered (to handle cyclic deps). */ /* 14-May-2011, tatu: As per [JACKSON-570], resolving needs to be done * in synchronized manner; this because while we do need to register * instance first, we also must keep lock until resolution is complete */ if (ser instanceof ResolvableSerializer) { ((ResolvableSerializer) ser).resolve(provider); } } }
/** * Method called if none of lookups succeeded, and caller had to construct * a serializer. If so, we will update the shared lookup map so that it * can be resolved via it next time. */ public void addTypedSerializer(JavaType type, JsonSerializer<Object> ser) { synchronized (this) { if (_sharedMap.put(new TypeKey(type, true), ser) == null) { // let's invalidate the read-only copy, too, to get it updated _readOnlyMap = null; } } }
public void addTypedSerializer(Class<?> cls, JsonSerializer<Object> ser) { synchronized (this) { if (_sharedMap.put(new TypeKey(cls, true), ser) == null) { // let's invalidate the read-only copy, too, to get it updated _readOnlyMap = null; } } }
/** * @since 1.5 */ public JsonSerializer<Object> untypedValueSerializer(JavaType type) { synchronized (this) { return _sharedMap.get(new TypeKey(type, false)); } }