package ai;

import java.util.ArrayList;
import java.util.List;

/* loaded from: classes4.dex */
public class a {

    /* renamed from: a, reason: collision with root package name */
    private final List f396a = new ArrayList();

    /* renamed from: ai.a$a, reason: collision with other inner class name */
    /* loaded from: classes4.dex */
    private static final class C0016a {

        /* renamed from: a, reason: collision with root package name */
        private final Class f397a;

        /* renamed from: b, reason: collision with root package name */
        final jh.d f398b;

        C0016a(Class cls, jh.d dVar) {
            this.f397a = cls;
            this.f398b = dVar;
        }

        boolean a(Class cls) {
            return this.f397a.isAssignableFrom(cls);
        }
    }

    public synchronized void a(Class cls, jh.d dVar) {
        this.f396a.add(new C0016a(cls, dVar));
    }

    public synchronized jh.d b(Class cls) {
        for (C0016a c0016a : this.f396a) {
            if (c0016a.a(cls)) {
                return c0016a.f398b;
            }
        }
        return null;
    }
}
