291 lines
11 KiB
Java
291 lines
11 KiB
Java
package c.g.a.c;
|
|
|
|
import c.g.a.a.i0;
|
|
import c.g.a.c.c0.b;
|
|
import c.g.a.c.c0.s;
|
|
import c.g.a.c.g0.j;
|
|
import c.g.a.c.g0.o;
|
|
import c.g.a.c.g0.p;
|
|
import c.g.a.c.g0.t.c;
|
|
import c.g.a.c.g0.t.m;
|
|
import c.g.a.c.g0.t.q;
|
|
import c.g.a.c.g0.u.u;
|
|
import c.g.a.c.h0.n;
|
|
import c.g.a.c.i0.d;
|
|
import c.g.a.c.z.i;
|
|
import com.fasterxml.jackson.databind.JsonMappingException;
|
|
import com.fasterxml.jackson.databind.exc.InvalidDefinitionException;
|
|
import java.io.IOException;
|
|
import java.text.DateFormat;
|
|
import java.util.Map;
|
|
/* compiled from: SerializerProvider */
|
|
public abstract class x extends e {
|
|
public static final n<Object> i = new c("Null key for a Map not allowed in JSON (use a converting NullKeySerializer?)");
|
|
public static final n<Object> j = new q();
|
|
public final v _config;
|
|
public DateFormat _dateFormat;
|
|
public n<Object> _keySerializer;
|
|
public final m _knownSerializers;
|
|
public n<Object> _nullKeySerializer;
|
|
public n<Object> _nullValueSerializer;
|
|
public final Class<?> _serializationView;
|
|
public final p _serializerCache;
|
|
public final c.g.a.c.g0.q _serializerFactory;
|
|
public final boolean _stdNullValueSerializer;
|
|
public n<Object> _unknownTypeSerializer;
|
|
public transient i k;
|
|
|
|
public x() {
|
|
this._unknownTypeSerializer = j;
|
|
this._nullValueSerializer = u.j;
|
|
this._nullKeySerializer = i;
|
|
this._config = null;
|
|
this._serializerFactory = null;
|
|
this._serializerCache = new p();
|
|
this._knownSerializers = null;
|
|
this._serializationView = null;
|
|
this.k = null;
|
|
this._stdNullValueSerializer = true;
|
|
}
|
|
|
|
public x(x xVar, v vVar, c.g.a.c.g0.q qVar) {
|
|
this._unknownTypeSerializer = j;
|
|
this._nullValueSerializer = u.j;
|
|
n<Object> nVar = i;
|
|
this._nullKeySerializer = nVar;
|
|
this._serializerFactory = qVar;
|
|
this._config = vVar;
|
|
p pVar = xVar._serializerCache;
|
|
this._serializerCache = pVar;
|
|
this._unknownTypeSerializer = xVar._unknownTypeSerializer;
|
|
this._keySerializer = xVar._keySerializer;
|
|
n<Object> nVar2 = xVar._nullValueSerializer;
|
|
this._nullValueSerializer = nVar2;
|
|
this._nullKeySerializer = xVar._nullKeySerializer;
|
|
this._stdNullValueSerializer = nVar2 == nVar;
|
|
this._serializationView = vVar._view;
|
|
this.k = vVar._attributes;
|
|
m mVar = pVar.b.get();
|
|
if (mVar == null) {
|
|
synchronized (pVar) {
|
|
mVar = pVar.b.get();
|
|
if (mVar == null) {
|
|
m mVar2 = new m(pVar.a);
|
|
pVar.b.set(mVar2);
|
|
mVar = mVar2;
|
|
}
|
|
}
|
|
}
|
|
this._knownSerializers = mVar;
|
|
}
|
|
|
|
public abstract Object A(s sVar, Class<?> cls) throws JsonMappingException;
|
|
|
|
public abstract boolean B(Object obj) throws JsonMappingException;
|
|
|
|
public final boolean C(p pVar) {
|
|
return pVar.h(this._config._mapperFeatures);
|
|
}
|
|
|
|
public final boolean D(w wVar) {
|
|
return this._config.v(wVar);
|
|
}
|
|
|
|
/* JADX DEBUG: Can't convert new array creation: APUT found in different block: 0x003f: APUT (r3v2 java.lang.Object[]), (0 ??[int, short, byte, char]), (r2v3 java.lang.String) */
|
|
public <T> T E(c cVar, s sVar, String str, Object... objArr) throws JsonMappingException {
|
|
String str2;
|
|
String a = a(str, objArr);
|
|
String str3 = "N/A";
|
|
if (sVar != null) {
|
|
String p = sVar.p();
|
|
if (p == null) {
|
|
str2 = "[N/A]";
|
|
} else {
|
|
Object[] objArr2 = new Object[1];
|
|
if (p.length() > 500) {
|
|
p = p.substring(0, 500) + "]...[" + p.substring(p.length() - 500);
|
|
}
|
|
objArr2[0] = p;
|
|
str2 = String.format("\"%s\"", objArr2);
|
|
}
|
|
} else {
|
|
str2 = str3;
|
|
}
|
|
if (cVar != null) {
|
|
str3 = d.u(cVar.a._class);
|
|
}
|
|
throw new InvalidDefinitionException(((j) this).n, String.format("Invalid definition for property %s (of type %s): %s", str2, str3, a), cVar, sVar);
|
|
}
|
|
|
|
public <T> T F(c cVar, String str, Object... objArr) throws JsonMappingException {
|
|
throw new InvalidDefinitionException(((j) this).n, String.format("Invalid type definition for type %s: %s", d.u(cVar.a._class), a(str, objArr)), cVar, null);
|
|
}
|
|
|
|
public void G(String str, Object... objArr) throws JsonMappingException {
|
|
throw new JsonMappingException(((j) this).n, a(str, objArr), null);
|
|
}
|
|
|
|
public abstract n<Object> H(b bVar, Object obj) throws JsonMappingException;
|
|
|
|
@Override // c.g.a.c.e
|
|
public final n d() {
|
|
return this._config._base._typeFactory;
|
|
}
|
|
|
|
@Override // c.g.a.c.e
|
|
public <T> T f(j jVar, String str) throws JsonMappingException {
|
|
throw new InvalidDefinitionException(((j) this).n, str, jVar);
|
|
}
|
|
|
|
public n<Object> h(j jVar) throws JsonMappingException {
|
|
try {
|
|
n<Object> b = this._serializerFactory.b(this, jVar);
|
|
if (b != null) {
|
|
p pVar = this._serializerCache;
|
|
synchronized (pVar) {
|
|
if (pVar.a.put(new c.g.a.c.i0.u(jVar, false), b) == null) {
|
|
pVar.b.set(null);
|
|
}
|
|
if (b instanceof o) {
|
|
((o) b).b(this);
|
|
}
|
|
}
|
|
}
|
|
return b;
|
|
} catch (IllegalArgumentException e) {
|
|
throw new JsonMappingException(((j) this).n, a(d.h(e), new Object[0]), e);
|
|
}
|
|
}
|
|
|
|
public n<Object> i(Class<?> cls) throws JsonMappingException {
|
|
j b = this._config._base._typeFactory.b(null, cls, n.k);
|
|
try {
|
|
n<Object> b2 = this._serializerFactory.b(this, b);
|
|
if (b2 != null) {
|
|
p pVar = this._serializerCache;
|
|
synchronized (pVar) {
|
|
n<Object> put = pVar.a.put(new c.g.a.c.i0.u(cls, false), b2);
|
|
n<Object> put2 = pVar.a.put(new c.g.a.c.i0.u(b, false), b2);
|
|
if (put == null || put2 == null) {
|
|
pVar.b.set(null);
|
|
}
|
|
if (b2 instanceof o) {
|
|
((o) b2).b(this);
|
|
}
|
|
}
|
|
}
|
|
return b2;
|
|
} catch (IllegalArgumentException e) {
|
|
throw new JsonMappingException(((j) this).n, a(d.h(e), new Object[0]), e);
|
|
}
|
|
}
|
|
|
|
public final DateFormat j() {
|
|
DateFormat dateFormat = this._dateFormat;
|
|
if (dateFormat != null) {
|
|
return dateFormat;
|
|
}
|
|
DateFormat dateFormat2 = (DateFormat) this._config._base._dateFormat.clone();
|
|
this._dateFormat = dateFormat2;
|
|
return dateFormat2;
|
|
}
|
|
|
|
public j k(j jVar, Class<?> cls) throws IllegalArgumentException {
|
|
return jVar._class == cls ? jVar : this._config._base._typeFactory.h(jVar, cls, true);
|
|
}
|
|
|
|
public final void l(c.g.a.b.d dVar) throws IOException {
|
|
if (this._stdNullValueSerializer) {
|
|
dVar.B();
|
|
} else {
|
|
this._nullValueSerializer.f(null, dVar, this);
|
|
}
|
|
}
|
|
|
|
public n<Object> m(j jVar, d dVar) throws JsonMappingException {
|
|
n<Object> a = this._knownSerializers.a(jVar);
|
|
return (a == null && (a = this._serializerCache.a(jVar)) == null && (a = h(jVar)) == null) ? x(jVar._class) : z(a, dVar);
|
|
}
|
|
|
|
public n<Object> n(Class<?> cls, d dVar) throws JsonMappingException {
|
|
n<Object> b = this._knownSerializers.b(cls);
|
|
return (b == null && (b = this._serializerCache.b(cls)) == null && (b = this._serializerCache.a(this._config._base._typeFactory.b(null, cls, n.k))) == null && (b = i(cls)) == null) ? x(cls) : z(b, dVar);
|
|
}
|
|
|
|
public n<Object> o(j jVar, d dVar) throws JsonMappingException {
|
|
n<Object> a = this._serializerFactory.a(this, jVar, this._keySerializer);
|
|
if (a instanceof o) {
|
|
((o) a).b(this);
|
|
}
|
|
return z(a, dVar);
|
|
}
|
|
|
|
public abstract c.g.a.c.g0.t.u p(Object obj, i0<?> i0Var);
|
|
|
|
public n<Object> q(j jVar, d dVar) throws JsonMappingException {
|
|
n<Object> a = this._knownSerializers.a(jVar);
|
|
return (a == null && (a = this._serializerCache.a(jVar)) == null && (a = h(jVar)) == null) ? x(jVar._class) : y(a, dVar);
|
|
}
|
|
|
|
public n<Object> r(Class<?> cls, d dVar) throws JsonMappingException {
|
|
n<Object> b = this._knownSerializers.b(cls);
|
|
return (b == null && (b = this._serializerCache.b(cls)) == null && (b = this._serializerCache.a(this._config._base._typeFactory.b(null, cls, n.k))) == null && (b = i(cls)) == null) ? x(cls) : y(b, dVar);
|
|
}
|
|
|
|
public n<Object> s(j jVar) throws JsonMappingException {
|
|
n<Object> a = this._knownSerializers.a(jVar);
|
|
if (a != null) {
|
|
return a;
|
|
}
|
|
n<Object> a2 = this._serializerCache.a(jVar);
|
|
if (a2 != null) {
|
|
return a2;
|
|
}
|
|
n<Object> h = h(jVar);
|
|
return h == null ? x(jVar._class) : h;
|
|
}
|
|
|
|
public n<Object> t(j jVar, d dVar) throws JsonMappingException {
|
|
if (jVar != null) {
|
|
n<Object> a = this._knownSerializers.a(jVar);
|
|
return (a == null && (a = this._serializerCache.a(jVar)) == null && (a = h(jVar)) == null) ? x(jVar._class) : z(a, dVar);
|
|
}
|
|
G("Null passed for `valueType` of `findValueSerializer()`", new Object[0]);
|
|
throw null;
|
|
}
|
|
|
|
public n<Object> u(Class<?> cls, d dVar) throws JsonMappingException {
|
|
n<Object> b = this._knownSerializers.b(cls);
|
|
return (b == null && (b = this._serializerCache.b(cls)) == null && (b = this._serializerCache.a(this._config._base._typeFactory.b(null, cls, n.k))) == null && (b = i(cls)) == null) ? x(cls) : z(b, dVar);
|
|
}
|
|
|
|
public final b v() {
|
|
return this._config.e();
|
|
}
|
|
|
|
public Object w(Object obj) {
|
|
Object obj2;
|
|
i.a aVar = (i.a) this.k;
|
|
Map<Object, Object> map = aVar.k;
|
|
if (map == null || (obj2 = map.get(obj)) == null) {
|
|
return aVar._shared.get(obj);
|
|
}
|
|
if (obj2 == i.a.j) {
|
|
return null;
|
|
}
|
|
return obj2;
|
|
}
|
|
|
|
public n<Object> x(Class<?> cls) {
|
|
return cls == Object.class ? this._unknownTypeSerializer : new q(cls);
|
|
}
|
|
|
|
public n<?> y(n<?> nVar, d dVar) throws JsonMappingException {
|
|
return (nVar == null || !(nVar instanceof c.g.a.c.g0.i)) ? nVar : ((c.g.a.c.g0.i) nVar).a(this, dVar);
|
|
}
|
|
|
|
public n<?> z(n<?> nVar, d dVar) throws JsonMappingException {
|
|
return (nVar == null || !(nVar instanceof c.g.a.c.g0.i)) ? nVar : ((c.g.a.c.g0.i) nVar).a(this, dVar);
|
|
}
|
|
}
|