package p6;

import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
import java.util.Arrays;
import java.util.Set;
import o6.AbstractC1380C;

/* JADX INFO: renamed from: p6.c, reason: case insensitive filesystem */
/* JADX INFO: loaded from: classes.dex */
public final class C1437c implements ParameterizedType {

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

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

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public final Type[] f16147c;

    public C1437c(Type type, Type type2, Type... typeArr) {
        if (type2 instanceof Class) {
            Class<?> enclosingClass = ((Class) type2).getEnclosingClass();
            if (type != null) {
                if (enclosingClass == null || AbstractC1380C.d(type) != enclosingClass) {
                    throw new IllegalArgumentException("unexpected owner type for " + type2 + ": " + type);
                }
            } else if (enclosingClass != null) {
                throw new IllegalArgumentException("unexpected owner type for " + type2 + ": null");
            }
        }
        this.f16145a = type == null ? null : AbstractC1439e.a(type);
        this.f16146b = AbstractC1439e.a(type2);
        this.f16147c = (Type[]) typeArr.clone();
        int i = 0;
        while (true) {
            Type[] typeArr2 = this.f16147c;
            if (i >= typeArr2.length) {
                return;
            }
            typeArr2[i].getClass();
            AbstractC1439e.b(this.f16147c[i]);
            Type[] typeArr3 = this.f16147c;
            typeArr3[i] = AbstractC1439e.a(typeArr3[i]);
            i++;
        }
    }

    public final boolean equals(Object obj) {
        return (obj instanceof ParameterizedType) && AbstractC1380C.b(this, (ParameterizedType) obj);
    }

    @Override // java.lang.reflect.ParameterizedType
    public final Type[] getActualTypeArguments() {
        return (Type[]) this.f16147c.clone();
    }

    @Override // java.lang.reflect.ParameterizedType
    public final Type getOwnerType() {
        return this.f16145a;
    }

    @Override // java.lang.reflect.ParameterizedType
    public final Type getRawType() {
        return this.f16146b;
    }

    public final int hashCode() {
        int iHashCode = Arrays.hashCode(this.f16147c) ^ this.f16146b.hashCode();
        Set set = AbstractC1439e.f16150a;
        Type type = this.f16145a;
        return iHashCode ^ (type != null ? type.hashCode() : 0);
    }

    public final String toString() {
        Type[] typeArr = this.f16147c;
        StringBuilder sb = new StringBuilder((typeArr.length + 1) * 30);
        sb.append(AbstractC1439e.i(this.f16146b));
        if (typeArr.length == 0) {
            return sb.toString();
        }
        sb.append("<");
        sb.append(AbstractC1439e.i(typeArr[0]));
        for (int i = 1; i < typeArr.length; i++) {
            sb.append(", ");
            sb.append(AbstractC1439e.i(typeArr[i]));
        }
        sb.append(">");
        return sb.toString();
    }
}
