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

63 lines
2.2 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.TypeAdapterFactory;
import com.google.gson.reflect.TypeToken;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import java.io.IOException;
import java.lang.reflect.ParameterizedType;
/* renamed from: o.gp, reason: case insensitive filesystem */
/* loaded from: classes.dex */
public class C15387gp<V> {
public V b;
public C15387gp() {
}
public C15387gp(V v) {
this.b = v;
}
/* renamed from: o.gp$Sts */
/* loaded from: classes.dex */
public static class Sts implements TypeAdapterFactory {
@Override // com.google.gson.TypeAdapterFactory
public final <T> TypeAdapter<T> create(Gson gson, TypeToken<T> typeToken) {
if (typeToken.getRawType() != C15387gp.class) {
return null;
}
return new TypeAdapter<C15387gp<V>>(this, gson.getDelegateAdapter(this, TypeToken.get(((ParameterizedType) typeToken.getType()).getActualTypeArguments()[0]))) { // from class: o.gp.Sts.3
private TypeAdapter a;
private Sts c;
{
this.c = this;
this.a = r2;
}
@Override // com.google.gson.TypeAdapter
public final /* synthetic */ void write(JsonWriter jsonWriter, Object obj) throws IOException {
C15387gp c15387gp = (C15387gp) obj;
Object obj2 = c15387gp == null ? null : c15387gp.b;
if (obj2 == null && !jsonWriter.getSerializeNulls()) {
jsonWriter.setSerializeNulls(true);
jsonWriter.nullValue();
jsonWriter.setSerializeNulls(false);
return;
}
this.a.write(jsonWriter, obj2);
}
@Override // com.google.gson.TypeAdapter
/* renamed from: read */
public final /* synthetic */ Object read2(JsonReader jsonReader) throws IOException {
return new C15387gp(this.a.read2(jsonReader));
}
};
}
}
}