public final Object evaluate ( final String expression , final Map < String , Object > context ) { JexlContext jexlContext = new MapContext ( context ) ; try { JexlEngine jexl = JEXL_LOCAL . get ( ) ; Map < String , Expression > expMap = JEXL_MAP_LOCAL . get ( ) ; Expression jexlExpression = expMap . get ( expression ) ; if ( jexlExpression == null ) { jexlExpression = jexl . createExpression ( expression ) ; expMap . put ( expression , jexlExpression ) ; } return jexlExpression . evaluate ( jexlContext ) ; } catch ( Exception e ) { throw new EvaluationException ( e ) ; } }
Evaluate the expression .