static Optional<Type> detectType(RowMapper<?> mapper) {
        Optional<Type> type = findGenericParameter(mapper.getClass(), RowMapper.class);

        return type.filter(t -> t != Object.class);
    }
A generic RowMapperFactory that reflectively inspects a
{@code RowMapper<T>} and maps only to columns of type
{@code T}.  The type parameter T must be accessible
via reflection or an {@link UnsupportedOperationException}
will be thrown.
core/src/main/java/org/jdbi/v3/core/mapper/InferredRowMapperFactory.java