/** * Method called for primary property deserializers (ones * directly created to deserialize values of a POJO property), * to handle details of resolving * {@link ContextualDeserializer} with given property context. * * @param prop Property for which the given primary deserializer is used; never null. * * @since 2.5 */ public JsonDeserializer<?> handlePrimaryContextualization(JsonDeserializer<?> deser, BeanProperty prop, JavaType type) throws JsonMappingException { if (deser instanceof ContextualDeserializer) { _currentType = new LinkedNode<JavaType>(type, _currentType); try { deser = ((ContextualDeserializer) deser).createContextual(this, prop); } finally { _currentType = _currentType.next(); } } return deser; }
/** * Method called for secondary property deserializers (ones * NOT directly created to deal with an annotatable POJO property, * but instead created as a component -- such as value deserializers * for structured types, or deserializers for root values) * to handle details of resolving * {@link ContextualDeserializer} with given property context. * Given that these deserializers are not directly related to given property * (or, in case of root value property, to any property), annotations * accessible may or may not be relevant. * * @param prop Property for which deserializer is used, if any; null * when deserializing root values * * @since 2.5 */ public JsonDeserializer<?> handleSecondaryContextualization(JsonDeserializer<?> deser, BeanProperty prop, JavaType type) throws JsonMappingException { if (deser instanceof ContextualDeserializer) { _currentType = new LinkedNode<JavaType>(type, _currentType); try { deser = ((ContextualDeserializer) deser).createContextual(this, prop); } finally { _currentType = _currentType.next(); } } return deser; }
@Deprecated // since 2.5; remove from 2.6 public JsonDeserializer<?> handleSecondaryContextualization(JsonDeserializer<?> deser, BeanProperty prop) throws JsonMappingException { if (deser instanceof ContextualDeserializer) { deser = ((ContextualDeserializer) deser).createContextual(this, prop); } return deser; }
@Deprecated // since 2.5; remove from 2.6 public JsonDeserializer<?> handleSecondaryContextualization(JsonDeserializer<?> deser, BeanProperty prop) throws JsonMappingException { if (deser instanceof ContextualDeserializer) { deser = ((ContextualDeserializer) deser).createContextual(this, prop); } return deser; }
@Deprecated // since 2.5; remove from 2.9 public JsonDeserializer<?> handleSecondaryContextualization(JsonDeserializer<?> deser, BeanProperty prop) throws JsonMappingException { if (deser instanceof ContextualDeserializer) { deser = ((ContextualDeserializer) deser).createContextual(this, prop); } return deser; }
@Override public JsonDeserializer<?> createContextual(DeserializationContext ctxt, BeanProperty property) throws JsonMappingException { if (contextualDeserializer != null) { return new LocationDeserializerWrapper(locations, contextualDeserializer.createContextual(ctxt, property)); } return this; } }
public JsonDeserializer<?> createContextual(DeserializationContext ctxt, BeanProperty property) throws JsonMappingException { JsonDeserializer<?> del = _delegatee; if (del instanceof ContextualDeserializer) { del = ((ContextualDeserializer) del).createContextual(ctxt, property); } return _createContextual(ctxt, property, del); }
@Override public JsonDeserializer<?> createContextual(DeserializationContext ctxt, BeanProperty property) throws JsonMappingException { if (contextualDeserializer != null) { return new LocationDeserializerWrapper(locations, contextualDeserializer.createContextual(ctxt, property)); } return this; } }
/** * Method for finding a value deserializer, and creating a contextual * version if necessary, for value reached via specified property. */ @SuppressWarnings("unchecked") public final JsonDeserializer<Object> findContextualValueDeserializer(JavaType type, BeanProperty property) throws JsonMappingException { JsonDeserializer<Object> deser = _cache.findValueDeserializer(this, _factory, type); if (deser != null) { if (deser instanceof ContextualDeserializer) { deser = (JsonDeserializer<Object>)((ContextualDeserializer) deser).createContextual(this, property); } } return deser; }
/** * Method for finding a value deserializer, and creating a contextual * version if necessary, for value reached via specified property. */ @SuppressWarnings("unchecked") public final JsonDeserializer<Object> findContextualValueDeserializer(JavaType type, BeanProperty property) throws JsonMappingException { JsonDeserializer<Object> deser = _cache.findValueDeserializer(this, _factory, type); if (deser != null) { if (deser instanceof ContextualDeserializer) { deser = (JsonDeserializer<Object>)((ContextualDeserializer) deser).createContextual(this, property); } } return deser; }
@Override public Object deserialize(JsonParser parser, DeserializationContext context) throws IOException, JsonProcessingException { JsonDeserializer<?> deser = baseDeser; if (deser instanceof ContextualDeserializer) { deser = ((ContextualDeserializer) deser).createContextual(context, property); } return service.decrypt(parser, deser, context, property.getType()); }
public JsonDeserializer<?> createContextual(DeserializationContext ctxt, BeanProperty property) throws JsonMappingException { JsonDeserializer<?> deser = _enumDeserializer; if (deser == null) { deser = ctxt.findContextualValueDeserializer(_enumType, property); } else { // if directly assigned, probably not yet contextual, so: if (deser instanceof ContextualDeserializer) { deser = ((ContextualDeserializer) deser).createContextual(ctxt, property); } } return withDeserializer(deser); }
public JsonDeserializer<?> createContextual(DeserializationContext ctxt, BeanProperty property) throws JsonMappingException { JsonDeserializer<?> deser = _enumDeserializer; if (deser == null) { deser = ctxt.findContextualValueDeserializer(_enumType, property); } else { // if directly assigned, probably not yet contextual, so: if (deser instanceof ContextualDeserializer) { deser = ((ContextualDeserializer) deser).createContextual(ctxt, property); } } return withDeserializer(deser); }
/** * Method called for primary property deserializers (ones * directly created to deserialize values of a POJO property), * to handle details of resolving * {@link ContextualDeserializer} with given property context. * * @param prop Property for which the given primary deserializer is used; never null. * * @since 2.5 */ public JsonDeserializer<?> handlePrimaryContextualization(JsonDeserializer<?> deser, BeanProperty prop, JavaType type) throws JsonMappingException { if (deser instanceof ContextualDeserializer) { _currentType = new LinkedNode<JavaType>(type, _currentType); try { deser = ((ContextualDeserializer) deser).createContextual(this, prop); } finally { _currentType = _currentType.next(); } } return deser; }
/** * Method called for primary property deserializers (ones * directly created to deserialize values of a POJO property), * to handle details of resolving * {@link ContextualDeserializer} with given property context. * * @param prop Property for which the given primary deserializer is used; never null. * * @since 2.5 */ public JsonDeserializer<?> handlePrimaryContextualization(JsonDeserializer<?> deser, BeanProperty prop, JavaType type) throws JsonMappingException { if (deser instanceof ContextualDeserializer) { _currentType = new LinkedNode<JavaType>(type, _currentType); try { deser = ((ContextualDeserializer) deser).createContextual(this, prop); } finally { _currentType = _currentType.next(); } } return deser; }
/** * Method called for primary property deserializers (ones * directly created to deserialize values of a POJO property), * to handle details of resolving * {@link ContextualDeserializer} with given property context. * * @param prop Property for which the given primary deserializer is used; never null. * * @since 2.5 */ public JsonDeserializer<?> handlePrimaryContextualization(JsonDeserializer<?> deser, BeanProperty prop, JavaType type) throws JsonMappingException { if (deser instanceof ContextualDeserializer) { _currentType = new LinkedNode<JavaType>(type, _currentType); try { deser = ((ContextualDeserializer) deser).createContextual(this, prop); } finally { _currentType = _currentType.next(); } } return deser; }
/** * Method called for primary property deserializers (ones * directly created to deserialize values of a POJO property), * to handle details of resolving * {@link ContextualDeserializer} with given property context. * * @param prop Property for which the given primary deserializer is used; never null. * * @since 2.5 */ public JsonDeserializer<?> handlePrimaryContextualization(JsonDeserializer<?> deser, BeanProperty prop, JavaType type) throws JsonMappingException { if (deser instanceof ContextualDeserializer) { _currentType = new LinkedNode<JavaType>(type, _currentType); try { deser = ((ContextualDeserializer) deser).createContextual(this, prop); } finally { _currentType = _currentType.next(); } } return deser; }
/** * Method called for secondary property deserializers (ones * NOT directly created to deal with an annotatable POJO property, * but instead created as a component -- such as value deserializers * for structured types, or deserializers for root values) * to handle details of resolving * {@link ContextualDeserializer} with given property context. * Given that these deserializers are not directly related to given property * (or, in case of root value property, to any property), annotations * accessible may or may not be relevant. * * @param prop Property for which deserializer is used, if any; null * when deserializing root values * * @since 2.5 */ public JsonDeserializer<?> handleSecondaryContextualization(JsonDeserializer<?> deser, BeanProperty prop, JavaType type) throws JsonMappingException { if (deser instanceof ContextualDeserializer) { _currentType = new LinkedNode<JavaType>(type, _currentType); try { deser = ((ContextualDeserializer) deser).createContextual(this, prop); } finally { _currentType = _currentType.next(); } } return deser; }
/** * Method called for secondary property deserializers (ones * NOT directly created to deal with an annotatable POJO property, * but instead created as a component -- such as value deserializers * for structured types, or deserializers for root values) * to handle details of resolving * {@link ContextualDeserializer} with given property context. * Given that these deserializers are not directly related to given property * (or, in case of root value property, to any property), annotations * accessible may or may not be relevant. * * @param prop Property for which deserializer is used, if any; null * when deserializing root values * * @since 2.5 */ public JsonDeserializer<?> handleSecondaryContextualization(JsonDeserializer<?> deser, BeanProperty prop, JavaType type) throws JsonMappingException { if (deser instanceof ContextualDeserializer) { _currentType = new LinkedNode<JavaType>(type, _currentType); try { deser = ((ContextualDeserializer) deser).createContextual(this, prop); } finally { _currentType = _currentType.next(); } } return deser; }
/** * Method called for secondary property deserializers (ones * NOT directly created to deal with an annotatable POJO property, * but instead created as a component -- such as value deserializers * for structured types, or deserializers for root values) * to handle details of resolving * {@link ContextualDeserializer} with given property context. * Given that these deserializers are not directly related to given property * (or, in case of root value property, to any property), annotations * accessible may or may not be relevant. * * @param prop Property for which deserializer is used, if any; null * when deserializing root values * * @since 2.5 */ public JsonDeserializer<?> handleSecondaryContextualization(JsonDeserializer<?> deser, BeanProperty prop, JavaType type) throws JsonMappingException { if (deser instanceof ContextualDeserializer) { _currentType = new LinkedNode<JavaType>(type, _currentType); try { deser = ((ContextualDeserializer) deser).createContextual(this, prop); } finally { _currentType = _currentType.next(); } } return deser; }