當前位置: 首頁>>代碼示例>>Java>>正文


Java JavaType.getValueHandler方法代碼示例

本文整理匯總了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);
}
 
開發者ID:zhangjianying,項目名稱:12306-android-Decompile,代碼行數:17,代碼來源:BasicDeserializerFactory.java

示例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);
}
 
開發者ID:zhangjianying,項目名稱:12306-android-Decompile,代碼行數:21,代碼來源:BasicDeserializerFactory.java

示例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);
}
 
開發者ID:zhangjianying,項目名稱:12306-android-Decompile,代碼行數:18,代碼來源:TypeFactory.java

示例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);
}
 
開發者ID:zhangjianying,項目名稱:12306-android-Decompile,代碼行數:29,代碼來源:BasicDeserializerFactory.java

示例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);
}
 
開發者ID:zhangjianying,項目名稱:12306-android-Decompile,代碼行數:37,代碼來源:BasicDeserializerFactory.java

示例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;
}
 
開發者ID:zhangjianying,項目名稱:12306-android-Decompile,代碼行數:7,代碼來源:TypeBase.java


注:本文中的org.codehaus.jackson.type.JavaType.getValueHandler方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。