what-the-bank/sources/o/AbstractC16345ndh.java

470 lines
16 KiB
Java

package o;
import com.google.crypto.tink.shaded.protobuf.CodedOutputStream;
import com.google.crypto.tink.shaded.protobuf.InvalidProtocolBufferException;
import com.google.crypto.tink.shaded.protobuf.UninitializedMessageException;
import java.io.IOException;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import o.AbstractC16345ndh;
import o.AbstractC16345ndh.LWm;
import o.AbstractC16771rBp;
import o.C15775iXO;
import o.QWH;
import o.dJF;
import o.vAr;
/* renamed from: o.ndh, reason: case insensitive filesystem */
/* loaded from: classes2.dex */
public abstract class AbstractC16345ndh<MessageType extends AbstractC16345ndh<MessageType, BuilderType>, BuilderType extends LWm<MessageType, BuilderType>> extends AbstractC16771rBp<MessageType, BuilderType> {
private static Map<Object, AbstractC16345ndh<?, ?>> defaultInstanceMap = new ConcurrentHashMap();
protected pTc unknownFields = pTc.e();
protected int memoizedSerializedSize = -1;
/* renamed from: o.ndh$RVV */
/* loaded from: classes2.dex */
public static class RVV<ContainingType extends vAr, Type> extends AbstractC16459oZx<ContainingType, Type> {
final vAr a;
final HBt b;
}
/* renamed from: o.ndh$ojQ */
/* loaded from: classes2.dex */
public enum ojQ {
GET_MEMOIZED_IS_INITIALIZED,
SET_MEMOIZED_IS_INITIALIZED,
BUILD_MESSAGE_INFO,
NEW_MUTABLE_INSTANCE,
NEW_BUILDER,
GET_DEFAULT_INSTANCE,
GET_PARSER
}
protected abstract Object b(ojQ ojq);
public final BuilderType k() {
return (BuilderType) b(ojQ.NEW_BUILDER);
}
public String toString() {
String obj = super.toString();
StringBuilder sb = new StringBuilder();
sb.append("# ");
sb.append(obj);
C7474cox.b(this, sb, 0);
return sb.toString();
}
public int hashCode() {
if (this.memoizedHashCode != 0) {
return this.memoizedHashCode;
}
this.memoizedHashCode = mNa.a().e(getClass()).b(this);
return this.memoizedHashCode;
}
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj != null && getClass() == obj.getClass()) {
return mNa.a().e(getClass()).e(this, (AbstractC16345ndh) obj);
}
return false;
}
public final <MessageType extends AbstractC16345ndh<MessageType, BuilderType>, BuilderType extends LWm<MessageType, BuilderType>> BuilderType f() {
return (BuilderType) b(ojQ.NEW_BUILDER);
}
@Override // o.jGJ
public final boolean l() {
return c(this, true);
}
public final BuilderType p() {
BuilderType buildertype = (BuilderType) b(ojQ.NEW_BUILDER);
buildertype.b(this);
return buildertype;
}
/* JADX INFO: Access modifiers changed from: protected */
public final Object a(ojQ ojq) {
return b(ojq);
}
@Override // o.vAr
public final void b(CodedOutputStream codedOutputStream) throws IOException {
C9356diG c9356diG;
CSi e = mNa.a().e(getClass());
if (codedOutputStream.e != null) {
c9356diG = codedOutputStream.e;
} else {
c9356diG = new C9356diG(codedOutputStream);
}
e.b(this, c9356diG);
}
@Override // o.vAr
public final int n() {
if (this.memoizedSerializedSize == -1) {
this.memoizedSerializedSize = mNa.a().e(getClass()).a(this);
}
return this.memoizedSerializedSize;
}
/* JADX INFO: Access modifiers changed from: package-private */
public final Object g() throws Exception {
return b(ojQ.BUILD_MESSAGE_INFO);
}
/* JADX INFO: Access modifiers changed from: package-private */
public static <T extends AbstractC16345ndh<?, ?>> T d(Class<T> cls) {
AbstractC16345ndh<?, ?> abstractC16345ndh = defaultInstanceMap.get(cls);
if (abstractC16345ndh == null) {
try {
Class.forName(cls.getName(), true, cls.getClassLoader());
abstractC16345ndh = defaultInstanceMap.get(cls);
} catch (ClassNotFoundException e) {
throw new IllegalStateException("Class initialization cannot fail.", e);
}
}
if (abstractC16345ndh == null) {
abstractC16345ndh = (T) ((AbstractC16345ndh) C1609aJC.d(cls)).b(ojQ.GET_DEFAULT_INSTANCE);
if (abstractC16345ndh == null) {
throw new IllegalStateException();
}
defaultInstanceMap.put(cls, abstractC16345ndh);
}
return (T) abstractC16345ndh;
}
public static <T extends AbstractC16345ndh<?, ?>> void b(Class<T> cls, T t) {
defaultInstanceMap.put(cls, t);
}
/* renamed from: o.ndh$LWm */
/* loaded from: classes2.dex */
public static abstract class LWm<MessageType extends AbstractC16345ndh<MessageType, BuilderType>, BuilderType extends LWm<MessageType, BuilderType>> extends AbstractC16771rBp.RVV<MessageType, BuilderType> {
public MessageType a;
private boolean d = false;
private final MessageType e;
@Override // o.AbstractC16771rBp.RVV
protected final /* synthetic */ AbstractC16771rBp.RVV c(AbstractC16771rBp abstractC16771rBp) {
j();
MessageType messagetype = this.a;
mNa.a().e(messagetype.getClass()).c(messagetype, (AbstractC16345ndh) abstractC16771rBp);
return this;
}
public LWm(MessageType messagetype) {
this.e = messagetype;
this.a = (MessageType) messagetype.a(ojQ.NEW_MUTABLE_INSTANCE);
}
/* JADX INFO: Access modifiers changed from: protected */
public final void j() {
if (this.d) {
MessageType messagetype = (MessageType) this.a.a(ojQ.NEW_MUTABLE_INSTANCE);
mNa.a().e(messagetype.getClass()).c(messagetype, this.a);
this.a = messagetype;
this.d = false;
}
}
@Override // o.jGJ
public final boolean l() {
return AbstractC16345ndh.c(this.a, false);
}
@Override // o.vAr.Sts
/* renamed from: g, reason: merged with bridge method [inline-methods] */
public final MessageType h() {
MessageType messagetype;
if (this.d) {
messagetype = this.a;
} else {
MessageType messagetype2 = this.a;
mNa.a().e(messagetype2.getClass()).c(messagetype2);
this.d = true;
messagetype = this.a;
}
if (messagetype.l()) {
return messagetype;
}
throw new UninitializedMessageException();
}
public final BuilderType b(MessageType messagetype) {
j();
MessageType messagetype2 = this.a;
mNa.a().e(messagetype2.getClass()).c(messagetype2, messagetype);
return this;
}
/* JADX INFO: Access modifiers changed from: private */
@Override // o.vAr.Sts
/* renamed from: c, reason: merged with bridge method [inline-methods] */
public MessageType f() {
if (this.d) {
return this.a;
}
MessageType messagetype = this.a;
mNa.a().e(messagetype.getClass()).c(messagetype);
this.d = true;
return this.a;
}
@Override // o.AbstractC16771rBp.RVV
/* renamed from: b */
public final /* synthetic */ AbstractC16771rBp.RVV clone() {
LWm k = this.e.k();
MessageType f = f();
k.j();
MessageType messagetype = k.a;
mNa.a().e(messagetype.getClass()).c(messagetype, f);
return k;
}
@Override // o.AbstractC16771rBp.RVV
public /* synthetic */ Object clone() throws CloneNotSupportedException {
LWm k = this.e.k();
MessageType f = f();
k.j();
MessageType messagetype = k.a;
mNa.a().e(messagetype.getClass()).c(messagetype, f);
return k;
}
@Override // o.jGJ
public final /* bridge */ /* synthetic */ vAr o() {
return this.e;
}
}
/* renamed from: o.ndh$Sts */
/* loaded from: classes2.dex */
public static abstract class Sts<MessageType extends Sts<MessageType, BuilderType>, BuilderType extends Object<MessageType, BuilderType>> extends AbstractC16345ndh<MessageType, BuilderType> implements zbM<MessageType, BuilderType> {
protected QWH<HBt> extensions = QWH.a();
/* JADX INFO: Access modifiers changed from: package-private */
public final QWH<HBt> b() {
if (this.extensions.a) {
this.extensions = this.extensions.clone();
}
return this.extensions;
}
}
/* JADX INFO: Access modifiers changed from: package-private */
/* renamed from: o.ndh$HBt */
/* loaded from: classes2.dex */
public static final class HBt implements QWH.IeS<HBt> {
final C15775iXO.RVV a;
private boolean b;
final boolean d;
final int e;
@Override // java.lang.Comparable
public final /* bridge */ /* synthetic */ int compareTo(Object obj) {
int i = ((HBt) obj).e;
return 0;
}
@Override // o.QWH.IeS
public final C15775iXO.IeS c() {
throw null;
}
/* JADX WARN: Multi-variable type inference failed */
@Override // o.QWH.IeS
public final vAr.Sts a(vAr.Sts sts, vAr var) {
return ((LWm) sts).b((AbstractC16345ndh) var);
}
@Override // o.QWH.IeS
public final boolean b() {
return this.d;
}
@Override // o.QWH.IeS
public final boolean d() {
return this.b;
}
@Override // o.QWH.IeS
public final int e() {
return this.e;
}
@Override // o.QWH.IeS
public final C15775iXO.RVV a() {
return this.a;
}
}
/* JADX INFO: Access modifiers changed from: package-private */
public 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) {
throw ((RuntimeException) cause);
}
if (cause instanceof Error) {
throw ((Error) cause);
}
throw new RuntimeException("Unexpected exception thrown by generated accessor method.", cause);
}
}
protected static final <T extends AbstractC16345ndh<T, ?>> boolean c(T t, boolean z) {
byte byteValue = ((Byte) t.b(ojQ.GET_MEMOIZED_IS_INITIALIZED)).byteValue();
if (byteValue == 1) {
return true;
}
if (byteValue == 0) {
return false;
}
boolean d = mNa.a().e(t.getClass()).d(t);
if (z) {
t.b(ojQ.SET_MEMOIZED_IS_INITIALIZED);
}
return d;
}
/* renamed from: o.ndh$IeS */
/* loaded from: classes2.dex */
public static class IeS<T extends AbstractC16345ndh<T, ?>> extends tSA<T> {
private final T e;
public IeS(T t) {
this.e = t;
}
}
private static <T extends AbstractC16345ndh<T, ?>> T e(T t, SXg sXg, C1458aEp c1458aEp) throws InvalidProtocolBufferException {
JpZ jpZ;
T t2 = (T) t.b(ojQ.NEW_MUTABLE_INSTANCE);
try {
CSi e = mNa.a().e(t2.getClass());
if (sXg.b != null) {
jpZ = sXg.b;
} else {
jpZ = new JpZ(sXg);
}
e.c(t2, jpZ, c1458aEp);
e.c(t2);
return t2;
} catch (InvalidProtocolBufferException e2) {
boolean z = e2.b;
e2.c = t2;
throw e2;
} catch (IOException e3) {
if (e3.getCause() instanceof InvalidProtocolBufferException) {
throw ((InvalidProtocolBufferException) e3.getCause());
}
InvalidProtocolBufferException invalidProtocolBufferException = new InvalidProtocolBufferException(e3);
invalidProtocolBufferException.c = t2;
throw invalidProtocolBufferException;
} catch (RuntimeException e4) {
if (e4.getCause() instanceof InvalidProtocolBufferException) {
throw ((InvalidProtocolBufferException) e4.getCause());
}
throw e4;
}
}
private static <T extends AbstractC16345ndh<T, ?>> T c(T t, byte[] bArr, int i, C1458aEp c1458aEp) throws InvalidProtocolBufferException {
T t2 = (T) t.b(ojQ.NEW_MUTABLE_INSTANCE);
try {
CSi e = mNa.a().e(t2.getClass());
e.e(t2, bArr, 0, i, new dJF.Sts(c1458aEp));
e.c(t2);
if (t2.memoizedHashCode == 0) {
return t2;
}
throw new RuntimeException();
} catch (InvalidProtocolBufferException e2) {
boolean z = e2.b;
e2.c = t2;
throw e2;
} catch (IOException e3) {
if (e3.getCause() instanceof InvalidProtocolBufferException) {
throw ((InvalidProtocolBufferException) e3.getCause());
}
InvalidProtocolBufferException invalidProtocolBufferException = new InvalidProtocolBufferException(e3);
invalidProtocolBufferException.c = t2;
throw invalidProtocolBufferException;
} catch (IndexOutOfBoundsException unused) {
InvalidProtocolBufferException h = InvalidProtocolBufferException.h();
h.c = t2;
throw h;
}
}
public static <T extends AbstractC16345ndh<T, ?>> T d(T t, jra jraVar, C1458aEp c1458aEp) throws InvalidProtocolBufferException {
return (T) e(a(t, jraVar, c1458aEp));
}
private static <T extends AbstractC16345ndh<T, ?>> T a(T t, jra jraVar, C1458aEp c1458aEp) throws InvalidProtocolBufferException {
SXg b = jraVar.b();
T t2 = (T) e(t, b, c1458aEp);
try {
b.a();
return t2;
} catch (InvalidProtocolBufferException e) {
e.c = t2;
throw e;
}
}
public static <T extends AbstractC16345ndh<T, ?>> T d(T t, byte[] bArr, C1458aEp c1458aEp) throws InvalidProtocolBufferException {
return (T) e(c(t, bArr, bArr.length, c1458aEp));
}
private static <T extends AbstractC16345ndh<T, ?>> T e(T t) throws InvalidProtocolBufferException {
if (t == null || c(t, true)) {
return t;
}
InvalidProtocolBufferException invalidProtocolBufferException = new InvalidProtocolBufferException(new UninitializedMessageException().getMessage());
invalidProtocolBufferException.c = t;
throw invalidProtocolBufferException;
}
@Override // o.jGJ
public final /* synthetic */ vAr o() {
return (AbstractC16345ndh) b(ojQ.GET_DEFAULT_INSTANCE);
}
@Override // o.vAr
public final /* synthetic */ vAr.Sts m() {
return (LWm) b(ojQ.NEW_BUILDER);
}
@Override // o.vAr
public final /* synthetic */ vAr.Sts r() {
LWm lWm = (LWm) b(ojQ.NEW_BUILDER);
lWm.b(this);
return lWm;
}
/* JADX INFO: Access modifiers changed from: package-private */
@Override // o.AbstractC16771rBp
public final void b(int i) {
this.memoizedSerializedSize = i;
}
/* JADX INFO: Access modifiers changed from: package-private */
@Override // o.AbstractC16771rBp
public final int i() {
return this.memoizedSerializedSize;
}
}