本文整理汇总了Java中org.codehaus.jackson.type.JavaType.getValueHandler方法的典型用法代码示例。如果您正苦于以下问题:Java JavaType.getValueHandler方法的具体用法?Java JavaType.getValueHandler怎么用?Java JavaType.getValueHandler使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.codehaus.jackson.type.JavaType
的用法示例。
在下文中一共展示了JavaType.getValueHandler方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createCollectionLikeDeserializer
import org.codehaus.jackson.type.JavaType; //导入方法依赖的package包/类
public JsonDeserializer<?> createCollectionLikeDeserializer(DeserializationConfig paramDeserializationConfig, DeserializerProvider paramDeserializerProvider, CollectionLikeType paramCollectionLikeType, BeanProperty paramBeanProperty)
throws JsonMappingException
{
CollectionLikeType localCollectionLikeType1 = (CollectionLikeType)mapAbstractType(paramDeserializationConfig, paramCollectionLikeType);
BasicBeanDescription localBasicBeanDescription = (BasicBeanDescription)paramDeserializationConfig.introspectClassAnnotations(localCollectionLikeType1.getRawClass());
JsonDeserializer localJsonDeserializer1 = findDeserializerFromAnnotation(paramDeserializationConfig, localBasicBeanDescription.getClassInfo(), paramBeanProperty);
if (localJsonDeserializer1 != null)
return localJsonDeserializer1;
CollectionLikeType localCollectionLikeType2 = (CollectionLikeType)modifyTypeByAnnotation(paramDeserializationConfig, localBasicBeanDescription.getClassInfo(), localCollectionLikeType1, null);
JavaType localJavaType = localCollectionLikeType2.getContentType();
JsonDeserializer localJsonDeserializer2 = (JsonDeserializer)localJavaType.getValueHandler();
TypeDeserializer localTypeDeserializer = (TypeDeserializer)localJavaType.getTypeHandler();
if (localTypeDeserializer == null)
localTypeDeserializer = findTypeDeserializer(paramDeserializationConfig, localJavaType, paramBeanProperty);
return _findCustomCollectionLikeDeserializer(localCollectionLikeType2, paramDeserializationConfig, paramDeserializerProvider, localBasicBeanDescription, paramBeanProperty, localTypeDeserializer, localJsonDeserializer2);
}
示例2: createMapLikeDeserializer
import org.codehaus.jackson.type.JavaType; //导入方法依赖的package包/类
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);
}
示例3: constructSpecializedType
import org.codehaus.jackson.type.JavaType; //导入方法依赖的package包/类
public JavaType constructSpecializedType(JavaType paramJavaType, Class<?> paramClass)
{
if (((paramJavaType instanceof SimpleType)) && ((paramClass.isArray()) || (Map.class.isAssignableFrom(paramClass)) || (Collection.class.isAssignableFrom(paramClass))))
{
if (!paramJavaType.getRawClass().isAssignableFrom(paramClass))
throw new IllegalArgumentException("Class " + paramClass.getClass().getName() + " not subtype of " + paramJavaType);
JavaType localJavaType = instance._fromClass(paramClass, new TypeBindings(this, paramJavaType.getRawClass()));
Object localObject1 = paramJavaType.getValueHandler();
if (localObject1 != null)
localJavaType.setValueHandler(localObject1);
Object localObject2 = paramJavaType.getTypeHandler();
if (localObject2 != null)
localJavaType = localJavaType.withTypeHandler(localObject2);
return localJavaType;
}
return paramJavaType.narrowBy(paramClass);
}
示例4: createArrayDeserializer
import org.codehaus.jackson.type.JavaType; //导入方法依赖的package包/类
public JsonDeserializer<?> createArrayDeserializer(DeserializationConfig paramDeserializationConfig, DeserializerProvider paramDeserializerProvider, ArrayType paramArrayType, BeanProperty paramBeanProperty)
throws JsonMappingException
{
JavaType localJavaType = paramArrayType.getContentType();
JsonDeserializer localJsonDeserializer1 = (JsonDeserializer)localJavaType.getValueHandler();
if (localJsonDeserializer1 == null)
{
Object localObject = (JsonDeserializer)_arrayDeserializers.get(localJavaType);
if (localObject != null)
{
JsonDeserializer localJsonDeserializer3 = _findCustomArrayDeserializer(paramArrayType, paramDeserializationConfig, paramDeserializerProvider, paramBeanProperty, null, null);
if (localJsonDeserializer3 != null)
localObject = localJsonDeserializer3;
return localObject;
}
if (localJavaType.isPrimitive())
throw new IllegalArgumentException("Internal error: primitive type (" + paramArrayType + ") passed, no array deserializer found");
}
TypeDeserializer localTypeDeserializer = (TypeDeserializer)localJavaType.getTypeHandler();
if (localTypeDeserializer == null)
localTypeDeserializer = findTypeDeserializer(paramDeserializationConfig, localJavaType, paramBeanProperty);
JsonDeserializer localJsonDeserializer2 = _findCustomArrayDeserializer(paramArrayType, paramDeserializationConfig, paramDeserializerProvider, paramBeanProperty, localTypeDeserializer, localJsonDeserializer1);
if (localJsonDeserializer2 != null)
return localJsonDeserializer2;
if (localJsonDeserializer1 == null)
localJsonDeserializer1 = paramDeserializerProvider.findValueDeserializer(paramDeserializationConfig, localJavaType, paramBeanProperty);
return (JsonDeserializer<?>)new ArrayDeserializer(paramArrayType, localJsonDeserializer1, localTypeDeserializer);
}
示例5: createCollectionDeserializer
import org.codehaus.jackson.type.JavaType; //导入方法依赖的package包/类
public JsonDeserializer<?> createCollectionDeserializer(DeserializationConfig paramDeserializationConfig, DeserializerProvider paramDeserializerProvider, CollectionType paramCollectionType, BeanProperty paramBeanProperty)
throws JsonMappingException
{
CollectionType localCollectionType1 = (CollectionType)mapAbstractType(paramDeserializationConfig, paramCollectionType);
Object localObject = localCollectionType1.getRawClass();
BasicBeanDescription localBasicBeanDescription = (BasicBeanDescription)paramDeserializationConfig.introspectClassAnnotations((Class)localObject);
JsonDeserializer localJsonDeserializer1 = findDeserializerFromAnnotation(paramDeserializationConfig, localBasicBeanDescription.getClassInfo(), paramBeanProperty);
if (localJsonDeserializer1 != null)
return localJsonDeserializer1;
CollectionType localCollectionType2 = (CollectionType)modifyTypeByAnnotation(paramDeserializationConfig, localBasicBeanDescription.getClassInfo(), localCollectionType1, null);
JavaType localJavaType = localCollectionType2.getContentType();
JsonDeserializer localJsonDeserializer2 = (JsonDeserializer)localJavaType.getValueHandler();
TypeDeserializer localTypeDeserializer = (TypeDeserializer)localJavaType.getTypeHandler();
if (localTypeDeserializer == null)
localTypeDeserializer = findTypeDeserializer(paramDeserializationConfig, localJavaType, paramBeanProperty);
JsonDeserializer localJsonDeserializer3 = _findCustomCollectionDeserializer(localCollectionType2, paramDeserializationConfig, paramDeserializerProvider, localBasicBeanDescription, paramBeanProperty, localTypeDeserializer, localJsonDeserializer2);
if (localJsonDeserializer3 != null)
return localJsonDeserializer3;
if (localJsonDeserializer2 == null)
{
if (EnumSet.class.isAssignableFrom((Class)localObject))
return new EnumSetDeserializer(constructEnumResolver(localJavaType.getRawClass(), paramDeserializationConfig));
localJsonDeserializer2 = paramDeserializerProvider.findValueDeserializer(paramDeserializationConfig, localJavaType, paramBeanProperty);
}
if ((localCollectionType2.isInterface()) || (localCollectionType2.isAbstract()))
{
Class localClass = (Class)_collectionFallbacks.get(((Class)localObject).getName());
if (localClass == null)
throw new IllegalArgumentException("Can not find a deserializer for non-concrete Collection type " + localCollectionType2);
localObject = localClass;
}
Constructor localConstructor = ClassUtil.findConstructor((Class)localObject, paramDeserializationConfig.isEnabled(DeserializationConfig.Feature.CAN_OVERRIDE_ACCESS_MODIFIERS));
if (localJavaType.getRawClass() == String.class)
return new StringCollectionDeserializer(localCollectionType2, localJsonDeserializer2, localConstructor);
return (JsonDeserializer<?>)new CollectionDeserializer(localCollectionType2, localJsonDeserializer2, localTypeDeserializer, localConstructor);
}
示例6: copyHandlers
import org.codehaus.jackson.type.JavaType; //导入方法依赖的package包/类
protected final JavaType copyHandlers(JavaType paramJavaType)
{
this._valueHandler = paramJavaType.getValueHandler();
this._typeHandler = paramJavaType.getTypeHandler();
return this;
}