/** * Builds the expression and leaf list from the original predicate. * @param expression the expression to translate * @return The normalized expression. */ ExpressionTree expression(ExprNodeGenericFuncDesc expression) { List<PredicateLeaf> leafCache = new ArrayList<PredicateLeaf>(); ExpressionTree expr = parse(expression, leafCache); return expression(expr, leafCache); }
private void addChildren(ExpressionTree result, ExprNodeGenericFuncDesc node, List<PredicateLeaf> leafCache) { for(ExprNodeDesc child: node.getChildren()) { result.children.add(parse(child, leafCache)); } }