package com.google.android.gms.internal.clearcut; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap; /* JADX INFO: Access modifiers changed from: package-private */ /* loaded from: classes2.dex */ public final class zzea { private static final zzea zznc = new zzea(); private final zzeg zznd; private final ConcurrentMap, zzef> zzne = new ConcurrentHashMap(); public final zzef zzp(T t) { return zze(t.getClass()); } public final zzef zze(Class cls) { zzci.zza(cls, "messageType"); zzef zzefVar = (zzef) this.zzne.get(cls); if (zzefVar != null) { return zzefVar; } zzef zzd = this.zznd.zzd(cls); zzci.zza(cls, "messageType"); zzci.zza(zzd, "schema"); zzef zzefVar2 = (zzef) this.zzne.putIfAbsent(cls, zzd); return zzefVar2 != null ? zzefVar2 : zzd; } private static zzeg zzk(String str) { try { return (zzeg) Class.forName(str).getConstructor(new Class[0]).newInstance(new Object[0]); } catch (Throwable unused) { return null; } } public static zzea zzcm() { return zznc; } private zzea() { String[] strArr = {"com.google.protobuf.AndroidProto3SchemaFactory"}; zzeg zzegVar = null; for (int i = 0; i <= 0; i++) { zzegVar = zzk(strArr[0]); if (zzegVar != null) { break; } } this.zznd = zzegVar == null ? new zzdd() : zzegVar; } }