118 lines
3.2 KiB
Java
118 lines
3.2 KiB
Java
package i0;
|
|
|
|
import f0.z;
|
|
import i0.e;
|
|
import java.io.IOException;
|
|
import java.lang.annotation.Annotation;
|
|
import java.lang.reflect.ParameterizedType;
|
|
import java.lang.reflect.Type;
|
|
import java.util.concurrent.Executor;
|
|
/* compiled from: DefaultCallAdapterFactory */
|
|
public final class i extends e.a {
|
|
public final Executor a;
|
|
|
|
/* compiled from: DefaultCallAdapterFactory */
|
|
public class a implements e<Object, d<?>> {
|
|
public final /* synthetic */ Type a;
|
|
public final /* synthetic */ Executor b;
|
|
|
|
public a(i iVar, Type type, Executor executor) {
|
|
this.a = type;
|
|
this.b = executor;
|
|
}
|
|
|
|
@Override // i0.e
|
|
public Type a() {
|
|
return this.a;
|
|
}
|
|
|
|
/* Return type fixed from 'java.lang.Object' to match base method */
|
|
/* JADX DEBUG: Method arguments types fixed to match base method, original types: [i0.d] */
|
|
@Override // i0.e
|
|
public d<?> b(d<Object> dVar) {
|
|
Executor executor = this.b;
|
|
return executor == null ? dVar : new b(executor, dVar);
|
|
}
|
|
}
|
|
|
|
/* compiled from: DefaultCallAdapterFactory */
|
|
public static final class b<T> implements d<T> {
|
|
public final Executor i;
|
|
public final d<T> j;
|
|
|
|
/* compiled from: DefaultCallAdapterFactory */
|
|
public class a implements f<T> {
|
|
public final /* synthetic */ f a;
|
|
|
|
public a(f fVar) {
|
|
this.a = fVar;
|
|
}
|
|
|
|
@Override // i0.f
|
|
public void a(d<T> dVar, Throwable th) {
|
|
b.this.i.execute(new a(this, this.a, th));
|
|
}
|
|
|
|
@Override // i0.f
|
|
public void b(d<T> dVar, x<T> xVar) {
|
|
b.this.i.execute(new b(this, this.a, xVar));
|
|
}
|
|
}
|
|
|
|
public b(Executor executor, d<T> dVar) {
|
|
this.i = executor;
|
|
this.j = dVar;
|
|
}
|
|
|
|
@Override // i0.d
|
|
public void B(f<T> fVar) {
|
|
this.j.B(new a(fVar));
|
|
}
|
|
|
|
@Override // i0.d
|
|
/* renamed from: K */
|
|
public d<T> clone() {
|
|
return new b(this.i, this.j.K());
|
|
}
|
|
|
|
@Override // i0.d
|
|
public z c() {
|
|
return this.j.c();
|
|
}
|
|
|
|
@Override // i0.d
|
|
public void cancel() {
|
|
this.j.cancel();
|
|
}
|
|
|
|
@Override // i0.d
|
|
public boolean d() {
|
|
return this.j.d();
|
|
}
|
|
|
|
@Override // i0.d
|
|
public x<T> execute() throws IOException {
|
|
return this.j.execute();
|
|
}
|
|
}
|
|
|
|
public i(Executor executor) {
|
|
this.a = executor;
|
|
}
|
|
|
|
@Override // i0.e.a
|
|
public e<?, ?> a(Type type, Annotation[] annotationArr, z zVar) {
|
|
Executor executor = null;
|
|
if (d0.f(type) != d.class) {
|
|
return null;
|
|
}
|
|
if (type instanceof ParameterizedType) {
|
|
Type e = d0.e(0, (ParameterizedType) type);
|
|
if (!d0.i(annotationArr, b0.class)) {
|
|
executor = this.a;
|
|
}
|
|
return new a(this, e, executor);
|
|
}
|
|
throw new IllegalArgumentException("Call return type must be parameterized as Call<Foo> or Call<? extends Foo>");
|
|
}
|
|
}
|