302 lines
10 KiB
Java
302 lines
10 KiB
Java
package com.google.android.gms.internal.measurement;
|
|
|
|
import com.google.android.gms.internal.measurement.zzuo;
|
|
import com.google.android.gms.internal.measurement.zzuo.zza;
|
|
import java.io.IOException;
|
|
import java.lang.reflect.InvocationTargetException;
|
|
import java.lang.reflect.Method;
|
|
import java.util.Map;
|
|
import java.util.concurrent.ConcurrentHashMap;
|
|
|
|
/* loaded from: classes.dex */
|
|
public abstract class zzuo<MessageType extends zzuo<MessageType, BuilderType>, BuilderType extends zza<MessageType, BuilderType>> extends zzsx<MessageType, BuilderType> {
|
|
private static Map<Object, zzuo<?, ?>> zzbyf = new ConcurrentHashMap();
|
|
protected zzxe zzbyd = zzxe.d();
|
|
private int zzbye = -1;
|
|
|
|
public static class zzb<T extends zzuo<T, ?>> extends zzsz<T> {
|
|
private final T a;
|
|
|
|
public zzb(T t) {
|
|
this.a = t;
|
|
}
|
|
|
|
@Override // com.google.android.gms.internal.measurement.zzwf
|
|
public final /* synthetic */ Object a(zztq zztqVar, zzub zzubVar) throws zzuv {
|
|
return zzuo.a(this.a, zztqVar, zzubVar);
|
|
}
|
|
}
|
|
|
|
public static abstract class zzc<MessageType extends zzc<MessageType, BuilderType>, BuilderType> extends zzuo<MessageType, BuilderType> implements zzvx {
|
|
protected zzuf<Object> zzbyj = zzuf.i();
|
|
}
|
|
|
|
public static class zzd<ContainingType extends zzvv, Type> extends zztz<ContainingType, Type> {
|
|
}
|
|
|
|
public enum zze {
|
|
public static final int a = 1;
|
|
public static final int b = 2;
|
|
public static final int c = 3;
|
|
public static final int d = 4;
|
|
public static final int e = 5;
|
|
public static final int f = 6;
|
|
public static final int g = 7;
|
|
private static final /* synthetic */ int[] h = {a, b, c, d, e, f, g};
|
|
public static final int i = 1;
|
|
public static final int j = 2;
|
|
public static final int k = 1;
|
|
public static final int l = 2;
|
|
|
|
static {
|
|
int[] iArr = {i, j};
|
|
int[] iArr2 = {k, l};
|
|
}
|
|
|
|
public static int[] a() {
|
|
return (int[]) h.clone();
|
|
}
|
|
}
|
|
|
|
protected static <E> zzuu<E> l() {
|
|
return zzwi.b();
|
|
}
|
|
|
|
protected abstract Object a(int i, Object obj, Object obj2);
|
|
|
|
@Override // com.google.android.gms.internal.measurement.zzvx
|
|
public final boolean a() {
|
|
boolean booleanValue = Boolean.TRUE.booleanValue();
|
|
byte byteValue = ((Byte) a(zze.a, (Object) null, (Object) null)).byteValue();
|
|
if (byteValue == 1) {
|
|
return true;
|
|
}
|
|
if (byteValue == 0) {
|
|
return false;
|
|
}
|
|
boolean b = zzwh.a().a((zzwh) this).b(this);
|
|
if (booleanValue) {
|
|
a(zze.b, b ? this : null, (Object) null);
|
|
}
|
|
return b;
|
|
}
|
|
|
|
@Override // com.google.android.gms.internal.measurement.zzvx
|
|
public final /* synthetic */ zzvv b() {
|
|
return (zzuo) a(zze.f, (Object) null, (Object) null);
|
|
}
|
|
|
|
public boolean equals(Object obj) {
|
|
if (this == obj) {
|
|
return true;
|
|
}
|
|
if (((zzuo) a(zze.f, (Object) null, (Object) null)).getClass().isInstance(obj)) {
|
|
return zzwh.a().a((zzwh) this).equals(this, (zzuo) obj);
|
|
}
|
|
return false;
|
|
}
|
|
|
|
@Override // com.google.android.gms.internal.measurement.zzvv
|
|
public final /* synthetic */ zzvw f() {
|
|
zza zzaVar = (zza) a(zze.e, (Object) null, (Object) null);
|
|
zzaVar.a((zza) this);
|
|
return zzaVar;
|
|
}
|
|
|
|
@Override // com.google.android.gms.internal.measurement.zzvv
|
|
public final int h() {
|
|
if (this.zzbye == -1) {
|
|
this.zzbye = zzwh.a().a((zzwh) this).a(this);
|
|
}
|
|
return this.zzbye;
|
|
}
|
|
|
|
public int hashCode() {
|
|
int i = this.zzbti;
|
|
if (i != 0) {
|
|
return i;
|
|
}
|
|
this.zzbti = zzwh.a().a((zzwh) this).d(this);
|
|
return this.zzbti;
|
|
}
|
|
|
|
@Override // com.google.android.gms.internal.measurement.zzvv
|
|
public final /* synthetic */ zzvw i() {
|
|
return (zza) a(zze.e, (Object) null, (Object) null);
|
|
}
|
|
|
|
@Override // com.google.android.gms.internal.measurement.zzsx
|
|
final int j() {
|
|
return this.zzbye;
|
|
}
|
|
|
|
public final BuilderType k() {
|
|
BuilderType buildertype = (BuilderType) a(zze.e, (Object) null, (Object) null);
|
|
buildertype.a(this);
|
|
return buildertype;
|
|
}
|
|
|
|
public String toString() {
|
|
return zzvy.a(this, super.toString());
|
|
}
|
|
|
|
public static abstract class zza<MessageType extends zzuo<MessageType, BuilderType>, BuilderType extends zza<MessageType, BuilderType>> extends zzsy<MessageType, BuilderType> {
|
|
private final MessageType a;
|
|
protected MessageType b;
|
|
private boolean c = false;
|
|
|
|
protected zza(MessageType messagetype) {
|
|
this.a = messagetype;
|
|
this.b = (MessageType) messagetype.a(zze.d, null, null);
|
|
}
|
|
|
|
public final BuilderType a(MessageType messagetype) {
|
|
j();
|
|
a(this.b, messagetype);
|
|
return this;
|
|
}
|
|
|
|
@Override // com.google.android.gms.internal.measurement.zzvx
|
|
public final /* synthetic */ zzvv b() {
|
|
return this.a;
|
|
}
|
|
|
|
/* JADX WARN: Multi-variable type inference failed */
|
|
public /* synthetic */ Object clone() throws CloneNotSupportedException {
|
|
zza zzaVar = (zza) this.a.a(zze.e, null, null);
|
|
zzaVar.a((zza) e());
|
|
return zzaVar;
|
|
}
|
|
|
|
protected final void j() {
|
|
if (this.c) {
|
|
MessageType messagetype = (MessageType) this.b.a(zze.d, null, null);
|
|
a(messagetype, this.b);
|
|
this.b = messagetype;
|
|
this.c = false;
|
|
}
|
|
}
|
|
|
|
@Override // com.google.android.gms.internal.measurement.zzvw
|
|
/* renamed from: k, reason: merged with bridge method [inline-methods] */
|
|
public MessageType e() {
|
|
if (this.c) {
|
|
return this.b;
|
|
}
|
|
MessageType messagetype = this.b;
|
|
zzwh.a().a((zzwh) messagetype).c(messagetype);
|
|
this.c = true;
|
|
return this.b;
|
|
}
|
|
|
|
@Override // com.google.android.gms.internal.measurement.zzvw
|
|
/* renamed from: l, reason: merged with bridge method [inline-methods] */
|
|
public final MessageType d() {
|
|
MessageType messagetype = (MessageType) e();
|
|
boolean booleanValue = Boolean.TRUE.booleanValue();
|
|
byte byteValue = ((Byte) messagetype.a(zze.a, null, null)).byteValue();
|
|
boolean z = true;
|
|
if (byteValue != 1) {
|
|
if (byteValue == 0) {
|
|
z = false;
|
|
} else {
|
|
z = zzwh.a().a((zzwh) messagetype).b(messagetype);
|
|
if (booleanValue) {
|
|
messagetype.a(zze.b, z ? messagetype : null, null);
|
|
}
|
|
}
|
|
}
|
|
if (z) {
|
|
return messagetype;
|
|
}
|
|
throw new zzxc(messagetype);
|
|
}
|
|
|
|
private static void a(MessageType messagetype, MessageType messagetype2) {
|
|
zzwh.a().a((zzwh) messagetype).a(messagetype, messagetype2);
|
|
}
|
|
|
|
/* JADX WARN: Multi-variable type inference failed */
|
|
@Override // com.google.android.gms.internal.measurement.zzsy
|
|
protected final /* synthetic */ zzsy a(zzsx zzsxVar) {
|
|
a((zza<MessageType, BuilderType>) zzsxVar);
|
|
return this;
|
|
}
|
|
}
|
|
|
|
@Override // com.google.android.gms.internal.measurement.zzsx
|
|
final void a(int i) {
|
|
this.zzbye = i;
|
|
}
|
|
|
|
@Override // com.google.android.gms.internal.measurement.zzvv
|
|
public final void a(zztv zztvVar) throws IOException {
|
|
zzwh.a().a((Class) getClass()).a((zzwl) this, (zzxy) zztx.a(zztvVar));
|
|
}
|
|
|
|
static <T extends zzuo<?, ?>> T a(Class<T> cls) {
|
|
zzuo<?, ?> zzuoVar = zzbyf.get(cls);
|
|
if (zzuoVar == null) {
|
|
try {
|
|
Class.forName(cls.getName(), true, cls.getClassLoader());
|
|
zzuoVar = zzbyf.get(cls);
|
|
} catch (ClassNotFoundException e) {
|
|
throw new IllegalStateException("Class initialization cannot fail.", e);
|
|
}
|
|
}
|
|
if (zzuoVar == null) {
|
|
zzuoVar = (T) ((zzuo) zzxj.a(cls)).a(zze.f, (Object) null, (Object) null);
|
|
if (zzuoVar != null) {
|
|
zzbyf.put(cls, zzuoVar);
|
|
} else {
|
|
throw new IllegalStateException();
|
|
}
|
|
}
|
|
return (T) zzuoVar;
|
|
}
|
|
|
|
protected static <T extends zzuo<?, ?>> void a(Class<T> cls, T t) {
|
|
zzbyf.put(cls, t);
|
|
}
|
|
|
|
protected static Object a(zzvv zzvvVar, String str, Object[] objArr) {
|
|
return new zzwj(zzvvVar, str, objArr);
|
|
}
|
|
|
|
static Object a(Method method, Object obj, Object... objArr) {
|
|
try {
|
|
return method.invoke(obj, objArr);
|
|
} catch (IllegalAccessException e) {
|
|
throw new RuntimeException("Couldn't use Java reflection to implement protocol message reflection.", e);
|
|
} catch (InvocationTargetException e2) {
|
|
Throwable cause = e2.getCause();
|
|
if (!(cause instanceof RuntimeException)) {
|
|
if (cause instanceof Error) {
|
|
throw ((Error) cause);
|
|
}
|
|
throw new RuntimeException("Unexpected exception thrown by generated accessor method.", cause);
|
|
}
|
|
throw ((RuntimeException) cause);
|
|
}
|
|
}
|
|
|
|
static <T extends zzuo<T, ?>> T a(T t, zztq zztqVar, zzub zzubVar) throws zzuv {
|
|
T t2 = (T) t.a(zze.d, null, null);
|
|
try {
|
|
zzwh.a().a((zzwh) t2).a(t2, zztt.a(zztqVar), zzubVar);
|
|
zzwh.a().a((zzwh) t2).c(t2);
|
|
return t2;
|
|
} catch (IOException e) {
|
|
if (e.getCause() instanceof zzuv) {
|
|
throw ((zzuv) e.getCause());
|
|
}
|
|
throw new zzuv(e.getMessage()).zzg(t2);
|
|
} catch (RuntimeException e2) {
|
|
if (e2.getCause() instanceof zzuv) {
|
|
throw ((zzuv) e2.getCause());
|
|
}
|
|
throw e2;
|
|
}
|
|
}
|
|
}
|