code: public static <T> T coerceToType(ELContext context, Class<T> toType, Object object) {
          @SuppressWarnings("unchecked")
          T result = (T) getExpressionFactory(context).coerceToType(object, toType);
          return result;
      }
docs: Use EL specification coercion facilities to coerce an object to the specified type.
  
  @param context
  @param toType
  @param object
  @return T
  @throws ELException if the coercion fails.