/** * Method called to finalize setup of this deserializer, * after deserializer itself has been registered. This * is needed to handle recursive and transitive dependencies. */ public void resolve(DeserializationConfig config, DeserializerProvider provider) throws JsonMappingException { // just need to worry about property-based one if (_propertyBasedCreator != null) { for (SettableBeanProperty prop : _propertyBasedCreator.properties()) { prop.setValueDeserializer(findDeserializer(config, provider, prop.getType(), prop)); } } }
/** * Method called to finalize setup of this deserializer, * after deserializer itself has been registered. This * is needed to handle recursive and transitive dependencies. */ public void resolve(DeserializationConfig config, DeserializerProvider provider) throws JsonMappingException { // just need to worry about property-based one if (_propertyBasedCreator != null) { // Need to / should not create separate HashMap<JavaType, JsonDeserializer<Object>> seen = new HashMap<JavaType, JsonDeserializer<Object>>(); for (SettableBeanProperty prop : _propertyBasedCreator.properties()) { prop.setValueDeserializer(findDeserializer(config, provider, prop.getType(), prop.getPropertyName(), seen)); } } }
continue; prop.setValueDeserializer(findDeserializer(config, provider, prop.getType(), prop.getPropertyName(), seen)); prop.setValueDeserializer(findDeserializer(config, provider, prop.getType(), prop.getPropertyName(), seen));
prop.setValueDeserializer(findDeserializer(config, provider, prop.getType(), prop)); for (SettableBeanProperty prop : _propertyBasedCreator.properties()) { if (!prop.hasValueDeserializer()) { prop.setValueDeserializer(findDeserializer(config, provider, prop.getType(), prop));
protected SettableBeanProperty constructSettableProperty(DeserializationConfig config, BasicBeanDescription beanDesc, String name, AnnotatedField field) throws JsonMappingException { // need to ensure method is callable (for non-public) if (config.isEnabled(DeserializationConfig.Feature.CAN_OVERRIDE_ACCESS_MODIFIERS)) { field.fixAccess(); } JavaType type = resolveType(config, beanDesc, field.getGenericType(), field); /* First: does the Method specify the deserializer to use? * If so, let's use it. */ JsonDeserializer<Object> propDeser = findDeserializerFromAnnotation(config, field); Field f = field.getAnnotated(); if (propDeser != null) { SettableBeanProperty prop = new SettableBeanProperty.FieldProperty(name, type, f); prop.setValueDeserializer(propDeser); return prop; } // Otherwise, method may specify more specific (sub-)class for // value (no need to check if explicit deser was specified): type = modifyTypeByAnnotation(config, field, type); return new SettableBeanProperty.FieldProperty(name, type, f); }
if (propDeser != null) { SettableBeanProperty prop = new SettableBeanProperty.MethodProperty(name, type, m); prop.setValueDeserializer(propDeser); return prop;
if (propDeser != null) { SettableBeanProperty prop = new SettableBeanProperty.SetterlessProperty(name, type, m); prop.setValueDeserializer(propDeser); return prop;
beanDesc.getClassAnnotations(), getter); if (propDeser != null) { prop.setValueDeserializer(propDeser);
/** * Method that will construct a property object that represents * a logical property passed via Creator (constructor or static * factory method) */ protected SettableBeanProperty constructCreatorProperty(DeserializationConfig config, BasicBeanDescription beanDesc, String name, int index, AnnotatedParameter param) throws JsonMappingException { JavaType t0 = config.getTypeFactory().constructType(param.getParameterType(), beanDesc.bindingsForBeanType()); BeanProperty.Std property = new BeanProperty.Std(name, t0, beanDesc.getClassAnnotations(), param); JavaType type = resolveType(config, beanDesc, t0, param, property); if (type != t0) { property = property.withType(type); } // Is there an annotation that specifies exact deserializer? JsonDeserializer<Object> deser = findDeserializerFromAnnotation(config, param, property); // If yes, we are mostly done: type = modifyTypeByAnnotation(config, param, type, name); TypeDeserializer typeDeser = findTypeDeserializer(config, type, property); SettableBeanProperty prop = new SettableBeanProperty.CreatorProperty(name, type, typeDeser, beanDesc.getClassAnnotations(), param, index); if (deser != null) { prop.setValueDeserializer(deser); } return prop; } }
beanDesc.getClassAnnotations(), field); if (propDeser != null) { prop.setValueDeserializer(propDeser);
beanDesc.getClassAnnotations(), setter); if (propDeser != null) { prop.setValueDeserializer(propDeser);