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


Java ContextualDeserializer类代码示例

本文整理汇总了Java中com.fasterxml.jackson.databind.deser.ContextualDeserializer的典型用法代码示例。如果您正苦于以下问题:Java ContextualDeserializer类的具体用法?Java ContextualDeserializer怎么用?Java ContextualDeserializer使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


ContextualDeserializer类属于com.fasterxml.jackson.databind.deser包,在下文中一共展示了ContextualDeserializer类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createContextual

import com.fasterxml.jackson.databind.deser.ContextualDeserializer; //导入依赖的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

示例2: createContextual

import com.fasterxml.jackson.databind.deser.ContextualDeserializer; //导入依赖的package包/类
public JsonDeserializer<?> createContextual(DeserializationContext ctxt,
        BeanProperty property) throws JsonMappingException
{
    JsonDeserializer<?> deser = _elementDeserializer;
    if (deser == null) {
        deser = ctxt.findContextualValueDeserializer(_arrayType.getContentType(), property);
    } else { // if directly assigned, probably not yet contextual, so:
        if (deser instanceof ContextualDeserializer) {
            deser = ((ContextualDeserializer) deser).createContextual(ctxt, property);
        }
    }
    TypeDeserializer elemTypeDeser = _elementTypeDeserializer;
    if (elemTypeDeser != null) {
        elemTypeDeser = elemTypeDeser.forProperty(property);
    }
    return withDeserializer(elemTypeDeser, deser);
}
 
开发者ID:joyplus,项目名称:joyplus-tv,代码行数:18,代码来源:ObjectArrayDeserializer.java

示例3: createContextual

import com.fasterxml.jackson.databind.deser.ContextualDeserializer; //导入依赖的package包/类
/**
     * Method called to finalize setup of this deserializer,
     * when it is known for which property deserializer is needed for.
     */
//  @Override
    public JsonDeserializer<?> createContextual(DeserializationContext ctxt,
            BeanProperty property) throws JsonMappingException
    {
        // note: instead of finding key deserializer, with enums we actually
        // work with regular deserializers (less code duplication; but not
        // quite as clean as it ought to be)
        JsonDeserializer<?> kd = _keyDeserializer;
        if (kd == null) {
            kd = ctxt.findContextualValueDeserializer(_mapType.getKeyType(), property);
        }
        JsonDeserializer<?> vd = _valueDeserializer;
        if (vd == null) {
            vd = ctxt.findContextualValueDeserializer(_mapType.getContentType(), property);
        } else { // if directly assigned, probably not yet contextual, so:
            if (vd instanceof ContextualDeserializer) {
                vd = ((ContextualDeserializer) vd).createContextual(ctxt, property);
            }
        }

        return withResolved(kd, vd);
    }
 
开发者ID:joyplus,项目名称:joyplus-tv,代码行数:27,代码来源:EnumMapDeserializer.java

示例4: createContextual

import com.fasterxml.jackson.databind.deser.ContextualDeserializer; //导入依赖的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

示例5: createContextual

import com.fasterxml.jackson.databind.deser.ContextualDeserializer; //导入依赖的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

示例6: createContextual

import com.fasterxml.jackson.databind.deser.ContextualDeserializer; //导入依赖的package包/类
public final JsonDeserializer<?> createContextual(DeserializationContext paramDeserializationContext, BeanProperty paramBeanProperty)
{
  ValueInstantiator localValueInstantiator = this._valueInstantiator;
  JsonDeserializer localJsonDeserializer1 = null;
  if (localValueInstantiator != null)
  {
    AnnotatedWithParams localAnnotatedWithParams = this._valueInstantiator.getDelegateCreator();
    localJsonDeserializer1 = null;
    if (localAnnotatedWithParams != null)
      localJsonDeserializer1 = findDeserializer(paramDeserializationContext, this._valueInstantiator.getDelegateType(paramDeserializationContext.getConfig()), paramBeanProperty);
  }
  JsonDeserializer localJsonDeserializer2 = this._valueDeserializer;
  Object localObject = localJsonDeserializer2;
  if (localJsonDeserializer2 == null)
  {
    JsonDeserializer localJsonDeserializer3 = findConvertingContentDeserializer(paramDeserializationContext, paramBeanProperty, (JsonDeserializer)localObject);
    localObject = localJsonDeserializer3;
    if (localJsonDeserializer3 == null)
      localObject = paramDeserializationContext.findContextualValueDeserializer(this._collectionType.getContentType(), paramBeanProperty);
  }
  else if ((localObject instanceof ContextualDeserializer))
  {
    localObject = ((ContextualDeserializer)localObject).createContextual(paramDeserializationContext, paramBeanProperty);
  }
  if (isDefaultDeserializer((JsonDeserializer)localObject))
    localObject = null;
  return withResolved(localJsonDeserializer1, (JsonDeserializer)localObject);
}
 
开发者ID:mmmsplay10,项目名称:QuizUpWinner,代码行数:29,代码来源:StringCollectionDeserializer.java

示例7: createContextual

import com.fasterxml.jackson.databind.deser.ContextualDeserializer; //导入依赖的package包/类
public JsonDeserializer<?> createContextual(DeserializationContext paramDeserializationContext, BeanProperty paramBeanProperty)
{
  JsonDeserializer localJsonDeserializer1 = this._enumDeserializer;
  JsonDeserializer localJsonDeserializer2 = localJsonDeserializer1;
  if (localJsonDeserializer1 == null)
    localJsonDeserializer2 = paramDeserializationContext.findContextualValueDeserializer(this._enumType, paramBeanProperty);
  else if ((localJsonDeserializer2 instanceof ContextualDeserializer))
    localJsonDeserializer2 = ((ContextualDeserializer)localJsonDeserializer2).createContextual(paramDeserializationContext, paramBeanProperty);
  return withDeserializer(localJsonDeserializer2);
}
 
开发者ID:mmmsplay10,项目名称:QuizUpWinner,代码行数:11,代码来源:EnumSetDeserializer.java

示例8: createContextual

import com.fasterxml.jackson.databind.deser.ContextualDeserializer; //导入依赖的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

示例9: createContextual

import com.fasterxml.jackson.databind.deser.ContextualDeserializer; //导入依赖的package包/类
public JsonDeserializer<?> createContextual(DeserializationContext paramDeserializationContext, BeanProperty paramBeanProperty)
{
  JsonDeserializer localJsonDeserializer1 = this._delegatee;
  JsonDeserializer localJsonDeserializer2 = localJsonDeserializer1;
  if ((localJsonDeserializer1 instanceof ContextualDeserializer))
    localJsonDeserializer2 = ((ContextualDeserializer)localJsonDeserializer2).createContextual(paramDeserializationContext, paramBeanProperty);
  return _createContextual(paramDeserializationContext, paramBeanProperty, localJsonDeserializer2);
}
 
开发者ID:mmmsplay10,项目名称:QuizUpWinner,代码行数:9,代码来源:DelegatingDeserializer.java

示例10: createContextual

import com.fasterxml.jackson.databind.deser.ContextualDeserializer; //导入依赖的package包/类
public JsonDeserializer<?> createContextual(DeserializationContext paramDeserializationContext, BeanProperty paramBeanProperty)
{
  if (this._delegateDeserializer != null)
  {
    if ((this._delegateDeserializer instanceof ContextualDeserializer))
    {
      JsonDeserializer localJsonDeserializer = ((ContextualDeserializer)this._delegateDeserializer).createContextual(paramDeserializationContext, paramBeanProperty);
      if (localJsonDeserializer != this._delegateDeserializer)
        return withDelegate(this._converter, this._delegateType, localJsonDeserializer);
    }
    return this;
  }
  JavaType localJavaType = this._converter.getInputType(paramDeserializationContext.getTypeFactory());
  return withDelegate(this._converter, localJavaType, paramDeserializationContext.findContextualValueDeserializer(localJavaType, paramBeanProperty));
}
 
开发者ID:mmmsplay10,项目名称:QuizUpWinner,代码行数:16,代码来源:StdDelegatingDeserializer.java

示例11: createContextual

import com.fasterxml.jackson.databind.deser.ContextualDeserializer; //导入依赖的package包/类
public final JsonDeserializer<?> createContextual(DeserializationContext paramDeserializationContext, BeanProperty paramBeanProperty)
{
  JsonDeserializer localJsonDeserializer1 = findConvertingContentDeserializer(paramDeserializationContext, paramBeanProperty, this._elementDeserializer);
  JsonDeserializer localJsonDeserializer2 = localJsonDeserializer1;
  if (localJsonDeserializer1 == null)
    localJsonDeserializer2 = paramDeserializationContext.findContextualValueDeserializer(paramDeserializationContext.constructType(String.class), paramBeanProperty);
  else if ((localJsonDeserializer2 instanceof ContextualDeserializer))
    localJsonDeserializer2 = ((ContextualDeserializer)localJsonDeserializer2).createContextual(paramDeserializationContext, paramBeanProperty);
  if ((localJsonDeserializer2 != null) && (isDefaultDeserializer(localJsonDeserializer2)))
    localJsonDeserializer2 = null;
  if (this._elementDeserializer != localJsonDeserializer2)
    return new StringArrayDeserializer(localJsonDeserializer2);
  return this;
}
 
开发者ID:mmmsplay10,项目名称:QuizUpWinner,代码行数:15,代码来源:StringArrayDeserializer.java

示例12: findContextualValueDeserializer

import com.fasterxml.jackson.databind.deser.ContextualDeserializer; //导入依赖的package包/类
public final JsonDeserializer<Object> findContextualValueDeserializer(JavaType paramJavaType, BeanProperty paramBeanProperty)
{
  JsonDeserializer localJsonDeserializer1 = this._cache.findValueDeserializer(this, this._factory, paramJavaType);
  JsonDeserializer localJsonDeserializer2 = localJsonDeserializer1;
  if ((localJsonDeserializer1 != null) && ((localJsonDeserializer2 instanceof ContextualDeserializer)))
    localJsonDeserializer2 = ((ContextualDeserializer)localJsonDeserializer2).createContextual(this, paramBeanProperty);
  return localJsonDeserializer2;
}
 
开发者ID:mmmsplay10,项目名称:QuizUpWinner,代码行数:9,代码来源:DeserializationContext.java

示例13: findRootValueDeserializer

import com.fasterxml.jackson.databind.deser.ContextualDeserializer; //导入依赖的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

示例14: createContextual

import com.fasterxml.jackson.databind.deser.ContextualDeserializer; //导入依赖的package包/类
@SuppressWarnings("unchecked")
public JsonDeserializer<?> createContextual(DeserializationContext ctxt,
        BeanProperty property) throws JsonMappingException
{
    // May need to resolve types for delegate-based creators:
    JsonDeserializer<Object> delegate = null;
    if (_valueInstantiator != null) {
        AnnotatedWithParams delegateCreator = _valueInstantiator.getDelegateCreator();
        if (delegateCreator != null) {
            JavaType delegateType = _valueInstantiator.getDelegateType(ctxt.getConfig());
            delegate = findDeserializer(ctxt, delegateType, property);
        }
    }
    JsonDeserializer<?> valueDeser = _valueDeserializer;
    if (valueDeser == null) {
        // And we may also need to get deserializer for String
        JsonDeserializer<?> deser = ctxt.findContextualValueDeserializer(
                _collectionType.getContentType(), property);
        valueDeser = (JsonDeserializer<String>) deser;
    } else { // if directly assigned, probably not yet contextual, so:
        if (valueDeser instanceof ContextualDeserializer) {
            valueDeser = ((ContextualDeserializer) valueDeser).createContextual(ctxt, property);
        }
    } 
    if (isDefaultDeserializer(valueDeser)) {
        valueDeser = null;
    }
    return withResolved(delegate, valueDeser);
}
 
开发者ID:joyplus,项目名称:joyplus-tv,代码行数:30,代码来源:StringCollectionDeserializer.java

示例15: createContextual

import com.fasterxml.jackson.databind.deser.ContextualDeserializer; //导入依赖的package包/类
public JsonDeserializer<?> createContextual(DeserializationContext ctxt,
        BeanProperty property) throws JsonMappingException
{
    JsonDeserializer<?> deser = _enumDeserializer;
    if (deser == null) {
        deser = ctxt.findContextualValueDeserializer(_enumType, property);
    } else { // if directly assigned, probably not yet contextual, so:
        if (deser instanceof ContextualDeserializer) {
            deser = ((ContextualDeserializer) deser).createContextual(ctxt, property);
        }
    }
    return withDeserializer(deser);
}
 
开发者ID:joyplus,项目名称:joyplus-tv,代码行数:14,代码来源:EnumSetDeserializer.java


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