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


Java DeserializationConfig.introspectClassAnnotations方法代碼示例

本文整理匯總了Java中org.codehaus.jackson.map.DeserializationConfig.introspectClassAnnotations方法的典型用法代碼示例。如果您正苦於以下問題:Java DeserializationConfig.introspectClassAnnotations方法的具體用法?Java DeserializationConfig.introspectClassAnnotations怎麽用?Java DeserializationConfig.introspectClassAnnotations使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.codehaus.jackson.map.DeserializationConfig的用法示例。


在下文中一共展示了DeserializationConfig.introspectClassAnnotations方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: createCollectionLikeDeserializer

import org.codehaus.jackson.map.DeserializationConfig; //導入方法依賴的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: createKeyDeserializer

import org.codehaus.jackson.map.DeserializationConfig; //導入方法依賴的package包/類
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;
}
 
開發者ID:zhangjianying,項目名稱:12306-android-Decompile,代碼行數:17,代碼來源:BeanDeserializerFactory.java

示例3: createCollectionDeserializer

import org.codehaus.jackson.map.DeserializationConfig; //導入方法依賴的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

示例4: isIgnorableType

import org.codehaus.jackson.map.DeserializationConfig; //導入方法依賴的package包/類
protected boolean isIgnorableType(DeserializationConfig paramDeserializationConfig, BasicBeanDescription paramBasicBeanDescription, Class<?> paramClass, Map<Class<?>, Boolean> paramMap)
{
  Boolean localBoolean = (Boolean)paramMap.get(paramClass);
  if (localBoolean == null)
  {
    BasicBeanDescription localBasicBeanDescription = (BasicBeanDescription)paramDeserializationConfig.introspectClassAnnotations(paramClass);
    localBoolean = paramDeserializationConfig.getAnnotationIntrospector().isIgnorableType(localBasicBeanDescription.getClassInfo());
    if (localBoolean == null)
      localBoolean = Boolean.FALSE;
  }
  return localBoolean.booleanValue();
}
 
開發者ID:zhangjianying,項目名稱:12306-android-Decompile,代碼行數:13,代碼來源:BeanDeserializerFactory.java


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