code: public final SC registerFilter(Class<? extends Filter> filterClass) {
          WebFilter webFilter = filterClass.getAnnotation(WebFilter.class);
  
          if (webFilter == null)
              throw new IllegalArgumentException(String.format("Missing annotation '%s' for class '%s'", WebFilter.class.getName(), filterClass.getName()));
  
          String[] urlPatterns = webFilter.value();
  
          if (urlPatterns.length == 0)
              urlPatterns = webFilter.urlPatterns();
  
          if (urlPatterns.length == 0)
              throw new IllegalArgumentException(String.format("Missing pattern mapping for '%s'", filterClass.getName()));
  
          for (String urlPattern : urlPatterns) {
              registerFilter(filterClass, urlPattern);
          }
  
          return (SC) this;
      }
docs: Registers a filter.
  
  @param filterClass filter class to be registered. This class must be annotated with {@linkplain WebFilter}.
  @return this.