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

71 lines
2.2 KiB
Java
Raw Normal View History

2021-11-02 06:38:17 +00:00
package d0.e0;
2021-08-03 07:33:18 +00:00
2021-12-17 21:59:34 +00:00
import b.d.b.a.a;
2021-11-02 06:38:17 +00:00
import d0.j;
import d0.t.o;
import d0.z.d.m;
2021-08-03 07:33:18 +00:00
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 */
2022-03-07 09:34:54 +00:00
/* loaded from: classes3.dex */
2021-08-03 07:33:18 +00:00
public final class l implements TypeVariable<GenericDeclaration>, Type {
2021-12-02 18:53:44 +00:00
public final h j;
2021-08-03 07:33:18 +00:00
public l(h hVar) {
m.checkNotNullParameter(hVar, "typeParameter");
2021-12-02 18:53:44 +00:00
this.j = hVar;
2021-08-03 07:33:18 +00:00
}
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() {
2021-12-02 18:53:44 +00:00
List<KType> upperBounds = this.j.getUpperBounds();
2021-08-03 07:33:18 +00:00
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() {
2022-03-21 18:52:30 +00:00
StringBuilder R = a.R("getGenericDeclaration() is not yet supported for type variables created from KType: ");
R.append(this.j);
throw new j(a.v("An operation is not implemented: ", R.toString()));
2021-08-03 07:33:18 +00:00
}
@Override // java.lang.reflect.TypeVariable
public String getName() {
2021-12-02 18:53:44 +00:00
return this.j.getName();
2021-08-03 07:33:18 +00:00
}
@Override // java.lang.reflect.Type
public String getTypeName() {
return getName();
}
public int hashCode() {
return getName().hashCode() ^ getGenericDeclaration().hashCode();
}
public String toString() {
return getTypeName();
}
}