package F7;

import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
import java.util.Arrays;
import java.util.Objects;

/* JADX INFO: loaded from: classes.dex */
public final class Z implements ParameterizedType {

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

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

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

    public Z(Type type, Type type2, Type... typeArr) {
        if (type2 instanceof Class) {
            if ((type == null) != (((Class) type2).getEnclosingClass() == null)) {
                throw new IllegalArgumentException();
            }
        }
        for (Type type3 : typeArr) {
            Objects.requireNonNull(type3, "typeArgument == null");
            b0.d(type3);
        }
        this.f2690a = type;
        this.f2691b = type2;
        this.f2692c = (Type[]) typeArr.clone();
    }

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

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

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

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

    public final int hashCode() {
        int iHashCode = Arrays.hashCode(this.f2692c) ^ this.f2691b.hashCode();
        Type type = this.f2690a;
        return iHashCode ^ (type != null ? type.hashCode() : 0);
    }

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