@Test public void resolve_ref_expression() { BindingTuple bindingTuple = ExprValueUtils.tupleValue(ImmutableMap.of("ip", "209.160.24.63")).bindingTuples(); assertEquals(ExprValueUtils.stringValue("209.160.24.63"), bindingTuple.resolve(DSL.ref("ip", STRING))); }
@Override public ExprValue resolve(Expression var) { if (var instanceof ReferenceExpression) { return resolve(((ReferenceExpression) var)); } else { throw new ExpressionEvaluationException(String.format("can resolve expression: %s", var)); } }
BindingTuple implements Environment<Expression, ExprValue> { @Override public ExprValue resolve(Expression var) { if (var instanceof ReferenceExpression) { return resolve(((ReferenceExpression) var)); } else { throw new ExpressionEvaluationException(String.format("can resolve expression: %s", var)); } } }
BindingTuple implements Environment<Expression, ExprValue> { @Override public ExprValue resolve(Expression var) { if (var instanceof ReferenceExpression) { return resolve(((ReferenceExpression) var)); } else { throw new ExpressionEvaluationException(String.format("can resolve expression: %s", var)); } }  }
BindingTuple implements Environment<Expression, ExprValue> { @Override public ExprValue resolve(Expression var) { if (var instanceof ReferenceExpression) { return resolve(((ReferenceExpression) var)); } else { throw new ExpressionEvaluationException(String.format("can resolve expression: %s", var)); } }  @Override ExprValue resolve(Expression var); abstract ExprValue resolve(ReferenceExpression ref); }
BindingTuple implements Environment<Expression, ExprValue> { @Override public ExprValue resolve(Expression var) { if (var instanceof ReferenceExpression) { return resolve(((ReferenceExpression) var)); } else { throw new ExpressionEvaluationException(String.format("can resolve expression: %s", var)); } }  @Override ExprValue resolve(Expression var); abstract ExprValue resolve(ReferenceExpression ref); static BindingTuple EMPTY; }