package g.e.b.g0;

import java.lang.reflect.AccessibleObject;
import java.lang.reflect.Method;

/* JADX INFO: loaded from: classes.dex */
public abstract class z {
    public static final z a;

    public class a extends z {

        /* JADX INFO: renamed from: b, reason: collision with root package name */
        public final /* synthetic */ Method f4165b;

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        public a(Method method) {
            super(null);
            this.f4165b = method;
        }

        @Override // g.e.b.g0.z
        public boolean a(AccessibleObject accessibleObject, Object obj) {
            try {
                return ((Boolean) this.f4165b.invoke(accessibleObject, obj)).booleanValue();
            } catch (Exception e2) {
                throw new RuntimeException("Failed invoking canAccess", e2);
            }
        }
    }

    public class b extends z {
        public b() {
            super(null);
        }

        @Override // g.e.b.g0.z
        public boolean a(AccessibleObject accessibleObject, Object obj) {
            return true;
        }
    }

    static {
        z aVar;
        if (t.a()) {
            try {
                aVar = new a(AccessibleObject.class.getDeclaredMethod("canAccess", Object.class));
            } catch (NoSuchMethodException unused) {
                aVar = null;
            }
        } else {
            aVar = null;
        }
        if (aVar == null) {
            aVar = new b();
        }
        a = aVar;
    }

    public z(y yVar) {
    }

    public abstract boolean a(AccessibleObject accessibleObject, Object obj);
}
