package i0; import f0.e; import f0.w; import i0.c; import i0.e; import i0.h; import java.lang.annotation.Annotation; import java.lang.reflect.Method; import java.lang.reflect.Type; import java.util.List; import java.util.Map; import java.util.Objects; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.Executor; import okhttp3.RequestBody; import okhttp3.ResponseBody; /* compiled from: Retrofit */ public final class z { public final Map> a = new ConcurrentHashMap(); public final e.a b; /* renamed from: c reason: collision with root package name */ public final w f2844c; public final List d; public final List e; public final boolean f; public z(e.a aVar, w wVar, List list, List list2, Executor executor, boolean z2) { this.b = aVar; this.f2844c = wVar; this.d = list; this.e = list2; this.f = z2; } public e a(Type type, Annotation[] annotationArr) { Objects.requireNonNull(type, "returnType == null"); Objects.requireNonNull(annotationArr, "annotations == null"); int indexOf = this.e.indexOf(null) + 1; int size = this.e.size(); for (int i = indexOf; i < size; i++) { e a = this.e.get(i).a(type, annotationArr, this); if (a != null) { return a; } } StringBuilder sb = new StringBuilder("Could not locate call adapter for "); sb.append(type); sb.append(".\n"); sb.append(" Tried:"); int size2 = this.e.size(); while (indexOf < size2) { sb.append("\n * "); sb.append(this.e.get(indexOf).getClass().getName()); indexOf++; } throw new IllegalArgumentException(sb.toString()); } public a0 b(Method method) { a0 a0Var; a0 a0Var2 = this.a.get(method); if (a0Var2 != null) { return a0Var2; } synchronized (this.a) { a0Var = this.a.get(method); if (a0Var == null) { a0Var = a0.b(this, method); this.a.put(method, a0Var); } } return a0Var; } public h c(Type type, Annotation[] annotationArr, Annotation[] annotationArr2) { Objects.requireNonNull(type, "type == null"); Objects.requireNonNull(annotationArr, "parameterAnnotations == null"); Objects.requireNonNull(annotationArr2, "methodAnnotations == null"); int indexOf = this.d.indexOf(null) + 1; int size = this.d.size(); for (int i = indexOf; i < size; i++) { h hVar = (h) this.d.get(i).requestBodyConverter(type, annotationArr, annotationArr2, this); if (hVar != null) { return hVar; } } StringBuilder sb = new StringBuilder("Could not locate RequestBody converter for "); sb.append(type); sb.append(".\n"); sb.append(" Tried:"); int size2 = this.d.size(); while (indexOf < size2) { sb.append("\n * "); sb.append(this.d.get(indexOf).getClass().getName()); indexOf++; } throw new IllegalArgumentException(sb.toString()); } public h d(Type type, Annotation[] annotationArr) { Objects.requireNonNull(type, "type == null"); Objects.requireNonNull(annotationArr, "annotations == null"); int indexOf = this.d.indexOf(null) + 1; int size = this.d.size(); for (int i = indexOf; i < size; i++) { h hVar = (h) this.d.get(i).responseBodyConverter(type, annotationArr, this); if (hVar != null) { return hVar; } } StringBuilder sb = new StringBuilder("Could not locate ResponseBody converter for "); sb.append(type); sb.append(".\n"); sb.append(" Tried:"); int size2 = this.d.size(); while (indexOf < size2) { sb.append("\n * "); sb.append(this.d.get(indexOf).getClass().getName()); indexOf++; } throw new IllegalArgumentException(sb.toString()); } public h e(Type type, Annotation[] annotationArr) { Objects.requireNonNull(type, "type == null"); Objects.requireNonNull(annotationArr, "annotations == null"); int size = this.d.size(); for (int i = 0; i < size; i++) { h hVar = (h) this.d.get(i).stringConverter(type, annotationArr, this); if (hVar != null) { return hVar; } } return c.d.a; } }