@SuppressWarnings("unchecked")
    public static <T> Operation<T> operation(Class<? extends T> type, Operator operator,
                                             List<Expression<?>> args) {
        if (type.equals(Boolean.class)) {
            return (Operation<T>) new PredicateOperation(operator, args);
        } else {
            return new OperationImpl<T>(type, operator, args);
        }
    }
Create a new Operation expression

@param type type of expression
@param operator operator
@param args operation arguments
@return operation expression
querydsl-core/src/main/java/com/querydsl/core/types/ExpressionUtils.java