當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。