protected JsonSerializer<?> buildCollectionSerializer(SerializationConfig paramSerializationConfig, CollectionType paramCollectionType, BasicBeanDescription paramBasicBeanDescription, BeanProperty paramBeanProperty, boolean paramBoolean, TypeSerializer paramTypeSerializer, JsonSerializer<Object> paramJsonSerializer) { Iterator localIterator = customSerializers().iterator(); while (localIterator.hasNext()) { JsonSerializer localJsonSerializer = ((Serializers)localIterator.next()).findCollectionSerializer(paramSerializationConfig, paramCollectionType, paramBasicBeanDescription, paramBeanProperty, paramTypeSerializer, paramJsonSerializer); if (localJsonSerializer != null) return localJsonSerializer; } Class localClass1 = paramCollectionType.getRawClass(); if (EnumSet.class.isAssignableFrom(localClass1)) return buildEnumSetSerializer(paramSerializationConfig, paramCollectionType, paramBasicBeanDescription, paramBeanProperty, paramBoolean, paramTypeSerializer, paramJsonSerializer); Class localClass2 = paramCollectionType.getContentType().getRawClass(); if (isIndexedList(localClass1)) { if (localClass2 == String.class) return new IndexedStringListSerializer(paramBeanProperty); return ContainerSerializers.indexedListSerializer(paramCollectionType.getContentType(), paramBoolean, paramTypeSerializer, paramBeanProperty, paramJsonSerializer); } if (localClass2 == String.class) return new StringCollectionSerializer(paramBeanProperty); return ContainerSerializers.collectionSerializer(paramCollectionType.getContentType(), paramBoolean, paramTypeSerializer, paramBeanProperty, paramJsonSerializer); }
private String[] getRawObjectNames() throws Exception { SwiftRestClient client; client = SwiftRestClient.getInstance(fs.getUri(), fs.getConf()); SwiftObjectPath path = SwiftObjectPath.fromPath(fs.getUri(), new Path("/")); byte[] bytes = client.listDeepObjectsInDirectory(path, true, true); final CollectionType collectionType = JSONUtil.getJsonMapper(). getTypeFactory().constructCollectionType(List.class, SwiftObjectFileStatus.class); final List<SwiftObjectFileStatus> fileStatusList = JSONUtil.toObject(new String(bytes), collectionType); final ArrayList<String> objects = new ArrayList(); for (SwiftObjectFileStatus status : fileStatusList) { if (status.getName() != null) { objects.add(status.getName()); } else if (status.getSubdir() != null) { objects.add(status.getSubdir()); } } return objects.toArray(new String[objects.size()]); }
protected JsonSerializer<?> buildCollectionSerializer(SerializationConfig paramSerializationConfig, CollectionType paramCollectionType, BasicBeanDescription paramBasicBeanDescription, BeanProperty paramBeanProperty, boolean paramBoolean, TypeSerializer paramTypeSerializer, JsonSerializer<Object> paramJsonSerializer) { Iterator localIterator = customSerializers().iterator(); while (localIterator.hasNext()) { JsonSerializer localJsonSerializer = ((Serializers)localIterator.next()).findCollectionSerializer(paramSerializationConfig, paramCollectionType, paramBasicBeanDescription, paramBeanProperty, paramTypeSerializer, paramJsonSerializer); if (localJsonSerializer != null) return localJsonSerializer; } Class localClass1 = paramCollectionType.getRawClass(); if (EnumSet.class.isAssignableFrom(localClass1)) return buildEnumSetSerializer(paramSerializationConfig, paramCollectionType, paramBasicBeanDescription, paramBeanProperty, paramBoolean, paramTypeSerializer, paramJsonSerializer); Class localClass2 = paramCollectionType.getContentType().getRawClass(); if (isIndexedList(localClass1)) { if (localClass2 == String.class) return new IndexedStringListSerializer(paramBeanProperty); return StdContainerSerializers.indexedListSerializer(paramCollectionType.getContentType(), paramBoolean, paramTypeSerializer, paramBeanProperty, paramJsonSerializer); } if (localClass2 == String.class) return new StringCollectionSerializer(paramBeanProperty); return StdContainerSerializers.collectionSerializer(paramCollectionType.getContentType(), paramBoolean, paramTypeSerializer, paramBeanProperty, paramJsonSerializer); }
@Override public JsonDeserializer<?> createCollectionDeserializer(final DeserializationConfig config, final DeserializerProvider p, final CollectionType type, final BeanProperty property) throws JsonMappingException { if (CollectionPage.class.equals(type.getRawClass())) { final JsonDeserializer<Object> contentDeserializer = type.getContentType().getValueHandler(); return new CollectionPageDeserializer(type, contentDeserializer); } return nonCollectionPageStrategy.createCollectionDeserializer(config, p, type, property); }
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; }
public JsonDeserializer<?> findCollectionDeserializer(CollectionType paramCollectionType, DeserializationConfig paramDeserializationConfig, DeserializerProvider paramDeserializerProvider, BeanDescription paramBeanDescription, BeanProperty paramBeanProperty, TypeDeserializer paramTypeDeserializer, JsonDeserializer<?> paramJsonDeserializer) throws JsonMappingException { if (this._classMappings == null) return null; return (JsonDeserializer)this._classMappings.get(new ClassKey(paramCollectionType.getRawClass())); }
public JsonDeserializer<?> createCollectionDeserializer(DeserializationConfig paramDeserializationConfig, DeserializerProvider paramDeserializerProvider, CollectionType paramCollectionType, BeanProperty paramBeanProperty) throws JsonMappingException { CollectionType localCollectionType1 = (CollectionType)mapAbstractType(paramDeserializationConfig, paramCollectionType); Object localObject = localCollectionType1.getRawClass(); BasicBeanDescription localBasicBeanDescription = (BasicBeanDescription)paramDeserializationConfig.introspectClassAnnotations((Class)localObject); JsonDeserializer localJsonDeserializer1 = findDeserializerFromAnnotation(paramDeserializationConfig, localBasicBeanDescription.getClassInfo(), paramBeanProperty); if (localJsonDeserializer1 != null) return localJsonDeserializer1; CollectionType localCollectionType2 = (CollectionType)modifyTypeByAnnotation(paramDeserializationConfig, localBasicBeanDescription.getClassInfo(), localCollectionType1, null); JavaType localJavaType = localCollectionType2.getContentType(); JsonDeserializer localJsonDeserializer2 = (JsonDeserializer)localJavaType.getValueHandler(); TypeDeserializer localTypeDeserializer = (TypeDeserializer)localJavaType.getTypeHandler(); if (localTypeDeserializer == null) localTypeDeserializer = findTypeDeserializer(paramDeserializationConfig, localJavaType, paramBeanProperty); JsonDeserializer localJsonDeserializer3 = _findCustomCollectionDeserializer(localCollectionType2, paramDeserializationConfig, paramDeserializerProvider, localBasicBeanDescription, paramBeanProperty, localTypeDeserializer, localJsonDeserializer2); if (localJsonDeserializer3 != null) return localJsonDeserializer3; if (localJsonDeserializer2 == null) { if (EnumSet.class.isAssignableFrom((Class)localObject)) return new EnumSetDeserializer(constructEnumResolver(localJavaType.getRawClass(), paramDeserializationConfig)); localJsonDeserializer2 = paramDeserializerProvider.findValueDeserializer(paramDeserializationConfig, localJavaType, paramBeanProperty); } if ((localCollectionType2.isInterface()) || (localCollectionType2.isAbstract())) { Class localClass = (Class)_collectionFallbacks.get(((Class)localObject).getName()); if (localClass == null) throw new IllegalArgumentException("Can not find a deserializer for non-concrete Collection type " + localCollectionType2); localObject = localClass; } Constructor localConstructor = ClassUtil.findConstructor((Class)localObject, paramDeserializationConfig.isEnabled(DeserializationConfig.Feature.CAN_OVERRIDE_ACCESS_MODIFIERS)); if (localJavaType.getRawClass() == String.class) return new StringCollectionDeserializer(localCollectionType2, localJsonDeserializer2, localConstructor); return (JsonDeserializer<?>)new CollectionDeserializer(localCollectionType2, localJsonDeserializer2, localTypeDeserializer, localConstructor); }
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); }
protected JsonDeserializer<?> _findCustomCollectionDeserializer(CollectionType paramCollectionType, DeserializationConfig paramDeserializationConfig, DeserializerProvider paramDeserializerProvider, BasicBeanDescription paramBasicBeanDescription, BeanProperty paramBeanProperty, TypeDeserializer paramTypeDeserializer, JsonDeserializer<?> paramJsonDeserializer) throws JsonMappingException { Iterator localIterator = this._factoryConfig.deserializers().iterator(); while (localIterator.hasNext()) { JsonDeserializer localJsonDeserializer = ((Deserializers)localIterator.next()).findCollectionDeserializer(paramCollectionType, paramDeserializationConfig, paramDeserializerProvider, paramBasicBeanDescription, paramBeanProperty, paramTypeDeserializer, paramJsonDeserializer); if (localJsonDeserializer != null) return localJsonDeserializer; } return null; }
public List<Project> getProjects() throws AuthenticationFailedException, ServiceNotFoundException, Exception { HttpURLConnection con = getServiceConnection("api/projects"); if (con.getResponseCode() == 401) { throw new AuthenticationFailedException(); } else if (con.getResponseCode() == 404) { throw new ServiceNotFoundException(); } JavaType type = CollectionType.construct(ArrayList.class, SimpleType.construct(Project.class)); InputStream in = con.getInputStream(); try { return (List<Project>) objectMapper.readValue(in, type); } finally { in.close(); } }
public JsonSerializer<?> buildContainerSerializer(SerializationConfig paramSerializationConfig, JavaType paramJavaType, BasicBeanDescription paramBasicBeanDescription, BeanProperty paramBeanProperty, boolean paramBoolean) { TypeSerializer localTypeSerializer = createTypeSerializer(paramSerializationConfig, paramJavaType.getContentType(), paramBeanProperty); boolean bool; if (localTypeSerializer != null) bool = false; while (true) { JsonSerializer localJsonSerializer1 = findContentSerializer(paramSerializationConfig, paramBasicBeanDescription.getClassInfo(), paramBeanProperty); if (paramJavaType.isMapLikeType()) { MapLikeType localMapLikeType = (MapLikeType)paramJavaType; JsonSerializer localJsonSerializer2 = findKeySerializer(paramSerializationConfig, paramBasicBeanDescription.getClassInfo(), paramBeanProperty); if (localMapLikeType.isTrueMapType()) { return buildMapSerializer(paramSerializationConfig, (MapType)localMapLikeType, paramBasicBeanDescription, paramBeanProperty, bool, localJsonSerializer2, localTypeSerializer, localJsonSerializer1); if (!paramBoolean) bool = usesStaticTyping(paramSerializationConfig, paramBasicBeanDescription, localTypeSerializer, paramBeanProperty); } else { return buildMapLikeSerializer(paramSerializationConfig, localMapLikeType, paramBasicBeanDescription, paramBeanProperty, bool, localJsonSerializer2, localTypeSerializer, localJsonSerializer1); } } else { if (paramJavaType.isCollectionLikeType()) { CollectionLikeType localCollectionLikeType = (CollectionLikeType)paramJavaType; if (localCollectionLikeType.isTrueCollectionType()) return buildCollectionSerializer(paramSerializationConfig, (CollectionType)localCollectionLikeType, paramBasicBeanDescription, paramBeanProperty, bool, localTypeSerializer, localJsonSerializer1); return buildCollectionLikeSerializer(paramSerializationConfig, localCollectionLikeType, paramBasicBeanDescription, paramBeanProperty, bool, localTypeSerializer, localJsonSerializer1); } if (paramJavaType.isArrayType()) return buildArraySerializer(paramSerializationConfig, (ArrayType)paramJavaType, paramBasicBeanDescription, paramBeanProperty, bool, localTypeSerializer, localJsonSerializer1); return null; bool = paramBoolean; } } }
protected JsonDeserializer<Object> _createDeserializer(DeserializationConfig paramDeserializationConfig, JavaType paramJavaType, BeanProperty paramBeanProperty) { 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); }
protected JsonDeserializer<?> _findCustomCollectionDeserializer(CollectionType paramCollectionType, DeserializationConfig paramDeserializationConfig, DeserializerProvider paramDeserializerProvider, BasicBeanDescription paramBasicBeanDescription, BeanProperty paramBeanProperty, TypeDeserializer paramTypeDeserializer, JsonDeserializer<?> paramJsonDeserializer) { Iterator localIterator = this._factoryConfig.deserializers().iterator(); while (localIterator.hasNext()) { JsonDeserializer localJsonDeserializer = ((Deserializers)localIterator.next()).findCollectionDeserializer(paramCollectionType, paramDeserializationConfig, paramDeserializerProvider, paramBasicBeanDescription, paramBeanProperty, paramTypeDeserializer, paramJsonDeserializer); if (localJsonDeserializer != null) return localJsonDeserializer; } return null; }
public final JsonDeserializer<?> findCollectionDeserializer(CollectionType paramCollectionType, DeserializationConfig paramDeserializationConfig, DeserializerProvider paramDeserializerProvider, BeanDescription paramBeanDescription, BeanProperty paramBeanProperty, TypeDeserializer paramTypeDeserializer, JsonDeserializer<?> paramJsonDeserializer) { Class localClass = paramCollectionType.getRawClass(); if (ht.class.isAssignableFrom(localClass)) { eo.class.isAssignableFrom(localClass); if (cn.class.isAssignableFrom(localClass)) return new c(paramCollectionType, paramTypeDeserializer, a(paramJsonDeserializer, paramDeserializationConfig, paramDeserializerProvider, paramBeanProperty, paramCollectionType)); dq.class.isAssignableFrom(localClass); bl.class.isAssignableFrom(localClass); ky.class.isAssignableFrom(localClass); return new c(paramCollectionType, paramTypeDeserializer, a(paramJsonDeserializer, paramDeserializationConfig, paramDeserializerProvider, paramBeanProperty, paramCollectionType)); } if (ct.class.isAssignableFrom(localClass)) { if (dc.class.isAssignableFrom(localClass)) return new d(paramCollectionType, paramTypeDeserializer, a(paramJsonDeserializer, paramDeserializationConfig, paramDeserializerProvider, paramBeanProperty, paramCollectionType)); if (du.class.isAssignableFrom(localClass)) { if (dz.class.isAssignableFrom(localClass)) { if (!Comparable.class.isAssignableFrom(paramCollectionType.getContentType().getRawClass())) throw new IllegalArgumentException("Can not handle ImmutableSortedSet with elements that are not Comparable<?> (" + localClass.getName() + ")"); return new g(paramCollectionType, paramTypeDeserializer, a(paramJsonDeserializer, paramDeserializationConfig, paramDeserializerProvider, paramBeanProperty, paramCollectionType)); } return new f(paramCollectionType, paramTypeDeserializer, a(paramJsonDeserializer, paramDeserializationConfig, paramDeserializerProvider, paramBeanProperty, paramCollectionType)); } } return null; }
public abstract JsonDeserializer<?> createCollectionDeserializer(DeserializationConfig paramDeserializationConfig, DeserializerProvider paramDeserializerProvider, CollectionType paramCollectionType, BeanProperty paramBeanProperty) throws JsonMappingException;
@Deprecated public final JsonDeserializer<?> createCollectionDeserializer(DeserializationConfig paramDeserializationConfig, CollectionType paramCollectionType, DeserializerProvider paramDeserializerProvider) throws JsonMappingException { return createCollectionDeserializer(paramDeserializationConfig, paramDeserializerProvider, paramCollectionType, null); }
public abstract JsonDeserializer<?> findCollectionDeserializer(CollectionType paramCollectionType, DeserializationConfig paramDeserializationConfig, DeserializerProvider paramDeserializerProvider, BeanDescription paramBeanDescription, BeanProperty paramBeanProperty, TypeDeserializer paramTypeDeserializer, JsonDeserializer<?> paramJsonDeserializer) throws JsonMappingException;
public JsonDeserializer<?> findCollectionDeserializer(CollectionType paramCollectionType, DeserializationConfig paramDeserializationConfig, DeserializerProvider paramDeserializerProvider, BeanDescription paramBeanDescription, BeanProperty paramBeanProperty, TypeDeserializer paramTypeDeserializer, JsonDeserializer<?> paramJsonDeserializer) throws JsonMappingException { return null; }
public JsonSerializer<?> findCollectionSerializer(SerializationConfig paramSerializationConfig, CollectionType paramCollectionType, BeanDescription paramBeanDescription, BeanProperty paramBeanProperty, TypeSerializer paramTypeSerializer, JsonSerializer<Object> paramJsonSerializer) { return findSerializer(paramSerializationConfig, paramCollectionType, paramBeanDescription, paramBeanProperty); }
protected abstract JsonDeserializer<?> _findCustomCollectionDeserializer(CollectionType paramCollectionType, DeserializationConfig paramDeserializationConfig, DeserializerProvider paramDeserializerProvider, BasicBeanDescription paramBasicBeanDescription, BeanProperty paramBeanProperty, TypeDeserializer paramTypeDeserializer, JsonDeserializer<?> paramJsonDeserializer) throws JsonMappingException;
public JsonSerializer<?> findCollectionSerializer(SerializationConfig paramSerializationConfig, CollectionType paramCollectionType, BeanDescription paramBeanDescription, BeanProperty paramBeanProperty, TypeSerializer paramTypeSerializer, JsonSerializer<Object> paramJsonSerializer) { return null; }
public JsonDeserializer<?> findCollectionDeserializer(CollectionType paramCollectionType, DeserializationConfig paramDeserializationConfig, DeserializerProvider paramDeserializerProvider, BeanDescription paramBeanDescription, BeanProperty paramBeanProperty, TypeDeserializer paramTypeDeserializer, JsonDeserializer<?> paramJsonDeserializer) { if (this._classMappings == null) return null; return (JsonDeserializer)this._classMappings.get(new ClassKey(paramCollectionType.getRawClass())); }
public JsonDeserializer<?> findCollectionDeserializer(CollectionType paramCollectionType, DeserializationConfig paramDeserializationConfig, DeserializerProvider paramDeserializerProvider, BeanDescription paramBeanDescription, BeanProperty paramBeanProperty, TypeDeserializer paramTypeDeserializer, JsonDeserializer<?> paramJsonDeserializer) { return null; }
public d(CollectionType paramCollectionType, TypeDeserializer paramTypeDeserializer, JsonDeserializer<?> paramJsonDeserializer) { super(paramCollectionType, paramTypeDeserializer, paramJsonDeserializer); }
protected a(CollectionType paramCollectionType, TypeDeserializer paramTypeDeserializer, JsonDeserializer<?> paramJsonDeserializer) { this.a = paramCollectionType; this.c = paramTypeDeserializer; this.b = paramJsonDeserializer; }