@SuppressWarnings("unchecked")
    public <A> A createAliasForExpr(Class<A> cl, Expression<? extends A> expr) {
        try {
            final Map<Expression<?>, ManagedObject> expressionCache = proxyCache.computeIfAbsent(cl, a -> Collections.synchronizedMap(new WeakHashMap<>()));
            return (A) expressionCache.computeIfAbsent(expr, e -> (ManagedObject) createProxy(cl, expr));
        } catch (ClassCastException e) {
           throw new QueryException(e);
        }
    }
Create an alias instance for the given class and Expression

@param <A>
@param cl type for alias
@param expr underlying expression
@return alias instance
querydsl-core/src/main/java/com/querydsl/core/alias/AliasFactory.java