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