public Object convertToType ( Object obj , Class < ? > type ) { boolean originalResolved = isPropertyResolved ( ) ; setPropertyResolved ( false ) ; try { ELResolver resolver = getELResolver ( ) ; if ( resolver != null ) { Object result = resolver . convertToType ( this , obj , type ) ; if ( isPropertyResolved ( ) ) { return result ; } } } finally { setPropertyResolved ( originalResolved ) ; } return ELManager . getExpressionFactory ( ) . coerceToType ( obj , type ) ; }
Coerce the supplied object to the requested type .