package o; import java.util.ArrayList; import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Map; /* loaded from: classes.dex */ public final class KFY { public final List c = new ArrayList(); private final Map>> d = new HashMap(); public final List> a(Class cls, Class cls2) { ArrayList arrayList; synchronized (this) { arrayList = new ArrayList(); Iterator it = this.c.iterator(); while (it.hasNext()) { List> list = this.d.get(it.next()); if (list != null) { for (IeS ieS : list) { if (ieS.d(cls, cls2)) { arrayList.add(ieS.c); } } } } } return arrayList; } public final List> d(Class cls, Class cls2) { ArrayList arrayList; synchronized (this) { arrayList = new ArrayList(); Iterator it = this.c.iterator(); while (it.hasNext()) { List> list = this.d.get(it.next()); if (list != null) { for (IeS ieS : list) { if (ieS.d(cls, cls2) && !arrayList.contains(ieS.e)) { arrayList.add(ieS.e); } } } } } return arrayList; } public final List> a(String str) { List> list; synchronized (this) { if (!this.c.contains(str)) { this.c.add(str); } list = this.d.get(str); if (list == null) { list = new ArrayList<>(); this.d.put(str, list); } } return list; } /* loaded from: classes.dex */ public static class IeS { private final Class b; final iYP c; final Class e; public IeS(Class cls, Class cls2, iYP iyp) { this.b = cls; this.e = cls2; this.c = iyp; } public final boolean d(Class cls, Class cls2) { return this.b.isAssignableFrom(cls) && cls2.isAssignableFrom(this.e); } } }