private Object convertToExpectedType ( final Object value , Method m ) throws ELException { if ( value == null ) { return null ; } Class < ? > expectedType = m . getParameterTypes ( ) [ 0 ] ; return getExpressionFactory ( ) . coerceToType ( value , expectedType ) ; }
Convert an object to an expected type of the method parameter according to the conversion rules of the Expression Language .