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

38 lines
1.3 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package o;
import java.lang.annotation.Annotation;
/* loaded from: classes5.dex */
public final class fOV {
public static <T> T c(Object obj, Class<T> cls) {
while (!(obj instanceof fPE)) {
if (obj instanceof fPC) {
obj = ((fPC) obj).y_();
} else {
throw new IllegalStateException(String.format("Given component holder %s does not implement %s or %s", obj.getClass(), fPE.class, fPC.class));
}
}
if (obj instanceof InterfaceC13047fPB) {
Annotation[] annotations = cls.getAnnotations();
int length = annotations.length;
boolean z = false;
int i = 0;
while (true) {
if (i >= length) {
break;
}
if (annotations[i].annotationType().getCanonicalName().contentEquals("o.fOZ")) {
z = true;
break;
}
i++;
}
Object[] objArr = {cls.getCanonicalName()};
if (!(!z)) {
throw new IllegalStateException(String.format("Interface, %s, annotated with @EarlyEntryPoint should be called with EarlyEntryPoints.get() rather than EntryPoints.get()", objArr));
}
}
return cls.cast(obj);
}
}