public JsonDeserializer<?> createMapLikeDeserializer(DeserializationConfig paramDeserializationConfig, DeserializerProvider paramDeserializerProvider, MapLikeType paramMapLikeType, BeanProperty paramBeanProperty) throws JsonMappingException { MapLikeType localMapLikeType1 = (MapLikeType)mapAbstractType(paramDeserializationConfig, paramMapLikeType); BasicBeanDescription localBasicBeanDescription = (BasicBeanDescription)paramDeserializationConfig.introspectForCreation(localMapLikeType1); JsonDeserializer localJsonDeserializer1 = findDeserializerFromAnnotation(paramDeserializationConfig, localBasicBeanDescription.getClassInfo(), paramBeanProperty); if (localJsonDeserializer1 != null) return localJsonDeserializer1; MapLikeType localMapLikeType2 = (MapLikeType)modifyTypeByAnnotation(paramDeserializationConfig, localBasicBeanDescription.getClassInfo(), localMapLikeType1, null); JavaType localJavaType1 = localMapLikeType2.getKeyType(); JavaType localJavaType2 = localMapLikeType2.getContentType(); JsonDeserializer localJsonDeserializer2 = (JsonDeserializer)localJavaType2.getValueHandler(); KeyDeserializer localKeyDeserializer = (KeyDeserializer)localJavaType1.getValueHandler(); if (localKeyDeserializer == null) localKeyDeserializer = paramDeserializerProvider.findKeyDeserializer(paramDeserializationConfig, localJavaType1, paramBeanProperty); TypeDeserializer localTypeDeserializer = (TypeDeserializer)localJavaType2.getTypeHandler(); if (localTypeDeserializer == null) localTypeDeserializer = findTypeDeserializer(paramDeserializationConfig, localJavaType2, paramBeanProperty); return _findCustomMapLikeDeserializer(localMapLikeType2, paramDeserializationConfig, paramDeserializerProvider, localBasicBeanDescription, paramBeanProperty, localKeyDeserializer, localTypeDeserializer, localJsonDeserializer2); }
public KeyDeserializer createKeyDeserializer(DeserializationConfig paramDeserializationConfig, JavaType paramJavaType, BeanProperty paramBeanProperty) throws JsonMappingException { if (this._factoryConfig.hasKeyDeserializers()) { BasicBeanDescription localBasicBeanDescription = (BasicBeanDescription)paramDeserializationConfig.introspectClassAnnotations(paramJavaType.getRawClass()); Iterator localIterator = this._factoryConfig.keyDeserializers().iterator(); while (localIterator.hasNext()) { KeyDeserializer localKeyDeserializer = ((KeyDeserializers)localIterator.next()).findKeyDeserializer(paramJavaType, paramDeserializationConfig, localBasicBeanDescription, paramBeanProperty); if (localKeyDeserializer != null) return localKeyDeserializer; } } return null; }
public static KeyDeserializer findStringBasedKeyDeserializer(DeserializationConfig config, JavaType type) { /* We don't need full deserialization information, just need to * know creators. */ BasicBeanDescription beanDesc = config.introspect(type); // Ok, so: can we find T(String) constructor? Constructor<?> ctor = beanDesc.findSingleArgConstructor(String.class); if (ctor != null) { return new StdKeyDeserializer.StringCtorKeyDeserializer(ctor); } /* or if not, "static T valueOf(String)" (or equivalent marked * with @JsonCreator annotation?) */ Method m = beanDesc.findFactoryMethod(String.class); if (m != null){ return new StdKeyDeserializer.StringFactoryKeyDeserializer(m); } // nope, no such luck... return null; }
public JsonDeserializer<?> createMapLikeDeserializer(DeserializationConfig paramDeserializationConfig, DeserializerProvider paramDeserializerProvider, MapLikeType paramMapLikeType, BeanProperty paramBeanProperty) { MapLikeType localMapLikeType1 = (MapLikeType)mapAbstractType(paramDeserializationConfig, paramMapLikeType); BasicBeanDescription localBasicBeanDescription = (BasicBeanDescription)paramDeserializationConfig.introspectForCreation(localMapLikeType1); JsonDeserializer localJsonDeserializer1 = findDeserializerFromAnnotation(paramDeserializationConfig, localBasicBeanDescription.getClassInfo(), paramBeanProperty); if (localJsonDeserializer1 != null) return localJsonDeserializer1; MapLikeType localMapLikeType2 = (MapLikeType)modifyTypeByAnnotation(paramDeserializationConfig, localBasicBeanDescription.getClassInfo(), localMapLikeType1, null); JavaType localJavaType1 = localMapLikeType2.getKeyType(); JavaType localJavaType2 = localMapLikeType2.getContentType(); JsonDeserializer localJsonDeserializer2 = (JsonDeserializer)localJavaType2.getValueHandler(); KeyDeserializer localKeyDeserializer1 = (KeyDeserializer)localJavaType1.getValueHandler(); if (localKeyDeserializer1 == null); for (KeyDeserializer localKeyDeserializer2 = paramDeserializerProvider.findKeyDeserializer(paramDeserializationConfig, localJavaType1, paramBeanProperty); ; localKeyDeserializer2 = localKeyDeserializer1) { TypeDeserializer localTypeDeserializer1 = (TypeDeserializer)localJavaType2.getTypeHandler(); if (localTypeDeserializer1 == null); for (TypeDeserializer localTypeDeserializer2 = findTypeDeserializer(paramDeserializationConfig, localJavaType2, paramBeanProperty); ; localTypeDeserializer2 = localTypeDeserializer1) return _findCustomMapLikeDeserializer(localMapLikeType2, paramDeserializationConfig, paramDeserializerProvider, localBasicBeanDescription, paramBeanProperty, localKeyDeserializer2, localTypeDeserializer2, localJsonDeserializer2); } }
public static KeyDeserializer findStringBasedKeyDeserializer(DeserializationConfig paramDeserializationConfig, JavaType paramJavaType) { BasicBeanDescription localBasicBeanDescription = (BasicBeanDescription)paramDeserializationConfig.introspect(paramJavaType); Constructor localConstructor = localBasicBeanDescription.findSingleArgConstructor(new Class[] { String.class }); if (localConstructor != null) { if (paramDeserializationConfig.isEnabled(DeserializationConfig.Feature.CAN_OVERRIDE_ACCESS_MODIFIERS)) ClassUtil.checkAndFixAccess(localConstructor); return new StdKeyDeserializer.StringCtorKeyDeserializer(localConstructor); } Method localMethod = localBasicBeanDescription.findFactoryMethod(new Class[] { String.class }); if (localMethod != null) { if (paramDeserializationConfig.isEnabled(DeserializationConfig.Feature.CAN_OVERRIDE_ACCESS_MODIFIERS)) ClassUtil.checkAndFixAccess(localMethod); return new StdKeyDeserializer.StringFactoryKeyDeserializer(localMethod); } return null; }
public final JsonDeserializer<?> findMapDeserializer(MapType paramMapType, DeserializationConfig paramDeserializationConfig, DeserializerProvider paramDeserializerProvider, BeanDescription paramBeanDescription, BeanProperty paramBeanProperty, KeyDeserializer paramKeyDeserializer, TypeDeserializer paramTypeDeserializer, JsonDeserializer<?> paramJsonDeserializer) { Class localClass = paramMapType.getRawClass(); if (dh.class.isAssignableFrom(localClass)) { dx.class.isAssignableFrom(localClass); cq.class.isAssignableFrom(localClass); return new e(paramMapType, paramKeyDeserializer, paramTypeDeserializer, a(paramJsonDeserializer, paramDeserializationConfig, paramDeserializerProvider, paramBeanProperty, paramMapType)); } if (hs.class.isAssignableFrom(localClass)) { ep.class.isAssignableFrom(localClass); jb.class.isAssignableFrom(localClass); kf.class.isAssignableFrom(localClass); } return null; }
public SimpleKeyDeserializers addDeserializer(Class<?> paramClass, KeyDeserializer paramKeyDeserializer) { if (this._classMappings == null) this._classMappings = new HashMap(); this._classMappings.put(new ClassKey(paramClass), paramKeyDeserializer); return this; }
public SimpleModule addKeyDeserializer(Class<?> paramClass, KeyDeserializer paramKeyDeserializer) { if (this._keyDeserializers == null) this._keyDeserializers = new SimpleKeyDeserializers(); this._keyDeserializers.addDeserializer(paramClass, paramKeyDeserializer); return this; }
public JsonDeserializer<?> findMapDeserializer(MapType paramMapType, DeserializationConfig paramDeserializationConfig, DeserializerProvider paramDeserializerProvider, BeanDescription paramBeanDescription, BeanProperty paramBeanProperty, KeyDeserializer paramKeyDeserializer, TypeDeserializer paramTypeDeserializer, JsonDeserializer<?> paramJsonDeserializer) throws JsonMappingException { if (this._classMappings == null) return null; return (JsonDeserializer)this._classMappings.get(new ClassKey(paramMapType.getRawClass())); }
public JsonDeserializer<?> findMapLikeDeserializer(MapLikeType paramMapLikeType, DeserializationConfig paramDeserializationConfig, DeserializerProvider paramDeserializerProvider, BeanDescription paramBeanDescription, BeanProperty paramBeanProperty, KeyDeserializer paramKeyDeserializer, TypeDeserializer paramTypeDeserializer, JsonDeserializer<?> paramJsonDeserializer) throws JsonMappingException { if (this._classMappings == null) return null; return (JsonDeserializer)this._classMappings.get(new ClassKey(paramMapLikeType.getRawClass())); }
public Class<? extends KeyDeserializer> findKeyDeserializer(Annotated paramAnnotated) { JsonDeserialize localJsonDeserialize = (JsonDeserialize)paramAnnotated.getAnnotation(JsonDeserialize.class); if (localJsonDeserialize != null) { Class localClass = localJsonDeserialize.keyUsing(); if (localClass != KeyDeserializer.None.class) return localClass; } return null; }
protected JavaType resolveType(DeserializationConfig paramDeserializationConfig, BasicBeanDescription paramBasicBeanDescription, JavaType paramJavaType, AnnotatedMember paramAnnotatedMember, BeanProperty paramBeanProperty) { if (paramJavaType.isContainerType()) { AnnotationIntrospector localAnnotationIntrospector = paramDeserializationConfig.getAnnotationIntrospector(); JavaType localJavaType = paramJavaType.getKeyType(); if (localJavaType != null) { Class localClass2 = localAnnotationIntrospector.findKeyDeserializer(paramAnnotatedMember); if ((localClass2 != null) && (localClass2 != KeyDeserializer.None.class)) localJavaType.setValueHandler(paramDeserializationConfig.keyDeserializerInstance(paramAnnotatedMember, localClass2)); } Class localClass1 = localAnnotationIntrospector.findContentDeserializer(paramAnnotatedMember); if ((localClass1 != null) && (localClass1 != JsonDeserializer.None.class)) { JsonDeserializer localJsonDeserializer = paramDeserializationConfig.deserializerInstance(paramAnnotatedMember, localClass1); paramJavaType.getContentType().setValueHandler(localJsonDeserializer); } if ((paramAnnotatedMember instanceof AnnotatedMember)) { TypeDeserializer localTypeDeserializer2 = findPropertyContentTypeDeserializer(paramDeserializationConfig, paramJavaType, paramAnnotatedMember, paramBeanProperty); if (localTypeDeserializer2 != null) paramJavaType = paramJavaType.withContentTypeHandler(localTypeDeserializer2); } } if ((paramAnnotatedMember instanceof AnnotatedMember)); for (TypeDeserializer localTypeDeserializer1 = findPropertyTypeDeserializer(paramDeserializationConfig, paramJavaType, paramAnnotatedMember, paramBeanProperty); ; localTypeDeserializer1 = findTypeDeserializer(paramDeserializationConfig, paramJavaType, null)) { if (localTypeDeserializer1 != null) paramJavaType = paramJavaType.withTypeHandler(localTypeDeserializer1); return paramJavaType; } }
public MapDeserializer(JavaType paramJavaType, Constructor<Map<Object, Object>> paramConstructor, KeyDeserializer paramKeyDeserializer, JsonDeserializer<Object> paramJsonDeserializer, TypeDeserializer paramTypeDeserializer) { super(Map.class); this._mapType = paramJavaType; this._defaultCtor = paramConstructor; this._keyDeserializer = paramKeyDeserializer; this._valueDeserializer = paramJsonDeserializer; this._valueTypeDeserializer = paramTypeDeserializer; }
public static KeyDeserializer findStringBasedKeyDeserializer(DeserializationConfig paramDeserializationConfig, JavaType paramJavaType) { BasicBeanDescription localBasicBeanDescription = (BasicBeanDescription)paramDeserializationConfig.introspect(paramJavaType); Constructor localConstructor = localBasicBeanDescription.findSingleArgConstructor(new Class[] { String.class }); if (localConstructor != null) return new StdKeyDeserializer.StringCtorKeyDeserializer(localConstructor); Method localMethod = localBasicBeanDescription.findFactoryMethod(new Class[] { String.class }); if (localMethod != null) return new StdKeyDeserializer.StringFactoryKeyDeserializer(localMethod); return null; }
protected JsonDeserializer<?> _findCustomMapDeserializer(MapType paramMapType, DeserializationConfig paramDeserializationConfig, DeserializerProvider paramDeserializerProvider, BasicBeanDescription paramBasicBeanDescription, BeanProperty paramBeanProperty, KeyDeserializer paramKeyDeserializer, TypeDeserializer paramTypeDeserializer, JsonDeserializer<?> paramJsonDeserializer) throws JsonMappingException { Iterator localIterator = this._factoryConfig.deserializers().iterator(); while (localIterator.hasNext()) { JsonDeserializer localJsonDeserializer = ((Deserializers)localIterator.next()).findMapDeserializer(paramMapType, paramDeserializationConfig, paramDeserializerProvider, paramBasicBeanDescription, paramBeanProperty, paramKeyDeserializer, paramTypeDeserializer, paramJsonDeserializer); if (localJsonDeserializer != null) return localJsonDeserializer; } return null; }
protected JsonDeserializer<?> _findCustomMapLikeDeserializer(MapLikeType paramMapLikeType, DeserializationConfig paramDeserializationConfig, DeserializerProvider paramDeserializerProvider, BasicBeanDescription paramBasicBeanDescription, BeanProperty paramBeanProperty, KeyDeserializer paramKeyDeserializer, TypeDeserializer paramTypeDeserializer, JsonDeserializer<?> paramJsonDeserializer) throws JsonMappingException { Iterator localIterator = this._factoryConfig.deserializers().iterator(); while (localIterator.hasNext()) { JsonDeserializer localJsonDeserializer = ((Deserializers)localIterator.next()).findMapLikeDeserializer(paramMapLikeType, paramDeserializationConfig, paramDeserializerProvider, paramBasicBeanDescription, paramBeanProperty, paramKeyDeserializer, paramTypeDeserializer, paramJsonDeserializer); if (localJsonDeserializer != null) return localJsonDeserializer; } return null; }
@Override public Class<? extends KeyDeserializer> findKeyDeserializer(Annotated a) { JsonDeserialize ann = a.getAnnotation(JsonDeserialize.class); if (ann != null) { Class<? extends KeyDeserializer> deserClass = ann.keyUsing(); if (deserClass != KeyDeserializer.None.class) { return deserClass; } } return null; }
public MapDeserializer(JavaType paramJavaType, ValueInstantiator paramValueInstantiator, KeyDeserializer paramKeyDeserializer, JsonDeserializer<Object> paramJsonDeserializer, TypeDeserializer paramTypeDeserializer) { super(Map.class); this._mapType = paramJavaType; this._keyDeserializer = paramKeyDeserializer; this._valueDeserializer = paramJsonDeserializer; this._valueTypeDeserializer = paramTypeDeserializer; this._valueInstantiator = paramValueInstantiator; if (paramValueInstantiator.canCreateFromObjectWith()); for (this._propertyBasedCreator = new PropertyBasedCreator(paramValueInstantiator); ; this._propertyBasedCreator = null) { this._hasDefaultCreator = paramValueInstantiator.canCreateUsingDefault(); return; } }
protected JsonDeserializer<?> _findCustomMapDeserializer(MapType paramMapType, DeserializationConfig paramDeserializationConfig, DeserializerProvider paramDeserializerProvider, BasicBeanDescription paramBasicBeanDescription, BeanProperty paramBeanProperty, KeyDeserializer paramKeyDeserializer, TypeDeserializer paramTypeDeserializer, JsonDeserializer<?> paramJsonDeserializer) { Iterator localIterator = this._factoryConfig.deserializers().iterator(); while (localIterator.hasNext()) { JsonDeserializer localJsonDeserializer = ((Deserializers)localIterator.next()).findMapDeserializer(paramMapType, paramDeserializationConfig, paramDeserializerProvider, paramBasicBeanDescription, paramBeanProperty, paramKeyDeserializer, paramTypeDeserializer, paramJsonDeserializer); if (localJsonDeserializer != null) return localJsonDeserializer; } return null; }
protected JsonDeserializer<?> _findCustomMapLikeDeserializer(MapLikeType paramMapLikeType, DeserializationConfig paramDeserializationConfig, DeserializerProvider paramDeserializerProvider, BasicBeanDescription paramBasicBeanDescription, BeanProperty paramBeanProperty, KeyDeserializer paramKeyDeserializer, TypeDeserializer paramTypeDeserializer, JsonDeserializer<?> paramJsonDeserializer) { Iterator localIterator = this._factoryConfig.deserializers().iterator(); while (localIterator.hasNext()) { JsonDeserializer localJsonDeserializer = ((Deserializers)localIterator.next()).findMapLikeDeserializer(paramMapLikeType, paramDeserializationConfig, paramDeserializerProvider, paramBasicBeanDescription, paramBeanProperty, paramKeyDeserializer, paramTypeDeserializer, paramJsonDeserializer); if (localJsonDeserializer != null) return localJsonDeserializer; } return null; }
public KeyDeserializer createKeyDeserializer(DeserializationConfig paramDeserializationConfig, JavaType paramJavaType, BeanProperty paramBeanProperty) { if (this._factoryConfig.hasKeyDeserializers()) { BasicBeanDescription localBasicBeanDescription = (BasicBeanDescription)paramDeserializationConfig.introspectClassAnnotations(paramJavaType.getRawClass()); Iterator localIterator = this._factoryConfig.keyDeserializers().iterator(); while (localIterator.hasNext()) { KeyDeserializer localKeyDeserializer = ((KeyDeserializers)localIterator.next()).findKeyDeserializer(paramJavaType, paramDeserializationConfig, localBasicBeanDescription, paramBeanProperty); if (localKeyDeserializer != null) return localKeyDeserializer; } } return null; }
protected b(MapType paramMapType, KeyDeserializer paramKeyDeserializer, TypeDeserializer paramTypeDeserializer, JsonDeserializer<?> paramJsonDeserializer) { this.a = paramMapType; this.b = paramKeyDeserializer; this.d = paramTypeDeserializer; this.c = paramJsonDeserializer; }
public KeyDeserializer findKeyDeserializer(JavaType paramJavaType, DeserializationConfig paramDeserializationConfig, BeanDescription paramBeanDescription, BeanProperty paramBeanProperty) { if (this._classMappings == null) return null; return (KeyDeserializer)this._classMappings.get(new ClassKey(paramJavaType.getRawClass())); }
public Class<KeyDeserializer> findKeyDeserializer(Annotated paramAnnotated) { return null; }