integration-cdi/src/main/java/org/ocpsoft/rewrite/cdi/expressions/Expressions.java
public <T> T evaluateMethodExpression(String expression, Class<T> expectedReturnType, Object[] params,
            Class<?>[] expectedParamTypes)
   {
      Object result = expressionFactory.createMethodExpression(context, expression, expectedReturnType,
               expectedParamTypes).invoke(context, params);
      if (result != null) {
         return expectedReturnType.cast(result);
      }
      else {
         return null;
      }
   }
public <T> T evaluateMethodExpression(String expression, Class<T> expectedReturnType, Object[] params,
            Class<?>[] expectedParamTypes)
   {
      Object result = expressionFactory.createMethodExpression(context, expression, expectedReturnType,
               expectedParamTypes).invoke(context, params);
      if (result != null) {
         return expectedReturnType.cast(result);
      }
      else {
         return null;
      }
   }
<p>
Evaluate a {@link MethodExpression}, passing arguments and argument types to the method.
</p>
<p/>
<p>
A {@link MethodExpression} is created by calling
{@link ExpressionFactory#createMethodExpression(ELContext, String, Class, Class[])} and then
{@link MethodExpression#invoke(ELContext, Object[])} is called to obtain the value. For more details on the
semantics of EL, refer to the javadoc for these methods.
</p>

@param <T> the type of the evaluated expression
@param expression expression the expression to evaluate
@param expectedReturnType the expected return type of the evaluated expression
@param params arguments to the method
@param expectedParamTypes of the arguments to the method
@return the result of evaluating the expression
@throws ClassCastException if the result cannot be cast to <code>expectedReturnType</code>
@throws ELException if there are syntactical errors in the provided expression.
@throws NullPointerException if <code>expectedParamTypes</code> is <code>null</code>.
@throws PropertyNotFoundException if one of the property resolutions failed because a specified variable or
property does not exist or is not readable.
@throws MethodNotFoundException if no suitable method can be found.
@throws ELException if a String literal is specified and expectedReturnType of the MethodExpression is void or if
the coercion of the String literal to the expectedReturnType yields an error (see Section
"1.18 Type Conversion").
@throws ELException if an exception was thrown while performing property or variable resolution. The thrown
exception must be included as the cause property of this exception, if available. If the exception
thrown is an <code>InvocationTargetException</code>, extract its <code>cause</code> and pass it to the
<code>ELException</code> constructor.
@see MethodExpression#invoke(ELContext, Object[])
@see ExpressionFactory#createMethodExpression(ELContext, String, Class, Class[])