@Test public void shouldParsePredicatesWithAttributeLikeStringLiteral() { assertThat(parser.parsePredicates(tokenize("[jcr:like(@jcr:title,'%something%')]")), is(predicates(functionCall(nameTest("jcr", "like"), attributeNameTest(nameTest("jcr", "title")), literal("%something%"))))); }
protected List<Component> parsePredicates( TokenStream tokens ) { List<Component> predicates = new ArrayList<Component>(); while (tokens.canConsume('[')) { predicates.add(collapse(parseExpr(tokens))); tokens.consume(']'); } return predicates; }
XPathParser { protected List<Component> parsePredicates( TokenStream tokens ) { List<Component> predicates = new ArrayList<Component>(); while (tokens.canConsume('[')) { predicates.add(collapse(parseExpr(tokens))); tokens.consume(']'); } return predicates; } }
XPathParser { protected List<Component> parsePredicates( TokenStream tokens ) { List<Component> predicates = new ArrayList<Component>(); while (tokens.canConsume('[')) { predicates.add(collapse(parseExpr(tokens))); tokens.consume(']'); } return predicates; } XPathParser( TypeSystem context ); }
XPathParser { protected List<Component> parsePredicates( TokenStream tokens ) { List<Component> predicates = new ArrayList<Component>(); while (tokens.canConsume('[')) { predicates.add(collapse(parseExpr(tokens))); tokens.consume(']'); } return predicates; } XPathParser( TypeSystem context ); Component parseXPath( String xpath ); }
XPathParser { protected List<Component> parsePredicates( TokenStream tokens ) { List<Component> predicates = new ArrayList<Component>(); while (tokens.canConsume('[')) { predicates.add(collapse(parseExpr(tokens))); tokens.consume(']'); } return predicates; } XPathParser( TypeSystem context ); Component parseXPath( String xpath );  }