public static <F,T> Function<F,T> wrap(Expression<T> projection) {
        Path<?> path = projection.accept(PathExtractor.DEFAULT, null);
        if (path != null) {
            final Evaluator<T> ev = createEvaluator(path.getRoot(), projection);
            return ev::evaluate;
        } else {
            throw new IllegalArgumentException("No path in " + projection);
        }
    }
Wrap a Querydsl expression into a Guava function

@param projection projection to wrap
@return Guava function
querydsl-collections/src/main/java/com/querydsl/collections/FunctionalHelpers.java