当前位置: 首页>>代码示例>>Java>>正文


Java AnnotationIntrospector.ReferenceProperty方法代码示例

本文整理汇总了Java中org.codehaus.jackson.map.AnnotationIntrospector.ReferenceProperty方法的典型用法代码示例。如果您正苦于以下问题:Java AnnotationIntrospector.ReferenceProperty方法的具体用法?Java AnnotationIntrospector.ReferenceProperty怎么用?Java AnnotationIntrospector.ReferenceProperty使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.codehaus.jackson.map.AnnotationIntrospector的用法示例。


在下文中一共展示了AnnotationIntrospector.ReferenceProperty方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: constructSettableProperty

import org.codehaus.jackson.map.AnnotationIntrospector; //导入方法依赖的package包/类
protected SettableBeanProperty constructSettableProperty(DeserializationConfig paramDeserializationConfig, BasicBeanDescription paramBasicBeanDescription, String paramString, AnnotatedField paramAnnotatedField)
  throws JsonMappingException
{
  if (paramDeserializationConfig.isEnabled(DeserializationConfig.Feature.CAN_OVERRIDE_ACCESS_MODIFIERS))
    paramAnnotatedField.fixAccess();
  JavaType localJavaType1 = paramBasicBeanDescription.bindingsForBeanType().resolveType(paramAnnotatedField.getGenericType());
  BeanProperty.Std localStd = new BeanProperty.Std(paramString, localJavaType1, paramBasicBeanDescription.getClassAnnotations(), paramAnnotatedField);
  JavaType localJavaType2 = resolveType(paramDeserializationConfig, paramBasicBeanDescription, localJavaType1, paramAnnotatedField, localStd);
  if (localJavaType2 != localJavaType1)
    localStd = localStd.withType(localJavaType2);
  JsonDeserializer localJsonDeserializer = findDeserializerFromAnnotation(paramDeserializationConfig, paramAnnotatedField, localStd);
  JavaType localJavaType3 = modifyTypeByAnnotation(paramDeserializationConfig, paramAnnotatedField, localJavaType2, paramString);
  SettableBeanProperty.FieldProperty localFieldProperty = new SettableBeanProperty.FieldProperty(paramString, localJavaType3, (TypeDeserializer)localJavaType3.getTypeHandler(), paramBasicBeanDescription.getClassAnnotations(), paramAnnotatedField);
  if (localJsonDeserializer != null)
    localFieldProperty.setValueDeserializer(localJsonDeserializer);
  AnnotationIntrospector.ReferenceProperty localReferenceProperty = paramDeserializationConfig.getAnnotationIntrospector().findReferenceType(paramAnnotatedField);
  if ((localReferenceProperty != null) && (localReferenceProperty.isManagedReference()))
    localFieldProperty.setManagedReferenceName(localReferenceProperty.getName());
  return localFieldProperty;
}
 
开发者ID:zhangjianying,项目名称:12306-android-Decompile,代码行数:21,代码来源:BeanDeserializerFactory.java

示例2: constructSettableProperty

import org.codehaus.jackson.map.AnnotationIntrospector; //导入方法依赖的package包/类
protected SettableBeanProperty constructSettableProperty(DeserializationConfig paramDeserializationConfig, BasicBeanDescription paramBasicBeanDescription, String paramString, AnnotatedField paramAnnotatedField)
{
  if (paramDeserializationConfig.isEnabled(DeserializationConfig.Feature.CAN_OVERRIDE_ACCESS_MODIFIERS))
    paramAnnotatedField.fixAccess();
  JavaType localJavaType1 = paramBasicBeanDescription.bindingsForBeanType().resolveType(paramAnnotatedField.getGenericType());
  BeanProperty.Std localStd = new BeanProperty.Std(paramString, localJavaType1, paramBasicBeanDescription.getClassAnnotations(), paramAnnotatedField);
  JavaType localJavaType2 = resolveType(paramDeserializationConfig, paramBasicBeanDescription, localJavaType1, paramAnnotatedField, localStd);
  if (localJavaType2 != localJavaType1)
    localStd = localStd.withType(localJavaType2);
  JsonDeserializer localJsonDeserializer = findDeserializerFromAnnotation(paramDeserializationConfig, paramAnnotatedField, localStd);
  JavaType localJavaType3 = modifyTypeByAnnotation(paramDeserializationConfig, paramAnnotatedField, localJavaType2, paramString);
  Object localObject = new SettableBeanProperty.FieldProperty(paramString, localJavaType3, (TypeDeserializer)localJavaType3.getTypeHandler(), paramBasicBeanDescription.getClassAnnotations(), paramAnnotatedField);
  if (localJsonDeserializer != null)
    localObject = ((SettableBeanProperty)localObject).withValueDeserializer(localJsonDeserializer);
  AnnotationIntrospector.ReferenceProperty localReferenceProperty = paramDeserializationConfig.getAnnotationIntrospector().findReferenceType(paramAnnotatedField);
  if ((localReferenceProperty != null) && (localReferenceProperty.isManagedReference()))
    ((SettableBeanProperty)localObject).setManagedReferenceName(localReferenceProperty.getName());
  return localObject;
}
 
开发者ID:isnuryusuf,项目名称:ingress-indonesia-dev,代码行数:20,代码来源:BeanDeserializerFactory.java

示例3: findBackReferenceProperties

import org.codehaus.jackson.map.AnnotationIntrospector; //导入方法依赖的package包/类
public Map<String, AnnotatedMember> findBackReferenceProperties()
{
  HashMap localHashMap = null;
  Iterator localIterator1 = this._classInfo.memberMethods().iterator();
  while (localIterator1.hasNext())
  {
    AnnotatedMethod localAnnotatedMethod = (AnnotatedMethod)localIterator1.next();
    if (localAnnotatedMethod.getParameterCount() != 1)
      continue;
    AnnotationIntrospector.ReferenceProperty localReferenceProperty2 = this._annotationIntrospector.findReferenceType(localAnnotatedMethod);
    if ((localReferenceProperty2 == null) || (!localReferenceProperty2.isBackReference()))
      continue;
    if (localHashMap == null)
      localHashMap = new HashMap();
    if (localHashMap.put(localReferenceProperty2.getName(), localAnnotatedMethod) == null)
      continue;
    throw new IllegalArgumentException("Multiple back-reference properties with name '" + localReferenceProperty2.getName() + "'");
  }
  Iterator localIterator2 = this._classInfo.fields().iterator();
  while (localIterator2.hasNext())
  {
    AnnotatedField localAnnotatedField = (AnnotatedField)localIterator2.next();
    AnnotationIntrospector.ReferenceProperty localReferenceProperty1 = this._annotationIntrospector.findReferenceType(localAnnotatedField);
    if ((localReferenceProperty1 == null) || (!localReferenceProperty1.isBackReference()))
      continue;
    if (localHashMap == null)
      localHashMap = new HashMap();
    if (localHashMap.put(localReferenceProperty1.getName(), localAnnotatedField) == null)
      continue;
    throw new IllegalArgumentException("Multiple back-reference properties with name '" + localReferenceProperty1.getName() + "'");
  }
  return localHashMap;
}
 
开发者ID:zhangjianying,项目名称:12306-android-Decompile,代码行数:34,代码来源:BasicBeanDescription.java

示例4: findReferenceType

import org.codehaus.jackson.map.AnnotationIntrospector; //导入方法依赖的package包/类
public AnnotationIntrospector.ReferenceProperty findReferenceType(AnnotatedMember paramAnnotatedMember)
{
  JsonManagedReference localJsonManagedReference = (JsonManagedReference)paramAnnotatedMember.getAnnotation(JsonManagedReference.class);
  if (localJsonManagedReference != null)
    return AnnotationIntrospector.ReferenceProperty.managed(localJsonManagedReference.value());
  JsonBackReference localJsonBackReference = (JsonBackReference)paramAnnotatedMember.getAnnotation(JsonBackReference.class);
  if (localJsonBackReference != null)
    return AnnotationIntrospector.ReferenceProperty.back(localJsonBackReference.value());
  return null;
}
 
开发者ID:zhangjianying,项目名称:12306-android-Decompile,代码行数:11,代码来源:JacksonAnnotationIntrospector.java

示例5: findBeanProperties

import org.codehaus.jackson.map.AnnotationIntrospector; //导入方法依赖的package包/类
protected List<BeanPropertyWriter> findBeanProperties(SerializationConfig paramSerializationConfig, BasicBeanDescription paramBasicBeanDescription)
{
  List localList = paramBasicBeanDescription.findProperties();
  AnnotationIntrospector localAnnotationIntrospector = paramSerializationConfig.getAnnotationIntrospector();
  removeIgnorableTypes(paramSerializationConfig, paramBasicBeanDescription, localList);
  if (paramSerializationConfig.isEnabled(SerializationConfig.Feature.REQUIRE_SETTERS_FOR_GETTERS))
    removeSetterlessGetters(paramSerializationConfig, paramBasicBeanDescription, localList);
  if (localList.isEmpty())
    return null;
  boolean bool = usesStaticTyping(paramSerializationConfig, paramBasicBeanDescription, null, null);
  PropertyBuilder localPropertyBuilder = constructPropertyBuilder(paramSerializationConfig, paramBasicBeanDescription);
  ArrayList localArrayList = new ArrayList(localList.size());
  TypeBindings localTypeBindings = paramBasicBeanDescription.bindingsForBeanType();
  Iterator localIterator = localList.iterator();
  while (localIterator.hasNext())
  {
    BeanPropertyDefinition localBeanPropertyDefinition = (BeanPropertyDefinition)localIterator.next();
    AnnotatedMember localAnnotatedMember = localBeanPropertyDefinition.getAccessor();
    AnnotationIntrospector.ReferenceProperty localReferenceProperty = localAnnotationIntrospector.findReferenceType(localAnnotatedMember);
    if ((localReferenceProperty == null) || (!localReferenceProperty.isBackReference()))
    {
      String str = localBeanPropertyDefinition.getName();
      if ((localAnnotatedMember instanceof AnnotatedMethod))
        localArrayList.add(_constructWriter(paramSerializationConfig, localTypeBindings, localPropertyBuilder, bool, str, (AnnotatedMethod)localAnnotatedMember));
      else
        localArrayList.add(_constructWriter(paramSerializationConfig, localTypeBindings, localPropertyBuilder, bool, str, (AnnotatedField)localAnnotatedMember));
    }
  }
  return localArrayList;
}
 
开发者ID:isnuryusuf,项目名称:ingress-indonesia-dev,代码行数:31,代码来源:BeanSerializerFactory.java

示例6: findBackReferenceProperties

import org.codehaus.jackson.map.AnnotationIntrospector; //导入方法依赖的package包/类
public Map<String, AnnotatedMember> findBackReferenceProperties()
{
  Object localObject1 = null;
  Iterator localIterator = this._properties.iterator();
  while (true)
  {
    AnnotatedMember localAnnotatedMember;
    AnnotationIntrospector.ReferenceProperty localReferenceProperty;
    if (localIterator.hasNext())
    {
      localAnnotatedMember = ((BeanPropertyDefinition)localIterator.next()).getMutator();
      if (localAnnotatedMember != null)
      {
        localReferenceProperty = this._annotationIntrospector.findReferenceType(localAnnotatedMember);
        if ((localReferenceProperty != null) && (localReferenceProperty.isBackReference()))
          if (localObject1 != null);
      }
    }
    else
    {
      for (Object localObject2 = new HashMap(); ; localObject2 = localObject1)
      {
        String str = localReferenceProperty.getName();
        if (((HashMap)localObject2).put(str, localAnnotatedMember) == null)
          break;
        throw new IllegalArgumentException("Multiple back-reference properties with name '" + str + "'");
        return localObject1;
      }
      localObject1 = localObject2;
    }
  }
}
 
开发者ID:isnuryusuf,项目名称:ingress-indonesia-dev,代码行数:33,代码来源:BasicBeanDescription.java

示例7: findBeanProperties

import org.codehaus.jackson.map.AnnotationIntrospector; //导入方法依赖的package包/类
protected List<BeanPropertyWriter> findBeanProperties(SerializationConfig paramSerializationConfig, BasicBeanDescription paramBasicBeanDescription)
  throws JsonMappingException
{
  VisibilityChecker localVisibilityChecker1 = paramSerializationConfig.getDefaultVisibilityChecker();
  if (!paramSerializationConfig.isEnabled(SerializationConfig.Feature.AUTO_DETECT_GETTERS))
  {
    JsonAutoDetect.Visibility localVisibility3 = JsonAutoDetect.Visibility.NONE;
    localVisibilityChecker1 = localVisibilityChecker1.withGetterVisibility(localVisibility3);
  }
  if (!paramSerializationConfig.isEnabled(SerializationConfig.Feature.AUTO_DETECT_IS_GETTERS))
  {
    JsonAutoDetect.Visibility localVisibility2 = JsonAutoDetect.Visibility.NONE;
    localVisibilityChecker1 = localVisibilityChecker1.withIsGetterVisibility(localVisibility2);
  }
  if (!paramSerializationConfig.isEnabled(SerializationConfig.Feature.AUTO_DETECT_FIELDS))
  {
    JsonAutoDetect.Visibility localVisibility1 = JsonAutoDetect.Visibility.NONE;
    localVisibilityChecker1 = localVisibilityChecker1.withFieldVisibility(localVisibility1);
  }
  AnnotationIntrospector localAnnotationIntrospector = paramSerializationConfig.getAnnotationIntrospector();
  VisibilityChecker localVisibilityChecker2 = localAnnotationIntrospector.findAutoDetectVisibility(paramBasicBeanDescription.getClassInfo(), localVisibilityChecker1);
  LinkedHashMap localLinkedHashMap1 = paramBasicBeanDescription.findGetters(localVisibilityChecker2, null);
  LinkedHashMap localLinkedHashMap2 = paramBasicBeanDescription.findSerializableFields(localVisibilityChecker2, localLinkedHashMap1.keySet());
  removeIgnorableTypes(paramSerializationConfig, paramBasicBeanDescription, localLinkedHashMap1);
  removeIgnorableTypes(paramSerializationConfig, paramBasicBeanDescription, localLinkedHashMap2);
  ArrayList localArrayList;
  if ((localLinkedHashMap1.isEmpty()) && (localLinkedHashMap2.isEmpty()))
    localArrayList = null;
  while (true)
  {
    return localArrayList;
    boolean bool = usesStaticTyping(paramSerializationConfig, paramBasicBeanDescription, null, null);
    PropertyBuilder localPropertyBuilder = constructPropertyBuilder(paramSerializationConfig, paramBasicBeanDescription);
    int i = localLinkedHashMap1.size();
    localArrayList = new ArrayList(i);
    TypeBindings localTypeBindings = paramBasicBeanDescription.bindingsForBeanType();
    Iterator localIterator1 = localLinkedHashMap2.entrySet().iterator();
    while (localIterator1.hasNext())
    {
      Map.Entry localEntry2 = (Map.Entry)localIterator1.next();
      AnnotationIntrospector.ReferenceProperty localReferenceProperty2 = localAnnotationIntrospector.findReferenceType((AnnotatedMember)localEntry2.getValue());
      if ((localReferenceProperty2 != null) && (localReferenceProperty2.isBackReference()))
        continue;
      BeanPropertyWriter localBeanPropertyWriter2 = _constructWriter(paramSerializationConfig, localTypeBindings, localPropertyBuilder, bool, (String)localEntry2.getKey(), (AnnotatedMember)localEntry2.getValue());
      localArrayList.add(localBeanPropertyWriter2);
    }
    Iterator localIterator2 = localLinkedHashMap1.entrySet().iterator();
    while (localIterator2.hasNext())
    {
      Map.Entry localEntry1 = (Map.Entry)localIterator2.next();
      AnnotationIntrospector.ReferenceProperty localReferenceProperty1 = localAnnotationIntrospector.findReferenceType((AnnotatedMember)localEntry1.getValue());
      if ((localReferenceProperty1 != null) && (localReferenceProperty1.isBackReference()))
        continue;
      BeanPropertyWriter localBeanPropertyWriter1 = _constructWriter(paramSerializationConfig, localTypeBindings, localPropertyBuilder, bool, (String)localEntry1.getKey(), (AnnotatedMember)localEntry1.getValue());
      localArrayList.add(localBeanPropertyWriter1);
    }
  }
}
 
开发者ID:zhangjianying,项目名称:12306-android-Decompile,代码行数:59,代码来源:BeanSerializerFactory.java


注:本文中的org.codehaus.jackson.map.AnnotationIntrospector.ReferenceProperty方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。