protected Object resolveCommonArgument(
      MethodParameter methodParameter, NativeWebRequest webRequest) throws Exception {

    // Invoke custom argument resolvers if present...
    if (this.customArgumentResolvers != null) {
      for (WebArgumentResolver argumentResolver : this.customArgumentResolvers) {
        Object value = argumentResolver.resolveArgument(methodParameter, webRequest);
        if (value != WebArgumentResolver.UNRESOLVED) {
          return value;
        }
      }
    }

    // Resolution of standard parameter types...
    Class paramType = methodParameter.getParameterType();
    Object value = resolveStandardArgument(paramType, webRequest);
    if (value != WebArgumentResolver.UNRESOLVED
        && !ClassUtils.isAssignableValue(paramType, value)) {
      throw new IllegalStateException(
          "Standard argument type ["
              + paramType.getName()
              + "] resolved to incompatible value of type ["
              + (value != null ? value.getClass() : null)
              + "]. Consider declaring the argument type in a less specific fashion.");
    }
    return value;
  }
 public boolean matches(NativeWebRequest request, MethodParameter methodParameter) {
   if (this.webArgumentResolvers != null) {
     for (WebArgumentResolver resolver : this.webArgumentResolvers) {
       try {
         if (resolver.resolveArgument(methodParameter, request)
             != WebArgumentResolver.UNRESOLVED) {
           return true;
         }
       } catch (Exception e) {
         throw new IllegalStateException(e);
       }
     }
   }
   return false;
 }