@Test public void testParseExpression2() throws Exception { Expression result = CCJSqlParserUtil.parseExpression("2*(a+6.0)"); assertEquals("2 * (a + 6.0)", result.toString()); assertTrue(result instanceof Multiplication); Multiplication mult = (Multiplication)result; assertTrue(mult.getLeftExpression() instanceof LongValue); assertTrue(mult.getRightExpression() instanceof Parenthesis); }
public static Expression parseExpression(String expression) throws JSQLParserException { CCJSqlParser parser = new CCJSqlParser(new StringReader(expression)); try { return parser.SimpleExpression(); } catch (Exception ex) { throw new JSQLParserException(ex); } }
CCJSqlParserUtil { public static Expression parseExpression(String expression) throws JSQLParserException { CCJSqlParser parser = new CCJSqlParser(new StringReader(expression)); try { return parser.SimpleExpression(); } catch (Exception ex) { throw new JSQLParserException(ex); } } }
CCJSqlParserUtil { public static Expression parseExpression(String expression) throws JSQLParserException { CCJSqlParser parser = new CCJSqlParser(new StringReader(expression)); try { return parser.SimpleExpression(); } catch (Exception ex) { throw new JSQLParserException(ex); } } private  CCJSqlParserUtil(); }
CCJSqlParserUtil { public static Expression parseExpression(String expression) throws JSQLParserException { CCJSqlParser parser = new CCJSqlParser(new StringReader(expression)); try { return parser.SimpleExpression(); } catch (Exception ex) { throw new JSQLParserException(ex); } } private  CCJSqlParserUtil(); static Statement parse(Reader statementReader); static Statement parse(String sql); static Node parseAST(String sql); static Statement parse(InputStream is); static Statement parse(InputStream is, String encoding); static Expression parseExpression(String expression); static Expression parseCondExpression(String condExpr); static Statements parseStatements(String sqls); }
CCJSqlParserUtil { public static Expression parseExpression(String expression) throws JSQLParserException { CCJSqlParser parser = new CCJSqlParser(new StringReader(expression)); try { return parser.SimpleExpression(); } catch (Exception ex) { throw new JSQLParserException(ex); } } private  CCJSqlParserUtil(); static Statement parse(Reader statementReader); static Statement parse(String sql); static Node parseAST(String sql); static Statement parse(InputStream is); static Statement parse(InputStream is, String encoding); static Expression parseExpression(String expression); static Expression parseCondExpression(String condExpr); static Statements parseStatements(String sqls);  }