package k4;

import java.util.concurrent.atomic.AtomicLong;

/* JADX INFO: loaded from: classes3.dex */
public final class J {

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public static final AtomicLong f19806d = new AtomicLong();

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public final String f19807a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public final String f19808b;

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public final long f19809c;

    public J(String str, String str2, long j4) {
        A4.g.o(str, "typeName");
        A4.g.l(!str.isEmpty(), "empty type");
        this.f19807a = str;
        this.f19808b = str2;
        this.f19809c = j4;
    }

    public static J a(Class cls, String str) {
        String simpleName = cls.getSimpleName();
        if (simpleName.isEmpty()) {
            simpleName = cls.getName().substring(cls.getPackage().getName().length() + 1);
        }
        return new J(simpleName, str, f19806d.incrementAndGet());
    }

    public final String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(this.f19807a + "<" + this.f19809c + ">");
        String str = this.f19808b;
        if (str != null) {
            sb.append(": (");
            sb.append(str);
            sb.append(')');
        }
        return sb.toString();
    }
}
