discord-jadx/app/src/main/java/d0/e0/l.java

73 lines
2.2 KiB
Java

package d0.e0;
import c.d.b.a.a;
import d0.j;
import d0.t.o;
import d0.z.d.m;
import java.lang.reflect.GenericDeclaration;
import java.lang.reflect.Type;
import java.lang.reflect.TypeVariable;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
import kotlin.reflect.KType;
/* compiled from: TypesJVM.kt */
public final class l implements TypeVariable<GenericDeclaration>, Type {
public final h i;
public l(h hVar) {
m.checkNotNullParameter(hVar, "typeParameter");
this.i = hVar;
}
@Override // java.lang.Object
public boolean equals(Object obj) {
if (obj instanceof TypeVariable) {
TypeVariable typeVariable = (TypeVariable) obj;
if (m.areEqual(getName(), typeVariable.getName()) && m.areEqual(getGenericDeclaration(), typeVariable.getGenericDeclaration())) {
return true;
}
}
return false;
}
@Override // java.lang.reflect.TypeVariable
public Type[] getBounds() {
List<KType> upperBounds = this.i.getUpperBounds();
ArrayList arrayList = new ArrayList(o.collectionSizeOrDefault(upperBounds, 10));
for (KType kType : upperBounds) {
arrayList.add(n.access$computeJavaType(kType, true));
}
Object[] array = arrayList.toArray(new Type[0]);
Objects.requireNonNull(array, "null cannot be cast to non-null type kotlin.Array<T>");
return (Type[]) array;
}
@Override // java.lang.reflect.TypeVariable
public GenericDeclaration getGenericDeclaration() {
StringBuilder K = a.K("getGenericDeclaration() is not yet supported for type variables created from KType: ");
K.append(this.i);
throw new j(a.s("An operation is not implemented: ", K.toString()));
}
@Override // java.lang.reflect.TypeVariable
public String getName() {
return this.i.getName();
}
@Override // java.lang.reflect.Type
public String getTypeName() {
return getName();
}
@Override // java.lang.Object
public int hashCode() {
return getName().hashCode() ^ getGenericDeclaration().hashCode();
}
@Override // java.lang.Object
public String toString() {
return getTypeName();
}
}