@SuppressWarnings({ "unchecked", "rawtypes" })
    public static <D> SimpleExpression<D> constantAs(D source, Path<D> alias) {
        if (source == null) {
            return as((Expression) nullExpression(), alias);
        } else {
            return as(ConstantImpl.create(source), alias);
        }
    }
Create a {@code source as alias} expression

@param source source
@param alias alias
@return source as alias
querydsl-core/src/main/java/com/querydsl/core/types/dsl/Expressions.java