package p018f1;

import java.lang.reflect.Method;
import p039m1.C1470g;

/* renamed from: f1.h */
/* loaded from: classes.dex */
public final class C0720h {

    /* renamed from: a */
    public static final C0720h f2300a = new C0720h();

    /* renamed from: b */
    public static final C0721a f2301b = new C0721a(null, null, null);

    /* renamed from: c */
    public static C0721a f2302c;

    /* renamed from: f1.h$a */
    /* loaded from: classes.dex */
    public static final class C0721a {

        /* renamed from: a */
        public final Method f2303a;

        /* renamed from: b */
        public final Method f2304b;

        /* renamed from: c */
        public final Method f2305c;

        public C0721a(Method method, Method method2, Method method3) {
            this.f2303a = method;
            this.f2304b = method2;
            this.f2305c = method3;
        }
    }

    /* renamed from: a */
    public final C0721a m3056a(AbstractC0713a abstractC0713a) {
        try {
            C0721a c0721a = new C0721a(Class.class.getDeclaredMethod("getModule", new Class[0]), abstractC0713a.getClass().getClassLoader().loadClass("java.lang.Module").getDeclaredMethod("getDescriptor", new Class[0]), abstractC0713a.getClass().getClassLoader().loadClass("java.lang.module.ModuleDescriptor").getDeclaredMethod("name", new Class[0]));
            f2302c = c0721a;
            return c0721a;
        } catch (Exception unused) {
            C0721a c0721a2 = f2301b;
            f2302c = c0721a2;
            return c0721a2;
        }
    }

    /* renamed from: b */
    public final String m3055b(AbstractC0713a abstractC0713a) {
        C1470g.m1292e(abstractC0713a, "continuation");
        C0721a c0721a = f2302c;
        if (c0721a == null) {
            c0721a = m3056a(abstractC0713a);
        }
        if (c0721a == f2301b) {
            return null;
        }
        Method method = c0721a.f2303a;
        Object invoke = method != null ? method.invoke(abstractC0713a.getClass(), new Object[0]) : null;
        if (invoke == null) {
            return null;
        }
        Method method2 = c0721a.f2304b;
        Object invoke2 = method2 != null ? method2.invoke(invoke, new Object[0]) : null;
        if (invoke2 == null) {
            return null;
        }
        Method method3 = c0721a.f2305c;
        Object invoke3 = method3 != null ? method3.invoke(invoke2, new Object[0]) : null;
        if (invoke3 instanceof String) {
            return (String) invoke3;
        }
        return null;
    }
}