static Optional<ResultReturner> findConsumerArgument(Method method) {
        Optional<ResultReturner> result = Optional.empty();

        final Class<?>[] paramTypes = method.getParameterTypes();
        for (int consumerIndex = 0; consumerIndex < paramTypes.length; consumerIndex++) {
            if (paramTypes[consumerIndex] == Consumer.class) {
                if (result.isPresent()) {
                    throw new IllegalArgumentException(format("Method %s has multiple consumer arguments!", method));
                }
                result = Optional.of(ConsumerResultReturner.of(method, consumerIndex));
            }
        }

        return result;
    }
Inspect a Method for a {@link Consumer} to execute for each produced row.

@param method the method called
@return a ResultReturner that invokes the consumer and does not return a value
sqlobject/src/main/java/org/jdbi/v3/sqlobject/statement/internal/ResultReturner.java