@Test public void selectNodesTest() { AstNodeXPathQuery<AstNode> expr = AstNodeXPathQuery.create(" AstNode tree = new AstNode(new NodeType(), "tree", null); AstNode branch = new AstNode(new NodeType(), "branch", null); AstNode leaf1 = new AstNode(new NodeType(), "leaf", null); AstNode leaf2 = new AstNode(new NodeType(), "leaf", null); tree.addChild(branch); branch.addChild(leaf1); branch.addChild(leaf2); assertThat(expr.selectNodes(tree).size()).isEqualTo(2); }
public List<T> selectNodes(AstNode astNode) { try { astNodeNavigator.reset(); return expression.selectNodes(astNode); } catch (JaxenException e) { throw new RuntimeException(e); } }
AstNodeXPathQuery { public List<T> selectNodes(AstNode astNode) { try { astNodeNavigator.reset(); return expression.selectNodes(astNode); } catch (JaxenException e) { throw new RuntimeException(e); } } }
AstNodeXPathQuery { public List<T> selectNodes(AstNode astNode) { try { astNodeNavigator.reset(); return expression.selectNodes(astNode); } catch (JaxenException e) { throw new RuntimeException(e); } } private  AstNodeXPathQuery(String xpath); }
AstNodeXPathQuery { public List<T> selectNodes(AstNode astNode) { try { astNodeNavigator.reset(); return expression.selectNodes(astNode); } catch (JaxenException e) { throw new RuntimeException(e); } } private  AstNodeXPathQuery(String xpath); T selectSingleNode(AstNode astNode); List<T> selectNodes(AstNode astNode); static AstNodeXPathQuery<E> create(String xpath); }
AstNodeXPathQuery { public List<T> selectNodes(AstNode astNode) { try { astNodeNavigator.reset(); return expression.selectNodes(astNode); } catch (JaxenException e) { throw new RuntimeException(e); } } private  AstNodeXPathQuery(String xpath); T selectSingleNode(AstNode astNode); List<T> selectNodes(AstNode astNode); static AstNodeXPathQuery<E> create(String xpath);  }