228 lines
7.5 KiB
Java
228 lines
7.5 KiB
Java
|
package com.google.android.libraries.places.internal;
|
||
|
|
||
|
import com.google.android.libraries.places.internal.zzaev;
|
||
|
import com.google.android.libraries.places.internal.zzaey;
|
||
|
import java.io.IOException;
|
||
|
import java.lang.reflect.InvocationTargetException;
|
||
|
import java.lang.reflect.Method;
|
||
|
import java.util.Map;
|
||
|
import java.util.concurrent.ConcurrentHashMap;
|
||
|
import org.bouncycastle.asn1.cmp.PKIFailureInfo;
|
||
|
|
||
|
/* loaded from: classes2.dex */
|
||
|
public abstract class zzaey<MessageType extends zzaey<MessageType, BuilderType>, BuilderType extends zzaev<MessageType, BuilderType>> extends zzadq<MessageType, BuilderType> {
|
||
|
private static final Map zzb = new ConcurrentHashMap();
|
||
|
private int zzd = -1;
|
||
|
protected zzahj zzc = zzahj.zzc();
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: protected */
|
||
|
public static zzaff zzA() {
|
||
|
return zzafv.zze();
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: protected */
|
||
|
public static zzafg zzB() {
|
||
|
return zzagp.zzd();
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: protected */
|
||
|
public static zzafg zzC(zzafg zzafgVar) {
|
||
|
int size = zzafgVar.size();
|
||
|
return zzafgVar.zzf(size == 0 ? 10 : size + size);
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
public static Object zzE(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) {
|
||
|
throw ((RuntimeException) cause);
|
||
|
}
|
||
|
if (cause instanceof Error) {
|
||
|
throw ((Error) cause);
|
||
|
}
|
||
|
throw new RuntimeException("Unexpected exception thrown by generated accessor method.", cause);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: protected */
|
||
|
public static Object zzF(zzagg zzaggVar, String str, Object[] objArr) {
|
||
|
return new zzagq(zzaggVar, str, objArr);
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: protected */
|
||
|
public static void zzI(Class cls, zzaey zzaeyVar) {
|
||
|
zzaeyVar.zzH();
|
||
|
zzb.put(cls, zzaeyVar);
|
||
|
}
|
||
|
|
||
|
private final int zza(zzagr zzagrVar) {
|
||
|
if (zzagrVar == null) {
|
||
|
return zzago.zza().zzb(getClass()).zza(this);
|
||
|
}
|
||
|
return zzagrVar.zza(this);
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
public static zzaey zzx(Class cls) {
|
||
|
Map map = zzb;
|
||
|
zzaey zzaeyVar = (zzaey) map.get(cls);
|
||
|
if (zzaeyVar == null) {
|
||
|
try {
|
||
|
Class.forName(cls.getName(), true, cls.getClassLoader());
|
||
|
zzaeyVar = (zzaey) map.get(cls);
|
||
|
} catch (ClassNotFoundException e) {
|
||
|
throw new IllegalStateException("Class initialization cannot fail.", e);
|
||
|
}
|
||
|
}
|
||
|
if (zzaeyVar == null) {
|
||
|
zzaeyVar = (zzaey) ((zzaey) zzahs.zze(cls)).zzb(6, null, null);
|
||
|
if (zzaeyVar == null) {
|
||
|
throw new IllegalStateException();
|
||
|
}
|
||
|
map.put(cls, zzaeyVar);
|
||
|
}
|
||
|
return zzaeyVar;
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: protected */
|
||
|
public static zzafd zzz() {
|
||
|
return zzaez.zze();
|
||
|
}
|
||
|
|
||
|
public final boolean equals(Object obj) {
|
||
|
if (this == obj) {
|
||
|
return true;
|
||
|
}
|
||
|
if (obj == null || getClass() != obj.getClass()) {
|
||
|
return false;
|
||
|
}
|
||
|
return zzago.zza().zzb(getClass()).zzg(this, (zzaey) obj);
|
||
|
}
|
||
|
|
||
|
public final int hashCode() {
|
||
|
if (zzL()) {
|
||
|
return zzu();
|
||
|
}
|
||
|
int i = this.zza;
|
||
|
if (i != 0) {
|
||
|
return i;
|
||
|
}
|
||
|
int zzu = zzu();
|
||
|
this.zza = zzu;
|
||
|
return zzu;
|
||
|
}
|
||
|
|
||
|
public final String toString() {
|
||
|
return zzagi.zza(this, super.toString());
|
||
|
}
|
||
|
|
||
|
@Override // com.google.android.libraries.places.internal.zzagg
|
||
|
public final /* synthetic */ zzagf zzD() {
|
||
|
return (zzaev) zzb(5, null, null);
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: protected */
|
||
|
public final void zzG() {
|
||
|
zzago.zza().zzb(getClass()).zzd(this);
|
||
|
zzH();
|
||
|
}
|
||
|
|
||
|
@Override // com.google.android.libraries.places.internal.zzagg
|
||
|
public final void zzK(zzael zzaelVar) throws IOException {
|
||
|
zzago.zza().zzb(getClass()).zzf(this, zzaem.zza(zzaelVar));
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: protected */
|
||
|
public abstract Object zzb(int i, Object obj, Object obj2);
|
||
|
|
||
|
@Override // com.google.android.libraries.places.internal.zzagh
|
||
|
public final /* synthetic */ zzagg zzt() {
|
||
|
return (zzaey) zzb(6, null, null);
|
||
|
}
|
||
|
|
||
|
final int zzu() {
|
||
|
return zzago.zza().zzb(getClass()).zzb(this);
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: protected */
|
||
|
public final zzaev zzw() {
|
||
|
return (zzaev) zzb(5, null, null);
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
public final zzaey zzy() {
|
||
|
return (zzaey) zzb(4, null, null);
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
@Override // com.google.android.libraries.places.internal.zzadq
|
||
|
public final int zzr(zzagr zzagrVar) {
|
||
|
if (zzL()) {
|
||
|
int zza = zza(zzagrVar);
|
||
|
if (zza >= 0) {
|
||
|
return zza;
|
||
|
}
|
||
|
StringBuilder sb = new StringBuilder("serialized size must be non-negative, was ");
|
||
|
sb.append(zza);
|
||
|
throw new IllegalStateException(sb.toString());
|
||
|
}
|
||
|
int i = this.zzd & Integer.MAX_VALUE;
|
||
|
if (i != Integer.MAX_VALUE) {
|
||
|
return i;
|
||
|
}
|
||
|
int zza2 = zza(zzagrVar);
|
||
|
if (zza2 >= 0) {
|
||
|
this.zzd = (this.zzd & PKIFailureInfo.systemUnavail) | zza2;
|
||
|
return zza2;
|
||
|
}
|
||
|
StringBuilder sb2 = new StringBuilder("serialized size must be non-negative, was ");
|
||
|
sb2.append(zza2);
|
||
|
throw new IllegalStateException(sb2.toString());
|
||
|
}
|
||
|
|
||
|
@Override // com.google.android.libraries.places.internal.zzagg
|
||
|
public final int zzv() {
|
||
|
int i;
|
||
|
if (zzL()) {
|
||
|
i = zza(null);
|
||
|
if (i < 0) {
|
||
|
StringBuilder sb = new StringBuilder("serialized size must be non-negative, was ");
|
||
|
sb.append(i);
|
||
|
throw new IllegalStateException(sb.toString());
|
||
|
}
|
||
|
} else {
|
||
|
i = this.zzd & Integer.MAX_VALUE;
|
||
|
if (i == Integer.MAX_VALUE) {
|
||
|
i = zza(null);
|
||
|
if (i < 0) {
|
||
|
StringBuilder sb2 = new StringBuilder("serialized size must be non-negative, was ");
|
||
|
sb2.append(i);
|
||
|
throw new IllegalStateException(sb2.toString());
|
||
|
}
|
||
|
this.zzd = (this.zzd & PKIFailureInfo.systemUnavail) | i;
|
||
|
}
|
||
|
}
|
||
|
return i;
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
public final boolean zzL() {
|
||
|
return (this.zzd & PKIFailureInfo.systemUnavail) != 0;
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
public final void zzJ(int i) {
|
||
|
this.zzd = (this.zzd & PKIFailureInfo.systemUnavail) | Integer.MAX_VALUE;
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
public final void zzH() {
|
||
|
this.zzd &= Integer.MAX_VALUE;
|
||
|
}
|
||
|
}
|