package kotlin.reflect.w.internal.y0.h;

import g.a.a.a.a;

/* JADX INFO: loaded from: classes2.dex */
public final class e implements Comparable<e> {

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

    /* JADX INFO: renamed from: m, reason: collision with root package name */
    public final boolean f8196m;

    public e(String str, boolean z2) {
        if (str == null) {
            b(0);
            throw null;
        }
        this.f8195f = str;
        this.f8196m = z2;
    }

    public static /* synthetic */ void b(int i2) {
        String str = (i2 == 1 || i2 == 2 || i2 == 3 || i2 == 4) ? "@NotNull method %s.%s must not return null" : "Argument for @NotNull parameter '%s' of %s.%s must not be null";
        Object[] objArr = new Object[(i2 == 1 || i2 == 2 || i2 == 3 || i2 == 4) ? 2 : 3];
        if (i2 == 1 || i2 == 2 || i2 == 3 || i2 == 4) {
            objArr[0] = "kotlin/reflect/jvm/internal/impl/name/Name";
        } else {
            objArr[0] = "name";
        }
        if (i2 == 1) {
            objArr[1] = "asString";
        } else if (i2 == 2) {
            objArr[1] = "getIdentifier";
        } else if (i2 == 3 || i2 == 4) {
            objArr[1] = "asStringStripSpecialMarkers";
        } else {
            objArr[1] = "kotlin/reflect/jvm/internal/impl/name/Name";
        }
        switch (i2) {
            case 1:
            case 2:
            case 3:
            case 4:
                break;
            case 5:
                objArr[2] = "identifier";
                break;
            case 6:
                objArr[2] = "isValidIdentifier";
                break;
            case 7:
                objArr[2] = "special";
                break;
            case 8:
                objArr[2] = "guessByFirstCharacter";
                break;
            default:
                objArr[2] = "<init>";
                break;
        }
        String str2 = String.format(str, objArr);
        if (i2 != 1 && i2 != 2 && i2 != 3 && i2 != 4) {
            throw new IllegalArgumentException(str2);
        }
        throw new IllegalStateException(str2);
    }

    public static e h(String str) {
        if (str != null) {
            return str.startsWith("<") ? k(str) : i(str);
        }
        b(8);
        throw null;
    }

    public static e i(String str) {
        if (str != null) {
            return new e(str, false);
        }
        b(5);
        throw null;
    }

    public static boolean j(String str) {
        if (str == null) {
            b(6);
            throw null;
        }
        if (str.isEmpty() || str.startsWith("<")) {
            return false;
        }
        for (int i2 = 0; i2 < str.length(); i2++) {
            char cCharAt = str.charAt(i2);
            if (cCharAt == '.' || cCharAt == '/' || cCharAt == '\\') {
                return false;
            }
        }
        return true;
    }

    public static e k(String str) {
        if (str == null) {
            b(7);
            throw null;
        }
        if (str.startsWith("<")) {
            return new e(str, true);
        }
        throw new IllegalArgumentException(a.t("special name must start with '<': ", str));
    }

    @Override // java.lang.Comparable
    public int compareTo(e eVar) {
        return this.f8195f.compareTo(eVar.f8195f);
    }

    public String e() {
        String str = this.f8195f;
        if (str != null) {
            return str;
        }
        b(1);
        throw null;
    }

    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (!(obj instanceof e)) {
            return false;
        }
        e eVar = (e) obj;
        return this.f8196m == eVar.f8196m && this.f8195f.equals(eVar.f8195f);
    }

    public String g() {
        if (this.f8196m) {
            throw new IllegalStateException("not identifier: " + this);
        }
        String strE = e();
        if (strE != null) {
            return strE;
        }
        b(2);
        throw null;
    }

    public int hashCode() {
        return (this.f8195f.hashCode() * 31) + (this.f8196m ? 1 : 0);
    }

    public String toString() {
        return this.f8195f;
    }
}
