本文整理汇总了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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
}
}
示例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);
}
}
}