@Override public JavaType refineDeserializationType(MapperConfig<?> config, Annotated a, JavaType baseType) throws JsonMappingException { JavaType t = _secondary.refineDeserializationType(config, a, baseType); return _primary.refineDeserializationType(config, a, t); }
/** * Method called to see if given method has annotations that indicate * a more specific type than what the argument specifies. * * @deprecated Since 2.8; call {@link #resolveMemberAndTypeAnnotations} instead */ @Deprecated protected JavaType modifyTypeByAnnotation(DeserializationContext ctxt, Annotated a, JavaType type) throws JsonMappingException { AnnotationIntrospector intr = ctxt.getAnnotationIntrospector(); if (intr == null) { return type; } return intr.refineDeserializationType(ctxt.getConfig(), a, type); }
} else { baseType = intr.refineDeserializationType(config, delegate, baseType);
type = intr.refineDeserializationType(ctxt.getConfig(), a, type);
type = intr.refineDeserializationType(ctxt.getConfig(), member, type); return type;
this.deserType = ai.refineDeserializationType(deserConfig, field, javaType); } catch (JsonMappingException e) { throw new RuntimeException(e);
@Override public JavaType refineDeserializationType(MapperConfig<?> config, Annotated a, JavaType baseType) throws JsonMappingException { JavaType t = _secondary.refineDeserializationType(config, a, baseType); return _primary.refineDeserializationType(config, a, t); }
@Override public JavaType refineDeserializationType(MapperConfig<?> config, Annotated a, JavaType baseType) throws JsonMappingException { JavaType t = _secondary.refineDeserializationType(config, a, baseType); return _primary.refineDeserializationType(config, a, t); }
/** * Method called to see if given method has annotations that indicate * a more specific type than what the argument specifies. * * @deprecated Since 2.8; call {@link #resolveMemberAndTypeAnnotations} instead */ @Deprecated protected JavaType modifyTypeByAnnotation(DeserializationContext ctxt, Annotated a, JavaType type) throws JsonMappingException { AnnotationIntrospector intr = ctxt.getAnnotationIntrospector(); if (intr == null) { return type; } return intr.refineDeserializationType(ctxt.getConfig(), a, type); }
return intr.refineDeserializationType(ctxt.getConfig(), a, type);
this.deserType = ai.refineDeserializationType(deserConfig, field, javaType); } catch (JsonMappingException e) { throw new RuntimeException(e);
} else { baseType = intr.refineDeserializationType(config, delegate, baseType);
private AnnotatedType resolveDeserializableType(Annotated accessor, AnnotatedType realType, JavaType baseType, ObjectMapper objectMapper) { AnnotationIntrospector introspector = objectMapper.getDeserializationConfig().getAnnotationIntrospector(); try { objectMapper.getDeserializationContext().getFactory().mapAbstractType(objectMapper.getDeserializationConfig(), objectMapper.constructType(Map.class)); JavaType refined = introspector.refineDeserializationType(objectMapper.getDeserializationConfig(), accessor, baseType); Class<?> raw = ClassUtils.getRawType(realType.getType()); if (!refined.getRawClass().equals(raw)) { if (GenericTypeReflector.isSuperType(realType.getType(), refined.getRawClass())) { AnnotatedType candidate = GenericTypeReflector.getExactSubType(realType, refined.getRawClass()); if (!ClassUtils.isMissingTypeParameters(candidate.getType())) { return candidate; } } return GenericTypeReflector.updateAnnotations(TypeUtils.toJavaType(refined), realType.getAnnotations()); } } catch (JsonMappingException e) { /*no-op*/ } catch (Exception e) { log.warn("Failed to determine the deserializable type for " + GenericTypeReflector.getTypeName(realType.getType()) + " due to an exception", e); } return realType; }
AnnotatedMember member = property.getMember(); if ((intr != null) && (member != null)) { fullType = intr.refineDeserializationType(ctxt.getConfig(), member, fullType);
type = intr.refineDeserializationType(ctxt.getConfig(), a, type);
type = intr.refineDeserializationType(ctxt.getConfig(), a, type);
type = intr.refineDeserializationType(ctxt.getConfig(), member, type); return type;
type = intr.refineDeserializationType(ctxt.getConfig(), member, type); return type;