Method m = getter(root.getClass(), pair.getFirst()); try { return evalAccessPath(pair.getSecond(), m.invoke(root)); } catch (IllegalAccessException e) { throw new IllegalArgumentException(Strings.apply("Cannot invoke %s on %s (%s)",
private Object computeEffectiveParameterValue(String fullParameterName) throws SQLException { String accessPath = null; String parameterName = fullParameterName; if (fullParameterName.contains(".")) { accessPath = parameterName.substring(parameterName.indexOf('.') + 1); parameterName = parameterName.substring(0, parameterName.indexOf('.')); } Object paramValue = context.get(parameterName); if (accessPath == null || paramValue == null) { return paramValue; } try { return Reflection.evalAccessPath(accessPath, paramValue); } catch (Exception e) { throw new SQLException(NLS.fmtr("StatementCompiler.cannotEvalAccessPath") .set("name", parameterName) .set("path", accessPath) .set("value", paramValue) .set("query", originalSQL) .format(), e); } }