kt = vt = TypeFactory.unknownType();
} else {
kt = tps[0];
vt = tps[1];
}
TypeDeserializer vts = (TypeDeserializer) vt.getTypeHandler();
if (vts == null) {
vts = findTypeDeserializer(config, vt);
}
JsonDeserializer<Object> valueDeser = vt.getValueHandler();
KeyDeserializer keyDes = (KeyDeserializer) kt.getValueHandler();
return new MapEntryDeserializer(type, keyDes, valueDeser, vts);
}
String clsName = rawType.getName();
if (rawType.isPrimitive() || clsName.startsWith("java.")) {
// Primitives/wrappers, other Numbers:
JsonDeserializer<?> deser = NumberDeserializers.find(rawType, clsName);
if (deser == null) {
deser = DateDeserializers.find(rawType, clsName);
}
if (deser != null) {
return deser;
}
}
// and a few Jackson types as well:
if (rawType == TokenBuffer.class) {
return new TokenBufferDeserializer();
}
if (AtomicReference.class.isAssignableFrom(rawType)) {
// Must find parameterization
TypeFactory tf = ctxt.getTypeFactory();
JavaType[] params = tf.findTypeParameters(type, AtomicReference.class);
JavaType referencedType;
if (params == null || params.length < 1) { // untyped (raw)
referencedType = TypeFactory.unknownType();
} else {
referencedType = params[0];
}
TypeDeserializer vts = findTypeDeserializer(ctxt.getConfig(), referencedType);
BeanDescription refdDesc = ctxt.getConfig().introspectClassAnnotations(referencedType);
JsonDeserializer<?> deser = findDeserializerFromAnnotation(ctxt, refdDesc.getClassInfo());
return new AtomicReferenceDeserializer(referencedType, vts, deser);
}
JsonDeserializer<?> deser = findOptionalStdDeserializer(ctxt, type, beanDesc);