@Test public void parseSelect() { String selectExpression = "select (employee.name, employee.age, employee.number) "; SelectNodeList sortNodeList = new SelectTokenParserAdapter().parse(selectExpression); assertNotNull(sortNodeList); List<String> sortNodes = sortNodeList.getFields(); assertEquals(3, sortNodes.size()); String firstField = sortNodes.get(0); assertEquals("employee.name", firstField); String secondField = sortNodes.get(1); assertEquals("employee.age", secondField); String thirdField = sortNodes.get(2); assertEquals("employee.number", thirdField); }
public SelectNodeList parse(String sortExpression) { try { return new SelectNodeList(createParser(sortExpression).parse()); } catch (ParseException | Error e) { throw new SelectParsingException(e); } }
SelectTokenParserAdapter { public SelectNodeList parse(String sortExpression) { try { return new SelectNodeList(createParser(sortExpression).parse()); } catch (ParseException | Error e) { throw new SelectParsingException(e); } } }
SelectTokenParserAdapter { public SelectNodeList parse(String sortExpression) { try { return new SelectNodeList(createParser(sortExpression).parse()); } catch (ParseException | Error e) { throw new SelectParsingException(e); } }  }
SelectTokenParserAdapter { public SelectNodeList parse(String sortExpression) { try { return new SelectNodeList(createParser(sortExpression).parse()); } catch (ParseException | Error e) { throw new SelectParsingException(e); } }  SelectNodeList parse(String sortExpression); }
SelectTokenParserAdapter { public SelectNodeList parse(String sortExpression) { try { return new SelectNodeList(createParser(sortExpression).parse()); } catch (ParseException | Error e) { throw new SelectParsingException(e); } }  SelectNodeList parse(String sortExpression);  }