private static Type projectionType(Projection<?> projection) {
    try {
      return projectionTypeInternal(projection);
    } catch (ClassNotFoundException|NoSuchFieldException e) {
      final Path path = (Path) Matchers.toExpression(projection);
      throw new RuntimeException("For path " + path, e);
    }
  }
Check return and projection types for different types of matchers
criteria/common/test/org/immutables/criteria/matcher/ReturnTypeTest.java