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


Java TypeDeserializer.forProperty方法代码示例

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


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

示例1: createContextual

import com.fasterxml.jackson.databind.jsontype.TypeDeserializer; //导入方法依赖的package包/类
/**
 * Method called to finalize setup of this deserializer,
 * after deserializer itself has been registered. This
 * is needed to handle recursive and transitive dependencies.
 */
@Override
public JsonDeserializer<?> createContextual(DeserializationContext ctxt,
                                            BeanProperty property) throws JsonMappingException {
    JsonDeserializer<?> deser = _valueDeserializer;
    TypeDeserializer typeDeser = _typeDeserializerForValue;
    if (deser == null) {
        deser = ctxt.findContextualValueDeserializer(_containerType.getContentType(), property);
    }
    if (typeDeser != null) {
        typeDeser = typeDeser.forProperty(property);
    }
    if (deser == _valueDeserializer && typeDeser == _typeDeserializerForValue) {
        return this;
    }
    return withResolved(typeDeser, deser);
}
 
开发者ID:blomqvie,项目名称:android-rxjava-training,代码行数:22,代码来源:TotallylazyCollectionDeserializer.java

示例2: createContextual

import com.fasterxml.jackson.databind.jsontype.TypeDeserializer; //导入方法依赖的package包/类
public JsonDeserializer<?> createContextual(DeserializationContext paramDeserializationContext, BeanProperty paramBeanProperty)
{
  JsonDeserializer localJsonDeserializer1 = this._keyDeserializer;
  JsonDeserializer localJsonDeserializer2 = localJsonDeserializer1;
  if (localJsonDeserializer1 == null)
    localJsonDeserializer2 = paramDeserializationContext.findContextualValueDeserializer(this._mapType.getKeyType(), paramBeanProperty);
  JsonDeserializer localJsonDeserializer3 = this._valueDeserializer;
  JsonDeserializer localJsonDeserializer4 = localJsonDeserializer3;
  if (localJsonDeserializer3 == null)
    localJsonDeserializer4 = paramDeserializationContext.findContextualValueDeserializer(this._mapType.getContentType(), paramBeanProperty);
  else if ((localJsonDeserializer4 instanceof ContextualDeserializer))
    localJsonDeserializer4 = ((ContextualDeserializer)localJsonDeserializer4).createContextual(paramDeserializationContext, paramBeanProperty);
  TypeDeserializer localTypeDeserializer1 = this._valueTypeDeserializer;
  TypeDeserializer localTypeDeserializer2 = localTypeDeserializer1;
  if (localTypeDeserializer1 != null)
    localTypeDeserializer2 = localTypeDeserializer2.forProperty(paramBeanProperty);
  return withResolved(localJsonDeserializer2, localJsonDeserializer4, localTypeDeserializer2);
}
 
开发者ID:mmmsplay10,项目名称:QuizUpWinner,代码行数:19,代码来源:EnumMapDeserializer.java

示例3: SettableBeanProperty

import com.fasterxml.jackson.databind.jsontype.TypeDeserializer; //导入方法依赖的package包/类
public SettableBeanProperty(String paramString, JavaType paramJavaType, PropertyName paramPropertyName, TypeDeserializer paramTypeDeserializer, Annotations paramAnnotations, boolean paramBoolean)
{
  if ((paramString == null) || (paramString.length() == 0))
    this._propName = "";
  else
    this._propName = InternCache.instance.intern(paramString);
  this._type = paramJavaType;
  this._wrapperName = paramPropertyName;
  this._isRequired = paramBoolean;
  this._contextAnnotations = paramAnnotations;
  this._viewMatcher = null;
  this._nullProvider = null;
  if (paramTypeDeserializer != null)
    paramTypeDeserializer = paramTypeDeserializer.forProperty(this);
  this._valueTypeDeserializer = paramTypeDeserializer;
  this._valueDeserializer = MISSING_VALUE_DESERIALIZER;
}
 
开发者ID:mmmsplay10,项目名称:QuizUpWinner,代码行数:18,代码来源:SettableBeanProperty.java

示例4: createContextual

import com.fasterxml.jackson.databind.jsontype.TypeDeserializer; //导入方法依赖的package包/类
public JsonDeserializer<?> createContextual(DeserializationContext ctxt, BeanProperty property) throws JsonMappingException {
    KeyDeserializer keyDeser = keyDeserializer;
    JsonDeserializer<?> deser = valueDeserializer;
    TypeDeserializer typeDeser = typeDeserializerForValue;

    if ((keyDeser != null) && (deser != null) && (typeDeser == null)) {
        return this;
    }
    if (keyDeser == null) {
        keyDeser = ctxt.findKeyDeserializer(mapType.getKeyType(), property);
    }
    if (deser == null) {
        deser = ctxt.findContextualValueDeserializer(mapType.getContentType(), property);
    }
    if (typeDeser != null) {
        typeDeser = typeDeser.forProperty(property);
    }
    return withResolved(keyDeser, typeDeser, deser);
}
 
开发者ID:v1ctor,项目名称:jackson-datatype-bolts,代码行数:20,代码来源:MapDeserializer.java

示例5: createContextual

import com.fasterxml.jackson.databind.jsontype.TypeDeserializer; //导入方法依赖的package包/类
public JsonDeserializer<?> createContextual(DeserializationContext paramDeserializationContext, BeanProperty paramBeanProperty)
{
  JsonDeserializer localJsonDeserializer1 = findConvertingContentDeserializer(paramDeserializationContext, paramBeanProperty, this._elementDeserializer);
  JsonDeserializer localJsonDeserializer2 = localJsonDeserializer1;
  if (localJsonDeserializer1 == null)
    localJsonDeserializer2 = paramDeserializationContext.findContextualValueDeserializer(this._arrayType.getContentType(), paramBeanProperty);
  else if ((localJsonDeserializer2 instanceof ContextualDeserializer))
    localJsonDeserializer2 = ((ContextualDeserializer)localJsonDeserializer2).createContextual(paramDeserializationContext, paramBeanProperty);
  TypeDeserializer localTypeDeserializer1 = this._elementTypeDeserializer;
  TypeDeserializer localTypeDeserializer2 = localTypeDeserializer1;
  if (localTypeDeserializer1 != null)
    localTypeDeserializer2 = localTypeDeserializer2.forProperty(paramBeanProperty);
  return withDeserializer(localTypeDeserializer2, localJsonDeserializer2);
}
 
开发者ID:mmmsplay10,项目名称:QuizUpWinner,代码行数:15,代码来源:ObjectArrayDeserializer.java

示例6: createContextual

import com.fasterxml.jackson.databind.jsontype.TypeDeserializer; //导入方法依赖的package包/类
public JsonDeserializer<?> createContextual(DeserializationContext paramDeserializationContext, BeanProperty paramBeanProperty)
{
  KeyDeserializer localKeyDeserializer1 = this._keyDeserializer;
  KeyDeserializer localKeyDeserializer2 = localKeyDeserializer1;
  if (localKeyDeserializer1 == null)
    localKeyDeserializer2 = paramDeserializationContext.findKeyDeserializer(this._mapType.getKeyType(), paramBeanProperty);
  else if ((localKeyDeserializer2 instanceof ContextualKeyDeserializer))
    localKeyDeserializer2 = ((ContextualKeyDeserializer)localKeyDeserializer2).createContextual(paramDeserializationContext, paramBeanProperty);
  JsonDeserializer localJsonDeserializer1 = findConvertingContentDeserializer(paramDeserializationContext, paramBeanProperty, this._valueDeserializer);
  JsonDeserializer localJsonDeserializer2 = localJsonDeserializer1;
  if (localJsonDeserializer1 == null)
    localJsonDeserializer2 = paramDeserializationContext.findContextualValueDeserializer(this._mapType.getContentType(), paramBeanProperty);
  else if ((localJsonDeserializer2 instanceof ContextualDeserializer))
    localJsonDeserializer2 = ((ContextualDeserializer)localJsonDeserializer2).createContextual(paramDeserializationContext, paramBeanProperty);
  TypeDeserializer localTypeDeserializer1 = this._valueTypeDeserializer;
  TypeDeserializer localTypeDeserializer2 = localTypeDeserializer1;
  if (localTypeDeserializer1 != null)
    localTypeDeserializer2 = localTypeDeserializer2.forProperty(paramBeanProperty);
  Object localObject = this._ignorableProperties;
  AnnotationIntrospector localAnnotationIntrospector = paramDeserializationContext.getAnnotationIntrospector();
  if ((localAnnotationIntrospector != null) && (paramBeanProperty != null))
  {
    String[] arrayOfString = localAnnotationIntrospector.findPropertiesToIgnore(paramBeanProperty.getMember());
    if (arrayOfString != null)
    {
      HashSet localHashSet;
      if (localObject == null)
        localHashSet = new HashSet();
      else
        localHashSet = new HashSet((Collection)localObject);
      localObject = localHashSet;
      int i = arrayOfString.length;
      for (int j = 0; j < i; j++)
        ((HashSet)localObject).add(arrayOfString[j]);
    }
  }
  return withResolved(localKeyDeserializer2, localTypeDeserializer2, localJsonDeserializer2, (HashSet)localObject);
}
 
开发者ID:mmmsplay10,项目名称:QuizUpWinner,代码行数:39,代码来源:MapDeserializer.java

示例7: createContextual

import com.fasterxml.jackson.databind.jsontype.TypeDeserializer; //导入方法依赖的package包/类
public CollectionDeserializer createContextual(DeserializationContext paramDeserializationContext, BeanProperty paramBeanProperty)
{
  ValueInstantiator localValueInstantiator = this._valueInstantiator;
  JsonDeserializer localJsonDeserializer1 = null;
  if (localValueInstantiator != null)
  {
    boolean bool = this._valueInstantiator.canCreateUsingDelegate();
    localJsonDeserializer1 = null;
    if (bool)
    {
      JavaType localJavaType = this._valueInstantiator.getDelegateType(paramDeserializationContext.getConfig());
      if (localJavaType == null)
        throw new IllegalArgumentException("Invalid delegate-creator definition for " + this._collectionType + ": value instantiator (" + this._valueInstantiator.getClass().getName() + ") returned true for 'canCreateUsingDelegate()', but null for 'getDelegateType()'");
      localJsonDeserializer1 = findDeserializer(paramDeserializationContext, localJavaType, paramBeanProperty);
    }
  }
  JsonDeserializer localJsonDeserializer2 = findConvertingContentDeserializer(paramDeserializationContext, paramBeanProperty, this._valueDeserializer);
  JsonDeserializer localJsonDeserializer3 = localJsonDeserializer2;
  if (localJsonDeserializer2 == null)
    localJsonDeserializer3 = paramDeserializationContext.findContextualValueDeserializer(this._collectionType.getContentType(), paramBeanProperty);
  else if ((localJsonDeserializer3 instanceof ContextualDeserializer))
    localJsonDeserializer3 = ((ContextualDeserializer)localJsonDeserializer3).createContextual(paramDeserializationContext, paramBeanProperty);
  TypeDeserializer localTypeDeserializer1 = this._valueTypeDeserializer;
  TypeDeserializer localTypeDeserializer2 = localTypeDeserializer1;
  if (localTypeDeserializer1 != null)
    localTypeDeserializer2 = localTypeDeserializer2.forProperty(paramBeanProperty);
  return withResolved(localJsonDeserializer1, localJsonDeserializer3, localTypeDeserializer2);
}
 
开发者ID:mmmsplay10,项目名称:QuizUpWinner,代码行数:29,代码来源:CollectionDeserializer.java

示例8: findRootValueDeserializer

import com.fasterxml.jackson.databind.jsontype.TypeDeserializer; //导入方法依赖的package包/类
public final JsonDeserializer<Object> findRootValueDeserializer(JavaType paramJavaType)
{
  JsonDeserializer localJsonDeserializer1 = this._cache.findValueDeserializer(this, this._factory, paramJavaType);
  JsonDeserializer localJsonDeserializer2 = localJsonDeserializer1;
  if (localJsonDeserializer1 == null)
    return null;
  if ((localJsonDeserializer2 instanceof ContextualDeserializer))
    localJsonDeserializer2 = ((ContextualDeserializer)localJsonDeserializer2).createContextual(this, null);
  TypeDeserializer localTypeDeserializer = this._factory.findTypeDeserializer(this._config, paramJavaType);
  if (localTypeDeserializer != null)
    return new TypeWrappedDeserializer(localTypeDeserializer.forProperty(null), localJsonDeserializer2);
  return localJsonDeserializer2;
}
 
开发者ID:mmmsplay10,项目名称:QuizUpWinner,代码行数:14,代码来源:DeserializationContext.java

示例9: createContextual

import com.fasterxml.jackson.databind.jsontype.TypeDeserializer; //导入方法依赖的package包/类
public JsonDeserializer<?> createContextual(DeserializationContext ctxt, BeanProperty property) throws JsonMappingException {
    JsonDeserializer<?> deser = valueDeserializer;
    TypeDeserializer typeDeser = typeDeserializerForValue;
    if (deser == null) {
        deser = ctxt.findContextualValueDeserializer(containerType.getContentType(), property);
    }
    if (typeDeser != null) {
        typeDeser = typeDeser.forProperty(property);
    }
    if (deser == valueDeserializer && typeDeser == typeDeserializerForValue) {
        return this;
    }
    return withResolved(typeDeser, deser);
}
 
开发者ID:v1ctor,项目名称:jackson-datatype-bolts,代码行数:15,代码来源:CollectionDeserializer.java

示例10: createContextual

import com.fasterxml.jackson.databind.jsontype.TypeDeserializer; //导入方法依赖的package包/类
@Override
public JsonDeserializer<?> createContextual(DeserializationContext context, BeanProperty property)
        throws JsonMappingException
{
    JsonDeserializer<?> firstDeserializer = this.firstDeserializer;
    JsonDeserializer<?> secondDeserializer = this.secondDeserializer;
    TypeDeserializer firstTypeDeserializer = this.firstTypeDeserializer;
    TypeDeserializer secondTypeDeserializer = this.secondTypeDeserializer;

    if (firstDeserializer == null) {
        firstDeserializer = context.findContextualValueDeserializer(firstType, property);
    }

    if (secondDeserializer == null) {
        secondDeserializer = context.findContextualValueDeserializer(secondType, property);
    }
    if (firstTypeDeserializer != null) {
        firstTypeDeserializer = firstTypeDeserializer.forProperty(property);
    }
    if (secondTypeDeserializer != null) {
        secondTypeDeserializer = secondTypeDeserializer.forProperty(property);
    }
    if (firstDeserializer != this.firstDeserializer
            || secondDeserializer != this.secondDeserializer
            || firstTypeDeserializer != this.firstTypeDeserializer
            || secondTypeDeserializer != this.secondTypeDeserializer)
    {
        return new Tuple2Deserializer(firstType, secondType, firstDeserializer, secondDeserializer,
                firstTypeDeserializer, secondTypeDeserializer);
    }
    return this;
}
 
开发者ID:v1ctor,项目名称:jackson-datatype-bolts,代码行数:33,代码来源:Tuple2Deserializer.java


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