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