code: 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 new Function<F,T>() {
                  @Override
                  public T apply(F input) {
                      return ev.evaluate(input);
                  }
              };
          } else {
              throw new IllegalArgumentException("No path in " + projection);
          }
      }
docs: Wrap a Querydsl expression into a Guava function
  
  @param projection projection to wrap
  @return Guava function