- 28,932 files - Full Java source code - Smali files - Resources Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
32 lines
1.0 KiB
Java
32 lines
1.0 KiB
Java
package com.amazonaws.transform;
|
|
|
|
import com.amazonaws.util.json.AwsJsonReader;
|
|
import com.amazonaws.util.json.AwsJsonToken;
|
|
import java.util.ArrayList;
|
|
import java.util.List;
|
|
|
|
/* loaded from: classes.dex */
|
|
public class ListUnmarshaller<T> implements Unmarshaller<List<T>, JsonUnmarshallerContext> {
|
|
public final Unmarshaller itemUnmarshaller;
|
|
|
|
public ListUnmarshaller(Unmarshaller unmarshaller) {
|
|
this.itemUnmarshaller = unmarshaller;
|
|
}
|
|
|
|
@Override // com.amazonaws.transform.Unmarshaller
|
|
public List unmarshall(JsonUnmarshallerContext jsonUnmarshallerContext) {
|
|
AwsJsonReader reader = jsonUnmarshallerContext.getReader();
|
|
if (reader.peek() == AwsJsonToken.VALUE_NULL) {
|
|
reader.skipValue();
|
|
return null;
|
|
}
|
|
ArrayList arrayList = new ArrayList();
|
|
reader.beginArray();
|
|
while (reader.hasNext()) {
|
|
arrayList.add(this.itemUnmarshaller.unmarshall(jsonUnmarshallerContext));
|
|
}
|
|
reader.endArray();
|
|
return arrayList;
|
|
}
|
|
}
|