private void applyProperty(Property main, Property prop, Object newValue, Object proxy, ExpreEvaluator eval) { final String expre = connector.connect((BaseMediator<?>) proxy, main, prop); ExpreEvaluator.ExpreContext context = DataMediatorFactory.createExpreContext(proxy.getClass()); if(context == null){ throw new ExpreEvaluator.ExpreEvaluatorException("create ExpreContext failed .has your module declare @ImportDesc ?"); } //add newValue. context.addVariable(main.getName(), newValue); Object value = eval.evaluate(context, expre); ReflectUtils.setValue(prop, proxy, value); } }
private void applyProperty(Property main, Property prop, Object newValue, Object proxy, ExpreEvaluator eval) { final String expre = connector.connect((BaseMediator<?>) proxy, main, prop); ExpreEvaluator.ExpreContext context = DataMediatorFactory.createExpreContext(proxy.getClass()); if(context == null){ throw new ExpreEvaluator.ExpreEvaluatorException("create ExpreContext failed .has your module declare @ImportDesc ?"); } //add newValue. context.addVariable(main.getName(), newValue); Object value = eval.evaluate(context, expre); ReflectUtils.setValue(prop, proxy, value); } }