package c.b.a.u;

import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
import java.util.EnumSet;

/* JADX INFO: Add missing generic type declarations: [T] */
/* JADX INFO: loaded from: classes.dex */
public class j<T> implements s<T> {

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

    public j(g gVar, Type type) {
        this.f1346a = type;
    }

    @Override // c.b.a.u.s
    public T a() {
        Type type = this.f1346a;
        if (!(type instanceof ParameterizedType)) {
            StringBuilder sbD = c.a.a.a.a.d("Invalid EnumSet type: ");
            sbD.append(this.f1346a.toString());
            throw new c.b.a.j(sbD.toString());
        }
        Type type2 = ((ParameterizedType) type).getActualTypeArguments()[0];
        if (type2 instanceof Class) {
            return (T) EnumSet.noneOf((Class) type2);
        }
        StringBuilder sbD2 = c.a.a.a.a.d("Invalid EnumSet type: ");
        sbD2.append(this.f1346a.toString());
        throw new c.b.a.j(sbD2.toString());
    }
}
