what-the-bank/sources/o/C1015Tu.java

81 lines
2.5 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package o;
import com.google.gson.Gson;
import com.google.gson.TypeAdapter;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonToken;
import com.google.gson.stream.JsonWriter;
import java.io.IOException;
import java.util.List;
/* renamed from: o.Tu, reason: case insensitive filesystem */
/* loaded from: classes.dex */
public final class C1015Tu extends TypeAdapter implements HJa {
private PYE a;
private InterfaceC15734iCu c;
private Gson d;
public C1015Tu(Gson gson, InterfaceC15734iCu interfaceC15734iCu, PYE pye) {
this.d = gson;
this.c = interfaceC15734iCu;
this.a = pye;
}
@Override // com.google.gson.TypeAdapter
public final void write(JsonWriter jsonWriter, Object obj) throws IOException {
if (obj == null) {
jsonWriter.nullValue();
return;
}
TG tg = (TG) obj;
Gson gson = this.d;
PYE pye = this.a;
jsonWriter.beginObject();
String str = tg.a;
pye.c(jsonWriter, 352);
String str2 = tg.a;
DTh.b(gson, String.class, str2).write(jsonWriter, str2);
if (tg != tg.d) {
pye.c(jsonWriter, 351);
TC tc = new TC();
List<String> list = tg.d;
DTh.a(gson, tc, list).write(jsonWriter, list);
}
jsonWriter.endObject();
}
@Override // com.google.gson.TypeAdapter
/* renamed from: read */
public final Object read2(JsonReader jsonReader) throws IOException {
if (jsonReader.peek() == JsonToken.NULL) {
jsonReader.skipValue();
return null;
}
TG tg = new TG();
Gson gson = this.d;
InterfaceC15734iCu interfaceC15734iCu = this.c;
jsonReader.beginObject();
while (jsonReader.hasNext()) {
int e = interfaceC15734iCu.e(jsonReader);
boolean z = jsonReader.peek() != JsonToken.NULL;
if (e != 88) {
if (e != 344) {
jsonReader.skipValue();
} else if (z) {
tg.a = (String) gson.getAdapter(String.class).read2(jsonReader);
} else {
tg.a = null;
jsonReader.nextNull();
}
} else if (z) {
tg.d = (List) gson.getAdapter(new TC()).read2(jsonReader);
} else {
tg.d = null;
jsonReader.nextNull();
}
}
jsonReader.endObject();
return tg;
}
}