mirror of
https://github.com/VibedByKaKi/alexandroid.git
synced 2026-11-16 10:57:17 +01:00
61 lines
1.6 KiB
Java
61 lines
1.6 KiB
Java
package com.esotericsoftware.kryo;
|
|
|
|
import java.util.HashMap;
|
|
import java.util.Map;
|
|
import rx.Single$$ExternalSyntheticBUOutline0;
|
|
|
|
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
|
|
/* loaded from: classes6.dex */
|
|
public class Generics {
|
|
private Generics parentScope;
|
|
private Map<String, Class> typeVar2class;
|
|
|
|
public Generics() {
|
|
this.typeVar2class = new HashMap();
|
|
this.parentScope = null;
|
|
}
|
|
|
|
public void add(String str, Class cls) {
|
|
this.typeVar2class.put(str, cls);
|
|
}
|
|
|
|
public Class getConcreteClass(String str) {
|
|
Generics generics;
|
|
Class cls = this.typeVar2class.get(str);
|
|
return (cls != null || (generics = this.parentScope) == null) ? cls : generics.getConcreteClass(str);
|
|
}
|
|
|
|
public Map<String, Class> getMappings() {
|
|
return this.typeVar2class;
|
|
}
|
|
|
|
public Generics getParentScope() {
|
|
return this.parentScope;
|
|
}
|
|
|
|
public void resetParentScope() {
|
|
this.parentScope = null;
|
|
}
|
|
|
|
public void setParentScope(Generics generics) {
|
|
if (this.parentScope == null) {
|
|
this.parentScope = generics;
|
|
} else {
|
|
Single$$ExternalSyntheticBUOutline0.m$2("Parent scope can be set just once");
|
|
}
|
|
}
|
|
|
|
public String toString() {
|
|
return this.typeVar2class.toString();
|
|
}
|
|
|
|
public Generics(Map<String, Class> map) {
|
|
this.typeVar2class = new HashMap(map);
|
|
this.parentScope = null;
|
|
}
|
|
|
|
public Generics(Generics generics) {
|
|
this.typeVar2class = new HashMap();
|
|
this.parentScope = generics;
|
|
}
|
|
}
|