Code example for MapMaker

Methods: makeMap

public class MvelEvaluator implements Evaluator { 
  //lets do some caching of expressions to see if we cant go a bit faster 
  private final ConcurrentMap<String, Serializable> compiledExpressions = new MapMaker().makeMap(); 
  public Object evaluate(String expr, Object bean) { 
    Serializable compiled = compiledExpressions.get(expr); 
    //compile and store the expr (warms up the expression cache) 
    if (null == compiled) { 
      String preparedExpression = expr; 
      //strip expression decorators as necessary 
      if (Parsing.isExpression(expr)) { 
        preparedExpression = Parsing.stripExpression(expr);