當前位置: 首頁>>代碼示例>>Java>>正文


Java JavaType.isPrimitive方法代碼示例

本文整理匯總了Java中org.codehaus.jackson.type.JavaType.isPrimitive方法的典型用法代碼示例。如果您正苦於以下問題:Java JavaType.isPrimitive方法的具體用法?Java JavaType.isPrimitive怎麽用?Java JavaType.isPrimitive使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.codehaus.jackson.type.JavaType的用法示例。


在下文中一共展示了JavaType.isPrimitive方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: isNaturalTypeWithStdHandling

import org.codehaus.jackson.type.JavaType; //導入方法依賴的package包/類
protected boolean isNaturalTypeWithStdHandling(JavaType paramJavaType, JsonSerializer<?> paramJsonSerializer)
{
  Class localClass = paramJavaType.getRawClass();
  if (paramJavaType.isPrimitive())
    if ((localClass == Integer.TYPE) || (localClass == Boolean.TYPE) || (localClass == Double.TYPE))
      break label59;
  label59: 
  do
    do
      return false;
    while ((localClass != String.class) && (localClass != Integer.class) && (localClass != Boolean.class) && (localClass != Double.class));
  while (paramJsonSerializer.getClass().getAnnotation(JacksonStdImpl.class) == null);
  return true;
}
 
開發者ID:zhangjianying,項目名稱:12306-android-Decompile,代碼行數:15,代碼來源:JsonValueSerializer.java

示例2: _reportIncompatibleRootType

import org.codehaus.jackson.type.JavaType; //導入方法依賴的package包/類
protected void _reportIncompatibleRootType(Object paramObject, JavaType paramJavaType)
  throws IOException, JsonProcessingException
{
  if ((paramJavaType.isPrimitive()) && (ClassUtil.wrapperType(paramJavaType.getRawClass()).isAssignableFrom(paramObject.getClass())))
    return;
  throw new JsonMappingException("Incompatible types: declared root type (" + paramJavaType + ") vs " + paramObject.getClass().getName());
}
 
開發者ID:zhangjianying,項目名稱:12306-android-Decompile,代碼行數:8,代碼來源:StdSerializerProvider.java

示例3: createArrayDeserializer

import org.codehaus.jackson.type.JavaType; //導入方法依賴的package包/類
public JsonDeserializer<?> createArrayDeserializer(DeserializationConfig paramDeserializationConfig, DeserializerProvider paramDeserializerProvider, ArrayType paramArrayType, BeanProperty paramBeanProperty)
  throws JsonMappingException
{
  JavaType localJavaType = paramArrayType.getContentType();
  JsonDeserializer localJsonDeserializer1 = (JsonDeserializer)localJavaType.getValueHandler();
  if (localJsonDeserializer1 == null)
  {
    Object localObject = (JsonDeserializer)_arrayDeserializers.get(localJavaType);
    if (localObject != null)
    {
      JsonDeserializer localJsonDeserializer3 = _findCustomArrayDeserializer(paramArrayType, paramDeserializationConfig, paramDeserializerProvider, paramBeanProperty, null, null);
      if (localJsonDeserializer3 != null)
        localObject = localJsonDeserializer3;
      return localObject;
    }
    if (localJavaType.isPrimitive())
      throw new IllegalArgumentException("Internal error: primitive type (" + paramArrayType + ") passed, no array deserializer found");
  }
  TypeDeserializer localTypeDeserializer = (TypeDeserializer)localJavaType.getTypeHandler();
  if (localTypeDeserializer == null)
    localTypeDeserializer = findTypeDeserializer(paramDeserializationConfig, localJavaType, paramBeanProperty);
  JsonDeserializer localJsonDeserializer2 = _findCustomArrayDeserializer(paramArrayType, paramDeserializationConfig, paramDeserializerProvider, paramBeanProperty, localTypeDeserializer, localJsonDeserializer1);
  if (localJsonDeserializer2 != null)
    return localJsonDeserializer2;
  if (localJsonDeserializer1 == null)
    localJsonDeserializer1 = paramDeserializerProvider.findValueDeserializer(paramDeserializationConfig, localJavaType, paramBeanProperty);
  return (JsonDeserializer<?>)new ArrayDeserializer(paramArrayType, localJsonDeserializer1, localTypeDeserializer);
}
 
開發者ID:zhangjianying,項目名稱:12306-android-Decompile,代碼行數:29,代碼來源:BasicDeserializerFactory.java

示例4: NullProvider

import org.codehaus.jackson.type.JavaType; //導入方法依賴的package包/類
protected NullProvider(JavaType paramJavaType, Object paramObject)
{
  this._nullValue = paramObject;
  this._isPrimitive = paramJavaType.isPrimitive();
  this._rawType = paramJavaType.getRawClass();
}
 
開發者ID:zhangjianying,項目名稱:12306-android-Decompile,代碼行數:7,代碼來源:SettableBeanProperty.java


注:本文中的org.codehaus.jackson.type.JavaType.isPrimitive方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。