package ko;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Set;

/* loaded from: classes3.dex */
public final class a0 {

    /* renamed from: a, reason: collision with root package name */
    public static final a0 f26060a = new a0();

    /* loaded from: classes3.dex */
    static final class a extends kotlin.jvm.internal.v implements dn.l {

        /* renamed from: p, reason: collision with root package name */
        public static final a f26061p = new a();

        a() {
            super(1);
        }

        @Override // dn.l
        /* renamed from: a, reason: merged with bridge method [inline-methods] */
        public final CharSequence invoke(String it) {
            kotlin.jvm.internal.t.g(it, "it");
            return a0.f26060a.c(it);
        }
    }

    private a0() {
    }

    /* JADX INFO: Access modifiers changed from: private */
    public final String c(String str) {
        if (str.length() <= 1) {
            return str;
        }
        return 'L' + str + ';';
    }

    public final String[] b(String... signatures) {
        kotlin.jvm.internal.t.g(signatures, "signatures");
        ArrayList arrayList = new ArrayList(signatures.length);
        for (String str : signatures) {
            arrayList.add("<init>(" + str + ")V");
        }
        return (String[]) arrayList.toArray(new String[0]);
    }

    public final Set d(String internalName, String... signatures) {
        kotlin.jvm.internal.t.g(internalName, "internalName");
        kotlin.jvm.internal.t.g(signatures, "signatures");
        LinkedHashSet linkedHashSet = new LinkedHashSet();
        for (String str : signatures) {
            linkedHashSet.add(internalName + '.' + str);
        }
        return linkedHashSet;
    }

    public final Set e(String name, String... signatures) {
        kotlin.jvm.internal.t.g(name, "name");
        kotlin.jvm.internal.t.g(signatures, "signatures");
        return d(h(name), (String[]) Arrays.copyOf(signatures, signatures.length));
    }

    public final Set f(String name, String... signatures) {
        kotlin.jvm.internal.t.g(name, "name");
        kotlin.jvm.internal.t.g(signatures, "signatures");
        return d(i(name), (String[]) Arrays.copyOf(signatures, signatures.length));
    }

    public final String g(String name) {
        kotlin.jvm.internal.t.g(name, "name");
        return "java/util/function/" + name;
    }

    public final String h(String name) {
        kotlin.jvm.internal.t.g(name, "name");
        return "java/lang/" + name;
    }

    public final String i(String name) {
        kotlin.jvm.internal.t.g(name, "name");
        return "java/util/" + name;
    }

    public final String j(String name, List parameters, String ret) {
        String m02;
        kotlin.jvm.internal.t.g(name, "name");
        kotlin.jvm.internal.t.g(parameters, "parameters");
        kotlin.jvm.internal.t.g(ret, "ret");
        StringBuilder sb2 = new StringBuilder();
        sb2.append(name);
        sb2.append('(');
        m02 = sm.c0.m0(parameters, "", null, null, 0, null, a.f26061p, 30, null);
        sb2.append(m02);
        sb2.append(')');
        sb2.append(c(ret));
        return sb2.toString();
    }

    public final String k(String internalName, String jvmDescriptor) {
        kotlin.jvm.internal.t.g(internalName, "internalName");
        kotlin.jvm.internal.t.g(jvmDescriptor, "jvmDescriptor");
        return internalName + '.' + jvmDescriptor;
    }
}
