exprRules.put(new RuleRegExp("R2", exprNodeFieldDesc.class.getName() + "%"), getFieldProcessor());
exprRules.put(new RuleRegExp("R3", exprNodeGenericFuncDesc.class.getName() + "%"), getGenericFuncProcessor());
// The dispatcher fires the processor corresponding to the closest matching rule and passes the context along
Dispatcher disp = new DefaultRuleDispatcher(getDefaultExprProcessor(), exprRules, exprContext);
GraphWalker egw = new DefaultGraphWalker(disp);
List<Node> startNodes = new ArrayList<Node>();
List<exprNodeDesc> clonedPreds = new ArrayList<exprNodeDesc>();
for (exprNodeDesc node : preds) {
clonedPreds.add((exprNodeDesc) node.clone());
}
startNodes.addAll(clonedPreds);
egw.startWalking(startNodes, null);
// check the root expression for final candidates
for (exprNodeDesc pred : clonedPreds) {
extractFinalCandidates(pred, exprContext);
}