public static Expression toExpression(Projection<?> projection) {
    Objects.requireNonNull(projection, "projection");
    CriteriaContext context = extract((Matcher) projection);
    return context.expression();
  }
Gets generic type variable of aggregation interface.
criteria/common/src/org/immutables/criteria/matcher/Matchers.java