static Optional<ResultReturner> findFunctionArgument(Type returnType, Method method) {
        Optional<ResultReturner> result = Optional.empty();

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

        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