package g.h0.c;

import java.io.Serializable;
import java.lang.annotation.Annotation;
import java.util.List;
import java.util.Map;
import java.util.Objects;

/* JADX INFO: compiled from: CallableReference.java */
/* JADX INFO: loaded from: classes.dex */
public abstract class c implements g.k0.b, Serializable {
    public static final Object NO_RECEIVER = a.f4101b;
    private final boolean isTopLevel;
    private final String name;
    private final Class owner;
    public final Object receiver;
    private transient g.k0.b reflected;
    private final String signature;

    /* JADX INFO: compiled from: CallableReference.java */
    public static class a implements Serializable {

        /* JADX INFO: renamed from: b, reason: collision with root package name */
        public static final a f4101b = new a();
    }

    public c() {
        this(NO_RECEIVER);
    }

    @Override // g.k0.b
    public Object call(Object... objArr) {
        return getReflected().call(objArr);
    }

    @Override // g.k0.b
    public Object callBy(Map map) {
        return getReflected().callBy(map);
    }

    public g.k0.b compute() {
        g.k0.b bVar = this.reflected;
        if (bVar != null) {
            return bVar;
        }
        g.k0.b bVarComputeReflected = computeReflected();
        this.reflected = bVarComputeReflected;
        return bVarComputeReflected;
    }

    public abstract g.k0.b computeReflected();

    @Override // g.k0.a
    public List<Annotation> getAnnotations() {
        return getReflected().getAnnotations();
    }

    public Object getBoundReceiver() {
        return this.receiver;
    }

    public String getName() {
        return this.name;
    }

    public g.k0.d getOwner() {
        Class cls = this.owner;
        if (cls == null) {
            return null;
        }
        if (!this.isTopLevel) {
            return b0.a(cls);
        }
        Objects.requireNonNull(b0.a);
        return new r(cls, "");
    }

    @Override // g.k0.b
    public List<g.k0.h> getParameters() {
        return getReflected().getParameters();
    }

    public g.k0.b getReflected() {
        g.k0.b bVarCompute = compute();
        if (bVarCompute != this) {
            return bVarCompute;
        }
        throw new g.h0.a();
    }

    @Override // g.k0.b
    public g.k0.l getReturnType() {
        return getReflected().getReturnType();
    }

    public String getSignature() {
        return this.signature;
    }

    @Override // g.k0.b
    public List<?> getTypeParameters() {
        return getReflected().getTypeParameters();
    }

    @Override // g.k0.b
    public g.k0.m getVisibility() {
        return getReflected().getVisibility();
    }

    @Override // g.k0.b
    public boolean isAbstract() {
        return getReflected().isAbstract();
    }

    @Override // g.k0.b
    public boolean isFinal() {
        return getReflected().isFinal();
    }

    @Override // g.k0.b
    public boolean isOpen() {
        return getReflected().isOpen();
    }

    @Override // g.k0.b
    public boolean isSuspend() {
        return getReflected().isSuspend();
    }

    public c(Object obj) {
        this(obj, null, null, null, false);
    }

    public c(Object obj, Class cls, String str, String str2, boolean z) {
        this.receiver = obj;
        this.owner = cls;
        this.name = str;
        this.signature = str2;
        this.isTopLevel = z;
    }
}
