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


Java ContextualDeserializer类代码示例

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


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

示例1: findValueDeserializer

import org.codehaus.jackson.map.ContextualDeserializer; //导入依赖的package包/类
public JsonDeserializer<Object> findValueDeserializer(DeserializationConfig paramDeserializationConfig, JavaType paramJavaType, BeanProperty paramBeanProperty)
  throws JsonMappingException
{
  JsonDeserializer localJsonDeserializer1 = _findCachedDeserializer(paramJavaType);
  if (localJsonDeserializer1 != null)
  {
    if ((localJsonDeserializer1 instanceof ContextualDeserializer))
      localJsonDeserializer1 = ((ContextualDeserializer)localJsonDeserializer1).createContextual(paramDeserializationConfig, paramBeanProperty);
    return localJsonDeserializer1;
  }
  JsonDeserializer localJsonDeserializer2 = _createAndCacheValueDeserializer(paramDeserializationConfig, paramJavaType, paramBeanProperty);
  if (localJsonDeserializer2 == null)
    localJsonDeserializer2 = _handleUnknownValueDeserializer(paramJavaType);
  if ((localJsonDeserializer2 instanceof ContextualDeserializer))
    localJsonDeserializer2 = ((ContextualDeserializer)localJsonDeserializer2).createContextual(paramDeserializationConfig, paramBeanProperty);
  return localJsonDeserializer2;
}
 
开发者ID:zhangjianying,项目名称:12306-android-Decompile,代码行数:18,代码来源:StdDeserializerProvider.java

示例2: _constructDeserializer

import org.codehaus.jackson.map.ContextualDeserializer; //导入依赖的package包/类
JsonDeserializer<Object> _constructDeserializer(DeserializationConfig paramDeserializationConfig, Annotated paramAnnotated, BeanProperty paramBeanProperty, Object paramObject)
{
  if ((paramObject instanceof JsonDeserializer))
  {
    JsonDeserializer localJsonDeserializer2 = (JsonDeserializer)paramObject;
    if ((localJsonDeserializer2 instanceof ContextualDeserializer))
      localJsonDeserializer2 = ((ContextualDeserializer)localJsonDeserializer2).createContextual(paramDeserializationConfig, paramBeanProperty);
    return localJsonDeserializer2;
  }
  if (!(paramObject instanceof Class))
    throw new IllegalStateException("AnnotationIntrospector returned deserializer definition of type " + paramObject.getClass().getName() + "; expected type JsonDeserializer or Class<JsonDeserializer> instead");
  Class localClass = (Class)paramObject;
  if (!JsonDeserializer.class.isAssignableFrom(localClass))
    throw new IllegalStateException("AnnotationIntrospector returned Class " + localClass.getName() + "; expected Class<JsonDeserializer>");
  JsonDeserializer localJsonDeserializer1 = paramDeserializationConfig.deserializerInstance(paramAnnotated, localClass);
  if ((localJsonDeserializer1 instanceof ContextualDeserializer))
    localJsonDeserializer1 = ((ContextualDeserializer)localJsonDeserializer1).createContextual(paramDeserializationConfig, paramBeanProperty);
  return localJsonDeserializer1;
}
 
开发者ID:isnuryusuf,项目名称:ingress-indonesia-dev,代码行数:20,代码来源:BasicDeserializerFactory.java

示例3: findValueDeserializer

import org.codehaus.jackson.map.ContextualDeserializer; //导入依赖的package包/类
public JsonDeserializer<Object> findValueDeserializer(DeserializationConfig paramDeserializationConfig, JavaType paramJavaType, BeanProperty paramBeanProperty)
{
  JsonDeserializer localJsonDeserializer = _findCachedDeserializer(paramJavaType);
  if (localJsonDeserializer != null)
    if ((localJsonDeserializer instanceof ContextualDeserializer))
      localJsonDeserializer = ((ContextualDeserializer)localJsonDeserializer).createContextual(paramDeserializationConfig, paramBeanProperty);
  do
  {
    return localJsonDeserializer;
    localJsonDeserializer = _createAndCacheValueDeserializer(paramDeserializationConfig, paramJavaType, paramBeanProperty);
    if (localJsonDeserializer == null)
      localJsonDeserializer = _handleUnknownValueDeserializer(paramJavaType);
  }
  while (!(localJsonDeserializer instanceof ContextualDeserializer));
  return ((ContextualDeserializer)localJsonDeserializer).createContextual(paramDeserializationConfig, paramBeanProperty);
}
 
开发者ID:isnuryusuf,项目名称:ingress-indonesia-dev,代码行数:17,代码来源:StdDeserializerProvider.java


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