本文整理汇总了Java中org.codehaus.jackson.type.JavaType.isArrayType方法的典型用法代码示例。如果您正苦于以下问题:Java JavaType.isArrayType方法的具体用法?Java JavaType.isArrayType怎么用?Java JavaType.isArrayType使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.codehaus.jackson.type.JavaType
的用法示例。
在下文中一共展示了JavaType.isArrayType方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: BackportedObjectReader
import org.codehaus.jackson.type.JavaType; //导入方法依赖的package包/类
/**
* Constructor used by {@link ObjectMapper} for initial instantiation
*/
protected BackportedObjectReader(ObjectMapper mapper, JavaType valueType, Object valueToUpdate) {
_rootDeserializers = ReflectionUtils.getField(ROOT_DESERIALIZERS, mapper);
_provider = mapper.getDeserializerProvider();
_jsonFactory = mapper.getJsonFactory();
// must make a copy at this point, to prevent further changes from trickling down
_config = mapper.copyDeserializationConfig();
_valueType = valueType;
_valueToUpdate = valueToUpdate;
if (valueToUpdate != null && valueType.isArrayType()) {
throw new IllegalArgumentException("Can not update an array value");
}
}
示例2: useForType
import org.codehaus.jackson.type.JavaType; //导入方法依赖的package包/类
@Override
public boolean useForType(JavaType t)
{
if (t.getRawClass() == Object.class) {
return true;
}
if (t.getRawClass().getName().startsWith("java.")) {
return false;
}
if (t.isArrayType()) {
return false;
}
return super.useForType(t);
}
示例3: ObjectReader
import org.codehaus.jackson.type.JavaType; //导入方法依赖的package包/类
protected ObjectReader(ObjectMapper paramObjectMapper, DeserializationConfig paramDeserializationConfig, JavaType paramJavaType, Object paramObject, FormatSchema paramFormatSchema)
{
this._config = paramDeserializationConfig;
this._rootDeserializers = paramObjectMapper._rootDeserializers;
this._provider = paramObjectMapper._deserializerProvider;
this._jsonFactory = paramObjectMapper._jsonFactory;
this._valueType = paramJavaType;
this._valueToUpdate = paramObject;
if ((paramObject != null) && (paramJavaType.isArrayType()))
throw new IllegalArgumentException("Can not update an array value");
this._schema = paramFormatSchema;
}
示例4: buildContainerSerializer
import org.codehaus.jackson.type.JavaType; //导入方法依赖的package包/类
public JsonSerializer<?> buildContainerSerializer(SerializationConfig paramSerializationConfig, JavaType paramJavaType, BasicBeanDescription paramBasicBeanDescription, BeanProperty paramBeanProperty, boolean paramBoolean)
{
TypeSerializer localTypeSerializer = createTypeSerializer(paramSerializationConfig, paramJavaType.getContentType(), paramBeanProperty);
if (localTypeSerializer != null)
paramBoolean = false;
JsonSerializer localJsonSerializer1;
while (true)
{
localJsonSerializer1 = findContentSerializer(paramSerializationConfig, paramBasicBeanDescription.getClassInfo(), paramBeanProperty);
if (!paramJavaType.isMapLikeType())
break;
MapLikeType localMapLikeType = (MapLikeType)paramJavaType;
JsonSerializer localJsonSerializer2 = findKeySerializer(paramSerializationConfig, paramBasicBeanDescription.getClassInfo(), paramBeanProperty);
if (localMapLikeType.isTrueMapType())
{
return buildMapSerializer(paramSerializationConfig, (MapType)localMapLikeType, paramBasicBeanDescription, paramBeanProperty, paramBoolean, localJsonSerializer2, localTypeSerializer, localJsonSerializer1);
if (paramBoolean)
continue;
paramBoolean = usesStaticTyping(paramSerializationConfig, paramBasicBeanDescription, localTypeSerializer, paramBeanProperty);
continue;
}
return buildMapLikeSerializer(paramSerializationConfig, localMapLikeType, paramBasicBeanDescription, paramBeanProperty, paramBoolean, localJsonSerializer2, localTypeSerializer, localJsonSerializer1);
}
if (paramJavaType.isCollectionLikeType())
{
CollectionLikeType localCollectionLikeType = (CollectionLikeType)paramJavaType;
if (localCollectionLikeType.isTrueCollectionType())
return buildCollectionSerializer(paramSerializationConfig, (CollectionType)localCollectionLikeType, paramBasicBeanDescription, paramBeanProperty, paramBoolean, localTypeSerializer, localJsonSerializer1);
return buildCollectionLikeSerializer(paramSerializationConfig, localCollectionLikeType, paramBasicBeanDescription, paramBeanProperty, paramBoolean, localTypeSerializer, localJsonSerializer1);
}
if (paramJavaType.isArrayType())
return buildArraySerializer(paramSerializationConfig, (ArrayType)paramJavaType, paramBasicBeanDescription, paramBeanProperty, paramBoolean, localTypeSerializer, localJsonSerializer1);
return null;
}
示例5: _createDeserializer
import org.codehaus.jackson.type.JavaType; //导入方法依赖的package包/类
protected JsonDeserializer<Object> _createDeserializer(DeserializationConfig paramDeserializationConfig, JavaType paramJavaType, BeanProperty paramBeanProperty)
throws JsonMappingException
{
if (paramJavaType.isEnumType())
return this._factory.createEnumDeserializer(paramDeserializationConfig, this, paramJavaType, paramBeanProperty);
if (paramJavaType.isContainerType())
{
if (paramJavaType.isArrayType())
return this._factory.createArrayDeserializer(paramDeserializationConfig, this, (ArrayType)paramJavaType, paramBeanProperty);
if (paramJavaType.isMapLikeType())
{
MapLikeType localMapLikeType = (MapLikeType)paramJavaType;
if (localMapLikeType.isTrueMapType())
return this._factory.createMapDeserializer(paramDeserializationConfig, this, (MapType)localMapLikeType, paramBeanProperty);
return this._factory.createMapLikeDeserializer(paramDeserializationConfig, this, localMapLikeType, paramBeanProperty);
}
if (paramJavaType.isCollectionLikeType())
{
CollectionLikeType localCollectionLikeType = (CollectionLikeType)paramJavaType;
if (localCollectionLikeType.isTrueCollectionType())
return this._factory.createCollectionDeserializer(paramDeserializationConfig, this, (CollectionType)localCollectionLikeType, paramBeanProperty);
return this._factory.createCollectionLikeDeserializer(paramDeserializationConfig, this, localCollectionLikeType, paramBeanProperty);
}
}
if (JsonNode.class.isAssignableFrom(paramJavaType.getRawClass()))
return this._factory.createTreeDeserializer(paramDeserializationConfig, this, paramJavaType, paramBeanProperty);
return this._factory.createBeanDeserializer(paramDeserializationConfig, this, paramJavaType, paramBeanProperty);
}