public static String toPropertyPath( Expression<?> expr, char propertySeparator, char collectionSeparator) { Stack<String> results = new Stack<>(); expr.accept( new PropertyPathExpressionVisitor( String.valueOf(propertySeparator), String.valueOf(collectionSeparator)), results); StringBuilder sb = new StringBuilder(); while (!results.isEmpty()) { sb.append(results.pop()); } return StringUtils.stripEnd( sb.toString(), String.valueOf(propertySeparator) + String.valueOf(collectionSeparator)); }
public Object handle(Expression<?> expression) { return expression.accept(this, null); }