private static <U extends BeanPath<? extends T>, T> Class<? extends T> getConcreteEntitySubType(Class<U> subtype) {
        return (Class<? extends T>) ((ParameterizedType) subtype.getGenericSuperclass()).getActualTypeArguments()[0];
    }
Create a type(path) expression

@param path entity
@return type(path)
querydsl-jpa/src/main/java/com/querydsl/jpa/JPAExpressions.java