/** * Get the initialization expression of a declared context variable. * @param name The variable name. * @return The initialization expression (if any). */ public UnparsedExpression getContextVariableExpression(String name, String config) { MContextVariable variable = getContextVariable(name); return config != null? variable.getValue(config) : variable; }
/** * Set the initialization expression of a declared context variable. * @param name The variable name. */ public void setContextVariableExpression(String config, UnparsedExpression exp) { if (config == null && exp instanceof MContextVariable) { variabls.put(exp.getName(), (MContextVariable) exp); } else if (config != null) { MContextVariable var = getContextVariable(exp.getName()); if (var != null) { var.setValue(config, exp); } } }
exp.setName(entry.getKey()); MContextVariable contextvar = model.getContextVariable(entry.getKey()); exp.setClazz(contextvar.getClazz()); exp.setValue(entry.getValue());
if (!param.arg && !param.res && getModel().getContextVariable(param.name) == null) MContextVariable cv = getModel().getContextVariable(param.name); cv.setValue(conf.getName(), exp);