private static Map<String,Expression<?>> createBindings(Expression<?>... args) {
        Map<String, Expression<?>> rv = new LinkedHashMap<>();
        for (Expression<?> expr : args) {
            if (expr instanceof Path<?>) {
                Path<?> path = (Path<?>) expr;
                rv.put(path.getMetadata().getName(), expr);
            } else if (expr instanceof Operation<?>) {
                Operation<?> operation = (Operation<?>) expr;
                if (operation.getOperator() == Ops.ALIAS && operation.getArg(1) instanceof Path<?>) {
                    Path<?> path = (Path<?>) operation.getArg(1);
                    if (isCompoundExpression(operation.getArg(0))) {
                        rv.put(path.getMetadata().getName(), operation.getArg(0));
                    } else {
                        rv.put(path.getMetadata().getName(), operation);
                    }
                } else {
                    throw new IllegalArgumentException("Unsupported expression " + expr);
                }

            } else {
                throw new IllegalArgumentException("Unsupported expression " + expr);
            }
        }
        return Collections.unmodifiableMap(rv);
    }
{@code QBean} is a JavaBean populating projection type

<p>Example</p>

<pre>
{@code
QEmployee employee = QEmployee.employee;
List<EmployeeInfo> result = query.from(employee)
     .where(employee.valid.eq(true))
     .select(Projections.bean(EmployeeInfo.class, employee.firstName, employee.lastName))
     .fetch();
}
</pre>

@author tiwe

@param <T> bean type
querydsl-core/src/main/java/com/querydsl/core/types/QBean.java