code: private FilterMappingDescriptor createFilterMapping(FilterMappingType filterMappingType, Map<String, FilterDescriptor> filters,
              Map<String, ServletDescriptor> servlets, Store store) {
          FilterMappingDescriptor filterMappingDescriptor = store.create(FilterMappingDescriptor.class);
          FilterNameType filterName = filterMappingType.getFilterName();
          FilterDescriptor filterDescriptor = getOrCreateNamedDescriptor(FilterDescriptor.class, filterName.getValue(), filters, store);
          filterDescriptor.getMappings().add(filterMappingDescriptor);
          for (Object urlPatternOrServletName : filterMappingType.getUrlPatternOrServletName()) {
              if (urlPatternOrServletName instanceof UrlPatternType) {
                  UrlPatternType urlPatternType = (UrlPatternType) urlPatternOrServletName;
                  UrlPatternDescriptor urlPatternDescriptor = createUrlPattern(urlPatternType, store);
                  filterMappingDescriptor.getUrlPatterns().add(urlPatternDescriptor);
              } else if (urlPatternOrServletName instanceof ServletNameType) {
                  ServletNameType servletNameType = (ServletNameType) urlPatternOrServletName;
                  ServletDescriptor servletDescriptor = getOrCreateNamedDescriptor(ServletDescriptor.class, servletNameType.getValue(), servlets, store);
                  filterMappingDescriptor.setServlet(servletDescriptor);
              }
          }
          for (DispatcherType dispatcherType : filterMappingType.getDispatcher()) {
              DispatcherDescriptor dispatcherDescriptor = store.create(DispatcherDescriptor.class);
              dispatcherDescriptor.setValue(dispatcherType.getValue());
              filterMappingDescriptor.getDispatchers().add(dispatcherDescriptor);
          }
  
          return filterMappingDescriptor;
      }
docs: Create a filter mapping descriptor.
  
  @param filterMappingType
  The XML filter mapping type.
  @param servlets
  The map of known servlets.
  @param store
  The store.
  @return The filter mapping descriptor.