package j.p0.d;

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

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

    /* JADX INFO: compiled from: CallableReference.java */
    private static class a implements Serializable {
        private static final a b = new a();

        private a() {
        }
    }

    public e() {
        this(NO_RECEIVER);
    }

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

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

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

    protected abstract j.s0.b computeReflected();

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

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

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

    public j.s0.d getOwner() {
        Class cls = this.owner;
        if (cls == null) {
            return null;
        }
        return this.isTopLevel ? d0.c(cls) : d0.b(cls);
    }

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

    protected j.s0.b getReflected() {
        j.s0.b bVarCompute = compute();
        if (bVarCompute != this) {
            return bVarCompute;
        }
        throw new j.p0.b();
    }

    @Override // j.s0.b
    public j.s0.l getReturnType() {
        return getReflected().getReturnType();
    }

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

    @Override // j.s0.b
    public List<Object> getTypeParameters() {
        return getReflected().getTypeParameters();
    }

    @Override // j.s0.b
    public j.s0.m getVisibility() {
        return getReflected().getVisibility();
    }

    @Override // j.s0.b
    public boolean isAbstract() {
        return getReflected().isAbstract();
    }

    @Override // j.s0.b
    public boolean isFinal() {
        return getReflected().isFinal();
    }

    @Override // j.s0.b
    public boolean isOpen() {
        return getReflected().isOpen();
    }

    @Override // j.s0.b
    public boolean isSuspend() {
        return getReflected().isSuspend();
    }

    protected e(Object obj) {
        this(obj, null, null, null, false);
    }

    protected e(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;
    }
}
