@SuppressWarnings("unchecked")
    public static <T> SimpleExpression<T> create(T val) {
        if (val instanceof Boolean) {
            return (SimpleExpression<T>) BooleanConstant.create((Boolean) val);
        } else {
            return new SimpleConstant<T>(val);
        }
    }
Factory method for constants

@param <D>
@param val
@return
querydsl-core/src/test/java/com/querydsl/core/SimpleConstant.java