public Object eval(ExpressionContext context) throws ExpressionEvaluationException {
if (properties == null) {
return context.get(varName);
}
PropertyUtils utils = PropertyUtils.instance();
Object object = context.get(varName);
if (object == null) {
return null;
}
for (VarProperty property : properties) {
if (property instanceof IdentifierVarProperty) {
IdentifierVarProperty id = (IdentifierVarProperty) property;
try {
object = utils.getBeanProperty(object, id.name);
} catch (PropertyAccessException e) {
throw new ExpressionEvaluationException(e);
}
} else {
MapVarProperty m = (MapVarProperty) property;