Serializer<?> serializer = SerializerTypeInferer.getSerializer(type);
if (serializer == null && Serializable.class.isAssignableFrom(type)) {
serializer = ObjectSerializer.get();
}
if (serializer == null) {
throw new SerializerNotFoundException(type);
}
return (Serializer<T>) serializer;
}