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


Java DeserializationConfig.getAnnotationIntrospector方法代碼示例

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


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

示例1: forDeserialization

import org.codehaus.jackson.map.DeserializationConfig; //導入方法依賴的package包/類
public BasicBeanDescription forDeserialization(DeserializationConfig paramDeserializationConfig, JavaType paramJavaType, ClassIntrospector.MixInResolver paramMixInResolver)
{
  boolean bool = paramDeserializationConfig.isAnnotationProcessingEnabled();
  AnnotationIntrospector localAnnotationIntrospector = paramDeserializationConfig.getAnnotationIntrospector();
  Class localClass = paramJavaType.getRawClass();
  if (bool);
  while (true)
  {
    AnnotatedClass localAnnotatedClass = AnnotatedClass.construct(localClass, localAnnotationIntrospector, paramMixInResolver);
    localAnnotatedClass.resolveMemberMethods(getDeserializationMethodFilter(paramDeserializationConfig), true);
    localAnnotatedClass.resolveCreators(true);
    localAnnotatedClass.resolveFields(true);
    return new BasicBeanDescription(paramDeserializationConfig, paramJavaType, localAnnotatedClass);
    localAnnotationIntrospector = null;
  }
}
 
開發者ID:zhangjianying,項目名稱:12306-android-Decompile,代碼行數:17,代碼來源:BasicClassIntrospector.java

示例2: findTypeDeserializer

import org.codehaus.jackson.map.DeserializationConfig; //導入方法依賴的package包/類
public TypeDeserializer findTypeDeserializer(DeserializationConfig paramDeserializationConfig, JavaType paramJavaType, BeanProperty paramBeanProperty)
{
  AnnotatedClass localAnnotatedClass = ((BasicBeanDescription)paramDeserializationConfig.introspectClassAnnotations(paramJavaType.getRawClass())).getClassInfo();
  AnnotationIntrospector localAnnotationIntrospector = paramDeserializationConfig.getAnnotationIntrospector();
  TypeResolverBuilder localTypeResolverBuilder = localAnnotationIntrospector.findTypeResolver(paramDeserializationConfig, localAnnotatedClass, paramJavaType);
  Collection localCollection;
  if (localTypeResolverBuilder == null)
  {
    localTypeResolverBuilder = paramDeserializationConfig.getDefaultTyper(paramJavaType);
    localCollection = null;
    if (localTypeResolverBuilder == null)
      return null;
  }
  else
  {
    localCollection = paramDeserializationConfig.getSubtypeResolver().collectAndResolveSubtypes(localAnnotatedClass, paramDeserializationConfig, localAnnotationIntrospector);
  }
  return localTypeResolverBuilder.buildTypeDeserializer(paramDeserializationConfig, paramJavaType, localCollection, paramBeanProperty);
}
 
開發者ID:zhangjianying,項目名稱:12306-android-Decompile,代碼行數:20,代碼來源:BasicDeserializerFactory.java

示例3: findDeserializerCreators

import org.codehaus.jackson.map.DeserializationConfig; //導入方法依賴的package包/類
protected CreatorContainer findDeserializerCreators(DeserializationConfig paramDeserializationConfig, BasicBeanDescription paramBasicBeanDescription)
  throws JsonMappingException
{
  boolean bool = paramDeserializationConfig.isEnabled(DeserializationConfig.Feature.CAN_OVERRIDE_ACCESS_MODIFIERS);
  CreatorContainer localCreatorContainer = new CreatorContainer(paramBasicBeanDescription, bool);
  AnnotationIntrospector localAnnotationIntrospector = paramDeserializationConfig.getAnnotationIntrospector();
  if (paramBasicBeanDescription.getType().isConcrete())
  {
    Constructor localConstructor = paramBasicBeanDescription.findDefaultConstructor();
    if (localConstructor != null)
    {
      if (bool)
        ClassUtil.checkAndFixAccess(localConstructor);
      localCreatorContainer.setDefaultConstructor(localConstructor);
    }
  }
  VisibilityChecker localVisibilityChecker1 = paramDeserializationConfig.getDefaultVisibilityChecker();
  if (!paramDeserializationConfig.isEnabled(DeserializationConfig.Feature.AUTO_DETECT_CREATORS))
    localVisibilityChecker1 = localVisibilityChecker1.withCreatorVisibility(JsonAutoDetect.Visibility.NONE);
  VisibilityChecker localVisibilityChecker2 = paramDeserializationConfig.getAnnotationIntrospector().findAutoDetectVisibility(paramBasicBeanDescription.getClassInfo(), localVisibilityChecker1);
  _addDeserializerConstructors(paramDeserializationConfig, paramBasicBeanDescription, localVisibilityChecker2, localAnnotationIntrospector, localCreatorContainer);
  _addDeserializerFactoryMethods(paramDeserializationConfig, paramBasicBeanDescription, localVisibilityChecker2, localAnnotationIntrospector, localCreatorContainer);
  return localCreatorContainer;
}
 
開發者ID:zhangjianying,項目名稱:12306-android-Decompile,代碼行數:25,代碼來源:BeanDeserializerFactory.java

示例4: forCreation

import org.codehaus.jackson.map.DeserializationConfig; //導入方法依賴的package包/類
public BasicBeanDescription forCreation(DeserializationConfig paramDeserializationConfig, JavaType paramJavaType, ClassIntrospector.MixInResolver paramMixInResolver)
{
  boolean bool = paramDeserializationConfig.isAnnotationProcessingEnabled();
  AnnotationIntrospector localAnnotationIntrospector = paramDeserializationConfig.getAnnotationIntrospector();
  Class localClass = paramJavaType.getRawClass();
  if (bool);
  while (true)
  {
    AnnotatedClass localAnnotatedClass = AnnotatedClass.construct(localClass, localAnnotationIntrospector, paramMixInResolver);
    localAnnotatedClass.resolveCreators(true);
    return new BasicBeanDescription(paramDeserializationConfig, paramJavaType, localAnnotatedClass);
    localAnnotationIntrospector = null;
  }
}
 
開發者ID:zhangjianying,項目名稱:12306-android-Decompile,代碼行數:15,代碼來源:BasicClassIntrospector.java

示例5: findPropertyContentTypeDeserializer

import org.codehaus.jackson.map.DeserializationConfig; //導入方法依賴的package包/類
public TypeDeserializer findPropertyContentTypeDeserializer(DeserializationConfig paramDeserializationConfig, JavaType paramJavaType, AnnotatedMember paramAnnotatedMember, BeanProperty paramBeanProperty)
{
  AnnotationIntrospector localAnnotationIntrospector = paramDeserializationConfig.getAnnotationIntrospector();
  TypeResolverBuilder localTypeResolverBuilder = localAnnotationIntrospector.findPropertyContentTypeResolver(paramDeserializationConfig, paramAnnotatedMember, paramJavaType);
  JavaType localJavaType = paramJavaType.getContentType();
  if (localTypeResolverBuilder == null)
    return findTypeDeserializer(paramDeserializationConfig, localJavaType, paramBeanProperty);
  return localTypeResolverBuilder.buildTypeDeserializer(paramDeserializationConfig, localJavaType, paramDeserializationConfig.getSubtypeResolver().collectAndResolveSubtypes(paramAnnotatedMember, paramDeserializationConfig, localAnnotationIntrospector), paramBeanProperty);
}
 
開發者ID:zhangjianying,項目名稱:12306-android-Decompile,代碼行數:10,代碼來源:BasicDeserializerFactory.java

示例6: findPropertyTypeDeserializer

import org.codehaus.jackson.map.DeserializationConfig; //導入方法依賴的package包/類
public TypeDeserializer findPropertyTypeDeserializer(DeserializationConfig paramDeserializationConfig, JavaType paramJavaType, AnnotatedMember paramAnnotatedMember, BeanProperty paramBeanProperty)
{
  AnnotationIntrospector localAnnotationIntrospector = paramDeserializationConfig.getAnnotationIntrospector();
  TypeResolverBuilder localTypeResolverBuilder = localAnnotationIntrospector.findPropertyTypeResolver(paramDeserializationConfig, paramAnnotatedMember, paramJavaType);
  if (localTypeResolverBuilder == null)
    return findTypeDeserializer(paramDeserializationConfig, paramJavaType, paramBeanProperty);
  return localTypeResolverBuilder.buildTypeDeserializer(paramDeserializationConfig, paramJavaType, paramDeserializationConfig.getSubtypeResolver().collectAndResolveSubtypes(paramAnnotatedMember, paramDeserializationConfig, localAnnotationIntrospector), paramBeanProperty);
}
 
開發者ID:zhangjianying,項目名稱:12306-android-Decompile,代碼行數:9,代碼來源:BasicDeserializerFactory.java

示例7: resolveType

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

示例8: findMapCreators

import org.codehaus.jackson.map.DeserializationConfig; //導入方法依賴的package包/類
protected CreatorContainer findMapCreators(DeserializationConfig paramDeserializationConfig, BasicBeanDescription paramBasicBeanDescription)
  throws JsonMappingException
{
  AnnotationIntrospector localAnnotationIntrospector = paramDeserializationConfig.getAnnotationIntrospector();
  CreatorContainer localCreatorContainer = new CreatorContainer(paramBasicBeanDescription, paramDeserializationConfig.isEnabled(DeserializationConfig.Feature.CAN_OVERRIDE_ACCESS_MODIFIERS));
  Iterator localIterator1 = paramBasicBeanDescription.getConstructors().iterator();
  while (localIterator1.hasNext())
  {
    AnnotatedConstructor localAnnotatedConstructor = (AnnotatedConstructor)localIterator1.next();
    int m = localAnnotatedConstructor.getParameterCount();
    if ((m < 1) || (!localAnnotationIntrospector.hasCreatorAnnotation(localAnnotatedConstructor)))
      continue;
    SettableBeanProperty[] arrayOfSettableBeanProperty2 = new SettableBeanProperty[m];
    int n = 0;
    for (int i1 = 0; i1 < m; i1++)
    {
      AnnotatedParameter localAnnotatedParameter2 = localAnnotatedConstructor.getParameter(i1);
      if (localAnnotatedParameter2 == null);
      for (String str2 = null; (str2 == null) || (str2.length() == 0); str2 = localAnnotationIntrospector.findPropertyNameForParam(localAnnotatedParameter2))
        throw new IllegalArgumentException("Parameter #" + i1 + " of constructor " + localAnnotatedConstructor + " has no property name annotation: must have for @JsonCreator for a Map type");
      n++;
      arrayOfSettableBeanProperty2[i1] = constructCreatorProperty(paramDeserializationConfig, paramBasicBeanDescription, str2, i1, localAnnotatedParameter2);
    }
    localCreatorContainer.addPropertyConstructor(localAnnotatedConstructor, arrayOfSettableBeanProperty2);
  }
  Iterator localIterator2 = paramBasicBeanDescription.getFactoryMethods().iterator();
  while (localIterator2.hasNext())
  {
    AnnotatedMethod localAnnotatedMethod = (AnnotatedMethod)localIterator2.next();
    int i = localAnnotatedMethod.getParameterCount();
    if ((i < 1) || (!localAnnotationIntrospector.hasCreatorAnnotation(localAnnotatedMethod)))
      continue;
    SettableBeanProperty[] arrayOfSettableBeanProperty1 = new SettableBeanProperty[i];
    int j = 0;
    for (int k = 0; k < i; k++)
    {
      AnnotatedParameter localAnnotatedParameter1 = localAnnotatedMethod.getParameter(k);
      if (localAnnotatedParameter1 == null);
      for (String str1 = null; (str1 == null) || (str1.length() == 0); str1 = localAnnotationIntrospector.findPropertyNameForParam(localAnnotatedParameter1))
        throw new IllegalArgumentException("Parameter #" + k + " of factory method " + localAnnotatedMethod + " has no property name annotation: must have for @JsonCreator for a Map type");
      j++;
      arrayOfSettableBeanProperty1[k] = constructCreatorProperty(paramDeserializationConfig, paramBasicBeanDescription, str1, k, localAnnotatedParameter1);
    }
    localCreatorContainer.addPropertyFactory(localAnnotatedMethod, arrayOfSettableBeanProperty1);
  }
  return localCreatorContainer;
}
 
開發者ID:zhangjianying,項目名稱:12306-android-Decompile,代碼行數:48,代碼來源:BasicDeserializerFactory.java

示例9: _createAndCache2

import org.codehaus.jackson.map.DeserializationConfig; //導入方法依賴的package包/類
protected JsonDeserializer<Object> _createAndCache2(DeserializationConfig paramDeserializationConfig, JavaType paramJavaType, BeanProperty paramBeanProperty)
  throws JsonMappingException
{
  JsonDeserializer localJsonDeserializer2;
  try
  {
    JsonDeserializer localJsonDeserializer1 = _createDeserializer(paramDeserializationConfig, paramJavaType, paramBeanProperty);
    localJsonDeserializer2 = localJsonDeserializer1;
    if (localJsonDeserializer2 == null)
    {
      localJsonDeserializer2 = null;
      return localJsonDeserializer2;
    }
  }
  catch (IllegalArgumentException localIllegalArgumentException)
  {
    throw new JsonMappingException(localIllegalArgumentException.getMessage(), null, localIllegalArgumentException);
  }
  boolean bool1 = localJsonDeserializer2 instanceof ResolvableDeserializer;
  if (localJsonDeserializer2.getClass() == BeanDeserializer.class);
  for (boolean bool2 = true; ; bool2 = false)
  {
    if ((!bool2) && (paramDeserializationConfig.isEnabled(DeserializationConfig.Feature.USE_ANNOTATIONS)))
    {
      AnnotationIntrospector localAnnotationIntrospector = paramDeserializationConfig.getAnnotationIntrospector();
      Boolean localBoolean = localAnnotationIntrospector.findCachability(AnnotatedClass.construct(localJsonDeserializer2.getClass(), localAnnotationIntrospector, null));
      if (localBoolean != null)
        bool2 = localBoolean.booleanValue();
    }
    if (bool1)
    {
      this._incompleteDeserializers.put(paramJavaType, localJsonDeserializer2);
      _resolveDeserializer(paramDeserializationConfig, (ResolvableDeserializer)localJsonDeserializer2);
      this._incompleteDeserializers.remove(paramJavaType);
    }
    if (!bool2)
      break;
    this._cachedDeserializers.put(paramJavaType, localJsonDeserializer2);
    return localJsonDeserializer2;
  }
}
 
開發者ID:zhangjianying,項目名稱:12306-android-Decompile,代碼行數:42,代碼來源:StdDeserializerProvider.java


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