58 lines
1.7 KiB
Java
58 lines
1.7 KiB
Java
package o;
|
|
|
|
import java.util.ArrayList;
|
|
import java.util.List;
|
|
|
|
/* loaded from: classes.dex */
|
|
public final class KOW {
|
|
public final List<RVV<?, ?>> c = new ArrayList();
|
|
|
|
public final <Z, R> yBU<Z, R> b(Class<Z> cls, Class<R> cls2) {
|
|
synchronized (this) {
|
|
if (cls2.isAssignableFrom(cls)) {
|
|
return onb.e();
|
|
}
|
|
for (RVV<?, ?> rvv : this.c) {
|
|
if (rvv.d.isAssignableFrom(cls) && cls2.isAssignableFrom(rvv.b)) {
|
|
return (yBU<Z, R>) rvv.a;
|
|
}
|
|
}
|
|
StringBuilder sb = new StringBuilder();
|
|
sb.append("No transcoder registered to transcode from ");
|
|
sb.append(cls);
|
|
sb.append(" to ");
|
|
sb.append(cls2);
|
|
throw new IllegalArgumentException(sb.toString());
|
|
}
|
|
}
|
|
|
|
public final <Z, R> List<Class<R>> e(Class<Z> cls, Class<R> cls2) {
|
|
synchronized (this) {
|
|
ArrayList arrayList = new ArrayList();
|
|
if (cls2.isAssignableFrom(cls)) {
|
|
arrayList.add(cls2);
|
|
return arrayList;
|
|
}
|
|
for (RVV<?, ?> rvv : this.c) {
|
|
if (rvv.d.isAssignableFrom(cls) && cls2.isAssignableFrom(rvv.b) && !arrayList.contains(rvv.b)) {
|
|
arrayList.add(rvv.b);
|
|
}
|
|
}
|
|
return arrayList;
|
|
}
|
|
}
|
|
|
|
/* loaded from: classes.dex */
|
|
public static final class RVV<Z, R> {
|
|
final yBU<Z, R> a;
|
|
final Class<R> b;
|
|
Class<Z> d;
|
|
|
|
public RVV(Class<Z> cls, Class<R> cls2, yBU<Z, R> ybu) {
|
|
this.d = cls;
|
|
this.b = cls2;
|
|
this.a = ybu;
|
|
}
|
|
}
|
|
}
|