what-the-bank/sources/com/google/android/gms/internal/clearcut/zzdr.java

207 lines
9.0 KiB
Java
Raw Normal View History

2024-07-27 18:17:47 +07:00
package com.google.android.gms.internal.clearcut;
import com.airbnb.deeplinkdispatch.UrlTreeKt;
import com.google.android.gms.internal.clearcut.zzcg;
import com.google.android.gms.maps.model.BitmapDescriptorFactory;
import com.google.android.gms.measurement.api.AppMeasurementSdk;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.TreeSet;
/* JADX INFO: Access modifiers changed from: package-private */
/* loaded from: classes2.dex */
public final class zzdr {
private static final String zzj(String str) {
StringBuilder sb = new StringBuilder();
for (int i = 0; i < str.length(); i++) {
char charAt = str.charAt(i);
if (Character.isUpperCase(charAt)) {
sb.append("_");
}
sb.append(Character.toLowerCase(charAt));
}
return sb.toString();
}
/* JADX INFO: Access modifiers changed from: package-private */
public static final void zza(StringBuilder sb, int i, String str, Object obj) {
if (obj instanceof List) {
Iterator it = ((List) obj).iterator();
while (it.hasNext()) {
zza(sb, i, str, it.next());
}
return;
}
if (obj instanceof Map) {
Iterator it2 = ((Map) obj).entrySet().iterator();
while (it2.hasNext()) {
zza(sb, i, str, (Map.Entry) it2.next());
}
return;
}
sb.append('\n');
int i2 = 0;
for (int i3 = 0; i3 < i; i3++) {
sb.append(' ');
}
sb.append(str);
if (obj instanceof String) {
sb.append(": \"");
sb.append(zzet.zzc(zzbb.zzf((String) obj)));
sb.append('\"');
return;
}
if (obj instanceof zzbb) {
sb.append(": \"");
sb.append(zzet.zzc((zzbb) obj));
sb.append('\"');
return;
}
if (obj instanceof zzcg) {
sb.append(" {");
zza((zzcg) obj, sb, i + 2);
sb.append("\n");
while (i2 < i) {
sb.append(' ');
i2++;
}
sb.append(UrlTreeKt.componentParamSuffix);
return;
}
if (!(obj instanceof Map.Entry)) {
sb.append(": ");
sb.append(obj.toString());
return;
}
sb.append(" {");
Map.Entry entry = (Map.Entry) obj;
int i4 = i + 2;
zza(sb, i4, "key", entry.getKey());
zza(sb, i4, AppMeasurementSdk.ConditionalUserProperty.VALUE, entry.getValue());
sb.append("\n");
while (i2 < i) {
sb.append(' ');
i2++;
}
sb.append(UrlTreeKt.componentParamSuffix);
}
private static void zza(zzdo zzdoVar, StringBuilder sb, int i) {
HashMap hashMap = new HashMap();
HashMap hashMap2 = new HashMap();
TreeSet<String> treeSet = new TreeSet();
for (Method method : zzdoVar.getClass().getDeclaredMethods()) {
hashMap2.put(method.getName(), method);
if (method.getParameterTypes().length == 0) {
hashMap.put(method.getName(), method);
if (method.getName().startsWith("get")) {
treeSet.add(method.getName());
}
}
}
for (String str : treeSet) {
Object obj = "";
String replaceFirst = str.replaceFirst("get", "");
if (replaceFirst.endsWith("List") && !replaceFirst.endsWith("OrBuilderList") && !replaceFirst.equals("List")) {
String valueOf = String.valueOf(replaceFirst.substring(0, 1).toLowerCase());
String valueOf2 = String.valueOf(replaceFirst.substring(1, replaceFirst.length() - 4));
String concat = valueOf2.length() != 0 ? valueOf.concat(valueOf2) : new String(valueOf);
Method method2 = (Method) hashMap.get(str);
if (method2 != null && method2.getReturnType().equals(List.class)) {
zza(sb, i, zzj(concat), zzcg.zza(method2, zzdoVar, new Object[0]));
}
}
if (replaceFirst.endsWith("Map") && !replaceFirst.equals("Map")) {
String valueOf3 = String.valueOf(replaceFirst.substring(0, 1).toLowerCase());
String valueOf4 = String.valueOf(replaceFirst.substring(1, replaceFirst.length() - 3));
String concat2 = valueOf4.length() != 0 ? valueOf3.concat(valueOf4) : new String(valueOf3);
Method method3 = (Method) hashMap.get(str);
if (method3 != null && method3.getReturnType().equals(Map.class) && !method3.isAnnotationPresent(Deprecated.class) && Modifier.isPublic(method3.getModifiers())) {
zza(sb, i, zzj(concat2), zzcg.zza(method3, zzdoVar, new Object[0]));
}
}
String valueOf5 = String.valueOf(replaceFirst);
if (((Method) hashMap2.get(valueOf5.length() != 0 ? "set".concat(valueOf5) : new String("set"))) != null) {
if (replaceFirst.endsWith("Bytes")) {
String valueOf6 = String.valueOf(replaceFirst.substring(0, replaceFirst.length() - 5));
if (!hashMap.containsKey(valueOf6.length() != 0 ? "get".concat(valueOf6) : new String("get"))) {
}
}
String valueOf7 = String.valueOf(replaceFirst.substring(0, 1).toLowerCase());
String valueOf8 = String.valueOf(replaceFirst.substring(1));
String concat3 = valueOf8.length() != 0 ? valueOf7.concat(valueOf8) : new String(valueOf7);
String valueOf9 = String.valueOf(replaceFirst);
Method method4 = (Method) hashMap.get(valueOf9.length() != 0 ? "get".concat(valueOf9) : new String("get"));
String valueOf10 = String.valueOf(replaceFirst);
Method method5 = (Method) hashMap.get(valueOf10.length() != 0 ? "has".concat(valueOf10) : new String("has"));
if (method4 != null) {
Object zza = zzcg.zza(method4, zzdoVar, new Object[0]);
if (method5 == null) {
if (zza instanceof Boolean) {
if (((Boolean) zza).booleanValue()) {
zza(sb, i, zzj(concat3), zza);
}
} else if (zza instanceof Integer) {
if (((Integer) zza).intValue() != 0) {
zza(sb, i, zzj(concat3), zza);
}
} else if (zza instanceof Float) {
if (((Float) zza).floatValue() != BitmapDescriptorFactory.HUE_RED) {
zza(sb, i, zzj(concat3), zza);
}
} else if (!(zza instanceof Double)) {
if (!(zza instanceof String)) {
if (zza instanceof zzbb) {
obj = zzbb.zzfi;
} else if (!(zza instanceof zzdo)) {
if ((zza instanceof Enum) && ((Enum) zza).ordinal() == 0) {
}
zza(sb, i, zzj(concat3), zza);
} else if (zza != ((zzdo) zza).zzbe()) {
zza(sb, i, zzj(concat3), zza);
}
}
if (!zza.equals(obj)) {
zza(sb, i, zzj(concat3), zza);
}
} else if (((Double) zza).doubleValue() != 0.0d) {
zza(sb, i, zzj(concat3), zza);
}
} else if (((Boolean) zzcg.zza(method5, zzdoVar, new Object[0])).booleanValue()) {
zza(sb, i, zzj(concat3), zza);
}
}
}
}
if (zzdoVar instanceof zzcg.zzd) {
Iterator<Map.Entry<zzcg.zze, Object>> it = ((zzcg.zzd) zzdoVar).zzjv.iterator();
while (it.hasNext()) {
Map.Entry<zzcg.zze, Object> next = it.next();
int i2 = next.getKey().number;
StringBuilder sb2 = new StringBuilder(13);
sb2.append("[");
sb2.append(i2);
sb2.append("]");
zza(sb, i, sb2.toString(), next.getValue());
}
}
zzcg zzcgVar = (zzcg) zzdoVar;
if (zzcgVar.zzjp != null) {
zzcgVar.zzjp.zza(sb, i);
}
}
/* JADX INFO: Access modifiers changed from: package-private */
public static String zza(zzdo zzdoVar, String str) {
StringBuilder sb = new StringBuilder();
sb.append("# ");
sb.append(str);
zza(zzdoVar, sb, 0);
return sb.toString();
}
}