本文整理匯總了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);
}