当前位置: 首页>>代码示例>>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;未经允许,请勿转载。