public void mapVariables(ExpressionVariable[] variables, ExpressionFactory expressionFactory) {
if (variables != null && variables.length > 0) {
variableMapper = new VariableMapperImpl();
for (int i = 0; i < variables.length; i++) {
ExpressionVariable var = variables[i];
ParserContext context = var.getParserContext() != null ? var.getParserContext()
: NullParserContext.INSTANCE;
ValueExpression expr;
if (context.isTemplate()) {
expr = parseValueExpression(var.getValueExpression(), context);
} else {
assertNotDelimited(var.getValueExpression());
assertHasText(var.getValueExpression());
expr = parseValueExpression("#{" + var.getValueExpression() + "}", context);
}
variableMapper.setVariable(var.getName(), expr);
}
}
}