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