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


Java AnnotationIntrospector.ReferenceProperty方法代碼示例

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


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

示例1: findBackReferenceProperties

import com.fasterxml.jackson.databind.AnnotationIntrospector; //導入方法依賴的package包/類
public Map<String, AnnotatedMember> findBackReferenceProperties()
{
  HashMap localHashMap = null;
  Iterator localIterator = this._properties.iterator();
  while (localIterator.hasNext())
  {
    AnnotatedMember localAnnotatedMember = ((BeanPropertyDefinition)localIterator.next()).getMutator();
    if (localAnnotatedMember != null)
    {
      AnnotationIntrospector.ReferenceProperty localReferenceProperty = this._annotationIntrospector.findReferenceType(localAnnotatedMember);
      if ((localReferenceProperty != null) && (localReferenceProperty.isBackReference()))
      {
        if (localHashMap == null)
          localHashMap = new HashMap();
        String str = localReferenceProperty.getName();
        if (localHashMap.put(str, localAnnotatedMember) != null)
          throw new IllegalArgumentException("Multiple back-reference properties with name '" + str + "'");
      }
    }
  }
  return localHashMap;
}
 
開發者ID:mmmsplay10,項目名稱:QuizUpWinner,代碼行數:23,代碼來源:BasicBeanDescription.java

示例2: constructSettableProperty

import com.fasterxml.jackson.databind.AnnotationIntrospector; //導入方法依賴的package包/類
protected SettableBeanProperty constructSettableProperty(DeserializationContext paramDeserializationContext, BeanDescription paramBeanDescription, BeanPropertyDefinition paramBeanPropertyDefinition, Type paramType)
{
  AnnotatedMember localAnnotatedMember = paramBeanPropertyDefinition.getMutator();
  if (paramDeserializationContext.canOverrideAccessModifiers())
    localAnnotatedMember.fixAccess();
  JavaType localJavaType1 = paramBeanDescription.resolveType(paramType);
  BeanProperty.Std localStd = new BeanProperty.Std(paramBeanPropertyDefinition.getName(), localJavaType1, paramBeanPropertyDefinition.getWrapperName(), paramBeanDescription.getClassAnnotations(), localAnnotatedMember, paramBeanPropertyDefinition.isRequired());
  JavaType localJavaType2 = resolveType(paramDeserializationContext, paramBeanDescription, localJavaType1, localAnnotatedMember);
  if (localJavaType2 != localJavaType1)
    localStd.withType(localJavaType2);
  JsonDeserializer localJsonDeserializer = findDeserializerFromAnnotation(paramDeserializationContext, localAnnotatedMember);
  JavaType localJavaType3 = modifyTypeByAnnotation(paramDeserializationContext, localAnnotatedMember, localJavaType2);
  TypeDeserializer localTypeDeserializer = (TypeDeserializer)localJavaType3.getTypeHandler();
  Object localObject;
  if ((localAnnotatedMember instanceof AnnotatedMethod))
    localObject = new MethodProperty(paramBeanPropertyDefinition, localJavaType3, localTypeDeserializer, paramBeanDescription.getClassAnnotations(), (AnnotatedMethod)localAnnotatedMember);
  else
    localObject = new FieldProperty(paramBeanPropertyDefinition, localJavaType3, localTypeDeserializer, paramBeanDescription.getClassAnnotations(), (AnnotatedField)localAnnotatedMember);
  if (localJsonDeserializer != null)
    localObject = ((SettableBeanProperty)localObject).withValueDeserializer(localJsonDeserializer);
  AnnotationIntrospector.ReferenceProperty localReferenceProperty = paramBeanPropertyDefinition.findReferenceType();
  if ((localReferenceProperty != null) && (localReferenceProperty.isManagedReference()))
    ((SettableBeanProperty)localObject).setManagedReferenceName(localReferenceProperty.getName());
  return localObject;
}
 
開發者ID:mmmsplay10,項目名稱:QuizUpWinner,代碼行數:26,代碼來源:BeanDeserializerFactory.java

示例3: findBeanProperties

import com.fasterxml.jackson.databind.AnnotationIntrospector; //導入方法依賴的package包/類
protected List<BeanPropertyWriter> findBeanProperties(SerializerProvider paramSerializerProvider, BeanDescription paramBeanDescription, BeanSerializerBuilder paramBeanSerializerBuilder)
{
  List localList = paramBeanDescription.findProperties();
  SerializationConfig localSerializationConfig = paramSerializerProvider.getConfig();
  removeIgnorableTypes(localSerializationConfig, paramBeanDescription, localList);
  if (localSerializationConfig.isEnabled(MapperFeature.REQUIRE_SETTERS_FOR_GETTERS))
    removeSetterlessGetters(localSerializationConfig, paramBeanDescription, localList);
  if (localList.isEmpty())
    return null;
  boolean bool = usesStaticTyping(localSerializationConfig, paramBeanDescription, null);
  PropertyBuilder localPropertyBuilder = constructPropertyBuilder(localSerializationConfig, paramBeanDescription);
  ArrayList localArrayList = new ArrayList(localList.size());
  TypeBindings localTypeBindings = paramBeanDescription.bindingsForBeanType();
  Iterator localIterator = localList.iterator();
  while (localIterator.hasNext())
  {
    BeanPropertyDefinition localBeanPropertyDefinition = (BeanPropertyDefinition)localIterator.next();
    AnnotatedMember localAnnotatedMember = localBeanPropertyDefinition.getAccessor();
    if (localBeanPropertyDefinition.isTypeId())
    {
      if (localAnnotatedMember != null)
      {
        if (localSerializationConfig.canOverrideAccessModifiers())
          localAnnotatedMember.fixAccess();
        paramBeanSerializerBuilder.setTypeId(localAnnotatedMember);
      }
    }
    else
    {
      AnnotationIntrospector.ReferenceProperty localReferenceProperty = localBeanPropertyDefinition.findReferenceType();
      if ((localReferenceProperty == null) || (!localReferenceProperty.isBackReference()))
        if ((localAnnotatedMember instanceof AnnotatedMethod))
          localArrayList.add(_constructWriter(paramSerializerProvider, localBeanPropertyDefinition, localTypeBindings, localPropertyBuilder, bool, (AnnotatedMethod)localAnnotatedMember));
        else
          localArrayList.add(_constructWriter(paramSerializerProvider, localBeanPropertyDefinition, localTypeBindings, localPropertyBuilder, bool, (AnnotatedField)localAnnotatedMember));
    }
  }
  return localArrayList;
}
 
開發者ID:mmmsplay10,項目名稱:QuizUpWinner,代碼行數:40,代碼來源:BeanSerializerFactory.java

示例4: findReferenceType

import com.fasterxml.jackson.databind.AnnotationIntrospector; //導入方法依賴的package包/類
public AnnotationIntrospector.ReferenceProperty findReferenceType(AnnotatedMember paramAnnotatedMember)
{
  AnnotationIntrospector.ReferenceProperty localReferenceProperty1 = this._primary.findReferenceType(paramAnnotatedMember);
  AnnotationIntrospector.ReferenceProperty localReferenceProperty2 = localReferenceProperty1;
  if (localReferenceProperty1 == null)
    localReferenceProperty2 = this._secondary.findReferenceType(paramAnnotatedMember);
  return localReferenceProperty2;
}
 
開發者ID:mmmsplay10,項目名稱:QuizUpWinner,代碼行數:9,代碼來源:AnnotationIntrospectorPair.java

示例5: findReferenceType

import com.fasterxml.jackson.databind.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:mmmsplay10,項目名稱:QuizUpWinner,代碼行數:11,代碼來源:JacksonAnnotationIntrospector.java

示例6: findReferenceType

import com.fasterxml.jackson.databind.AnnotationIntrospector; //導入方法依賴的package包/類
public AnnotationIntrospector.ReferenceProperty findReferenceType()
{
  return (AnnotationIntrospector.ReferenceProperty)fromMemberAnnotations(new WithMember()
  {
    public AnnotationIntrospector.ReferenceProperty withMember(AnnotatedMember paramAnonymousAnnotatedMember)
    {
      return POJOPropertyBuilder.this._annotationIntrospector.findReferenceType(paramAnonymousAnnotatedMember);
    }
  });
}
 
開發者ID:mmmsplay10,項目名稱:QuizUpWinner,代碼行數:11,代碼來源:POJOPropertyBuilder.java

示例7: findReferenceType

import com.fasterxml.jackson.databind.AnnotationIntrospector; //導入方法依賴的package包/類
@Override
public AnnotationIntrospector.ReferenceProperty findReferenceType() {
    return fromMemberAnnotations(new WithMember<AnnotationIntrospector.ReferenceProperty>() {
        public AnnotationIntrospector.ReferenceProperty withMember(AnnotatedMember member) {
            return _annotationIntrospector.findReferenceType(member);
        }
    });
}
 
開發者ID:joyplus,項目名稱:joyplus-tv,代碼行數:9,代碼來源:POJOPropertyBuilder.java

示例8: findReferenceType

import com.fasterxml.jackson.databind.AnnotationIntrospector; //導入方法依賴的package包/類
/**
 * Method used to find whether property is part of a bi-directional
 * reference.
 */
public AnnotationIntrospector.ReferenceProperty findReferenceType() {
    return null;
}
 
開發者ID:joyplus,項目名稱:joyplus-tv,代碼行數:8,代碼來源:BeanPropertyDefinition.java


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