136 lines
4.4 KiB
Java
136 lines
4.4 KiB
Java
package b.g.a.c.g0.u;
|
|
|
|
import b.g.a.a.i;
|
|
import b.g.a.c.d;
|
|
import b.g.a.c.e0.g;
|
|
import b.g.a.c.g0.h;
|
|
import b.g.a.c.g0.i;
|
|
import b.g.a.c.g0.t.l;
|
|
import b.g.a.c.j;
|
|
import b.g.a.c.n;
|
|
import b.g.a.c.w;
|
|
import b.g.a.c.x;
|
|
import com.fasterxml.jackson.databind.JsonMappingException;
|
|
import java.io.IOException;
|
|
import java.util.Objects;
|
|
/* compiled from: AsArraySerializerBase.java */
|
|
/* loaded from: classes3.dex */
|
|
public abstract class b<T> extends h<T> implements i {
|
|
public l _dynamicSerializers;
|
|
public final n<Object> _elementSerializer;
|
|
public final j _elementType;
|
|
public final d _property;
|
|
public final boolean _staticTyping;
|
|
public final Boolean _unwrapSingle;
|
|
public final g _valueTypeSerializer;
|
|
|
|
public b(b<?> bVar, d dVar, g gVar, n<?> nVar, Boolean bool) {
|
|
super(bVar);
|
|
this._elementType = bVar._elementType;
|
|
this._staticTyping = bVar._staticTyping;
|
|
this._valueTypeSerializer = gVar;
|
|
this._property = dVar;
|
|
this._elementSerializer = nVar;
|
|
this._dynamicSerializers = l.b.f703b;
|
|
this._unwrapSingle = bool;
|
|
}
|
|
|
|
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
|
public b(Class<?> cls, j jVar, boolean z2, g gVar, n<Object> nVar) {
|
|
super(cls, false);
|
|
boolean z3 = false;
|
|
this._elementType = jVar;
|
|
if (z2 || (jVar != null && jVar.x())) {
|
|
z3 = true;
|
|
}
|
|
this._staticTyping = z3;
|
|
this._valueTypeSerializer = gVar;
|
|
this._property = null;
|
|
this._elementSerializer = nVar;
|
|
this._dynamicSerializers = l.b.f703b;
|
|
this._unwrapSingle = null;
|
|
}
|
|
|
|
/* JADX WARN: Removed duplicated region for block: B:15:0x0029 */
|
|
/* JADX WARN: Removed duplicated region for block: B:17:0x0031 */
|
|
@Override // b.g.a.c.g0.i
|
|
/*
|
|
Code decompiled incorrectly, please refer to instructions dump.
|
|
*/
|
|
public n<?> a(x xVar, d dVar) throws JsonMappingException {
|
|
n<?> nVar;
|
|
i.d l;
|
|
n<?> k;
|
|
j jVar;
|
|
Object c;
|
|
g gVar = this._valueTypeSerializer;
|
|
if (gVar != null) {
|
|
gVar = gVar.a(dVar);
|
|
}
|
|
Boolean bool = null;
|
|
if (dVar != null) {
|
|
b.g.a.c.b v = xVar.v();
|
|
b.g.a.c.c0.i member = dVar.getMember();
|
|
if (!(member == null || (c = v.c(member)) == null)) {
|
|
nVar = xVar.H(member, c);
|
|
l = l(xVar, dVar, this._handledType);
|
|
if (l != null) {
|
|
bool = l.b(i.a.WRITE_SINGLE_ELEM_ARRAYS_UNWRAPPED);
|
|
}
|
|
if (nVar == null) {
|
|
nVar = this._elementSerializer;
|
|
}
|
|
k = k(xVar, dVar, nVar);
|
|
if (k == null && (jVar = this._elementType) != null && this._staticTyping && !jVar.y()) {
|
|
k = xVar.m(this._elementType, dVar);
|
|
}
|
|
return (k == this._elementSerializer || dVar != this._property || this._valueTypeSerializer != gVar || !Objects.equals(this._unwrapSingle, bool)) ? t(dVar, gVar, k, bool) : this;
|
|
}
|
|
}
|
|
nVar = null;
|
|
l = l(xVar, dVar, this._handledType);
|
|
if (l != null) {
|
|
}
|
|
if (nVar == null) {
|
|
}
|
|
k = k(xVar, dVar, nVar);
|
|
if (k == null) {
|
|
k = xVar.m(this._elementType, dVar);
|
|
}
|
|
if (k == this._elementSerializer) {
|
|
}
|
|
}
|
|
|
|
@Override // b.g.a.c.n
|
|
public void f(T t, b.g.a.b.d dVar, x xVar) throws IOException {
|
|
if (!xVar.D(w.WRITE_SINGLE_ELEM_ARRAYS_UNWRAPPED) || !q(t)) {
|
|
dVar.X(t);
|
|
s(t, dVar, xVar);
|
|
dVar.t();
|
|
return;
|
|
}
|
|
s(t, dVar, xVar);
|
|
}
|
|
|
|
@Override // b.g.a.c.n
|
|
public void g(T t, b.g.a.b.d dVar, x xVar, g gVar) throws IOException {
|
|
b.g.a.b.s.b e = gVar.e(dVar, gVar.d(t, b.g.a.b.h.START_ARRAY));
|
|
dVar.e(t);
|
|
s(t, dVar, xVar);
|
|
gVar.f(dVar, e);
|
|
}
|
|
|
|
public final n<Object> r(l lVar, Class<?> cls, x xVar) throws JsonMappingException {
|
|
n<Object> n = xVar.n(cls, this._property);
|
|
l b2 = lVar.b(cls, n);
|
|
if (lVar != b2) {
|
|
this._dynamicSerializers = b2;
|
|
}
|
|
return n;
|
|
}
|
|
|
|
public abstract void s(T t, b.g.a.b.d dVar, x xVar) throws IOException;
|
|
|
|
public abstract b<T> t(d dVar, g gVar, n<?> nVar, Boolean bool);
|
|
}
|