@Override
    public Set<RelationalPath<?>> visit(TemplateExpression<?> expr, Set<RelationalPath<?>> known) {
        for (Object arg : expr.getArgs()) {
            if (arg instanceof Expression<?>) {
                known = ((Expression<?>) arg).accept(this, known);
            }
        }
        return known;
    }
{@code RelationalPathExtractor} extracts {@link RelationalPath} instances from expressions and queries

@author tiwe
querydsl-sql/src/main/java/com/querydsl/sql/RelationalPathExtractor.java