code: public boolean isWrapperFor(Class<?> wrappedType) {
          if (!ServletRequest.class.isAssignableFrom(wrappedType)) {
              throw new IllegalArgumentException("Given class " +
                  wrappedType.getName() + " not a subinterface of " +
                  ServletRequest.class.getName());
          }
          if (wrappedType.isAssignableFrom(request.getClass())) {
              return true;
          } else if (request instanceof ServletRequestWrapper) {
              return ((ServletRequestWrapper) request).isWrapperFor(wrappedType);
          } else {
              return false;
          }
      }
docs: Checks (recursively) if this ServletRequestWrapper wraps a
  {@link ServletRequest} of the given class type.
  
  @param wrappedType the ServletRequest class type to
  search for
  
  @return true if this ServletRequestWrapper wraps a
  ServletRequest of the given class type, false otherwise
  
  @throws IllegalArgumentException if the given class does not
  implement {@link ServletRequest}
  
  @since Servlet 3.0