discord-jadx/app/src/main/java/h0/q.java

40 lines
1.3 KiB
Java
Raw Normal View History

2021-10-19 23:48:27 +00:00
package h0;
2021-06-27 20:44:35 +00:00
2021-10-19 23:48:27 +00:00
import h0.h;
2021-06-27 20:44:35 +00:00
import java.io.IOException;
import java.lang.annotation.Annotation;
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
import java.util.Optional;
import okhttp3.ResponseBody;
import org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement;
/* compiled from: OptionalConverterFactory */
@IgnoreJRERequirement
public final class q extends h.a {
public static final h.a a = new q();
/* compiled from: OptionalConverterFactory */
@IgnoreJRERequirement
public static final class a<T> implements h<ResponseBody, Optional<T>> {
public final h<ResponseBody, T> a;
public a(h<ResponseBody, T> hVar) {
this.a = hVar;
}
/* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */
2021-10-19 23:48:27 +00:00
@Override // h0.h
2021-06-27 20:44:35 +00:00
public Object convert(ResponseBody responseBody) throws IOException {
return Optional.ofNullable(this.a.convert(responseBody));
}
}
2021-10-19 23:48:27 +00:00
@Override // h0.h.a
2021-08-04 22:02:59 +00:00
public h<ResponseBody, ?> responseBodyConverter(Type type, Annotation[] annotationArr, y yVar) {
2021-06-27 20:44:35 +00:00
if (h.a.getRawType(type) != Optional.class) {
return null;
}
2021-08-04 22:02:59 +00:00
return new a(yVar.d(h.a.getParameterUpperBound(0, (ParameterizedType) type), annotationArr));
2021-06-27 20:44:35 +00:00
}
}