package pq;

import java.lang.reflect.Type;
import java.util.Collection;
import java.util.Collections;
import java.util.HashSet;
import java.util.Set;

/* loaded from: classes3.dex */
public class b {

    /* renamed from: b, reason: collision with root package name */
    private boolean f33050b = false;

    /* renamed from: c, reason: collision with root package name */
    private Set f33051c = new HashSet(128);

    /* renamed from: a, reason: collision with root package name */
    private final tq.a f33049a = new tq.a(this);

    Class a(Class cls) {
        while (!this.f33051c.contains(cls)) {
            cls = cls.getSuperclass();
            if (cls == Object.class) {
                return null;
            }
        }
        return cls;
    }

    public rq.a b(Class cls) {
        Class a10 = a(cls);
        if (a10 != null) {
            return this.f33049a.c(a10);
        }
        throw new IllegalArgumentException("Entity is not registered: " + cls);
    }

    public rq.c c(Type type) {
        return this.f33049a.d(type);
    }

    public Collection d() {
        return Collections.unmodifiableSet(this.f33051c);
    }

    public boolean e(Class cls) {
        return a(cls) != null;
    }

    public boolean f() {
        return this.f33050b;
    }

    public void g(Class cls) {
        this.f33051c.add(cls);
    }

    public e h(c cVar) {
        return new e(this, cVar);
    }
}
