docs: private List<WebFragmentInfo> sortWebFragments(WebModuleClassesInfo classesInfo,
                                                     List<WebFragmentInfo> orderedItems,
                                                     List<WebFragmentInfo> excludedWebFragmentItems) throws UnableToAdaptException {
  
          List<ContainerInfo> classesContainers = classesInfo.getClassesContainers();
  
          Map<String, WebFragmentItemImpl> webFragmentItemMap = new LinkedHashMap<String, WebFragmentItemImpl>(classesContainers.size());
  
          String internalGeneratedWebFragmentNamePrefix = "ibm_liberty_webfragment_";
          int nameSuffix = 0;
          Set<String> usedWebFragmentNames = new HashSet<String>();
          for (ContainerInfo containerInfo : classesContainers) {
              Container container = containerInfo.getContainer();
              String libraryURI = containerInfo.getName();
              if (containerInfo.getType() == Type.WEB_INF_CLASSES) {
                  orderedItems.add(new WebFragmentItemImpl(container, null, libraryURI, null, !this.isMetadataComplete));
              } else if (containerInfo.getType() == Type.WEB_INF_LIB) {
                  WebFragment webFragment = container.adapt(WebFragment.class);
                  boolean isSeed = !this.isMetadataComplete && (webFragment == null || !webFragment.isMetadataComplete());
                  String webFragmentName = null;
                  if (webFragment != null) {
                      webFragmentName = webFragment.getName();
                      //Add all the before/after names configured, in case users configure an internal generated web fragment name
                      if (webFragment.getOrdering() != null) {
                          Ordering order = webFragment.getOrdering();
                          if (order.isSetBefore()) {
                              usedWebFragmentNames.addAll(order.getBeforeNames());
                          }
                          if (order.isSetAfter()) {
                              usedWebFragmentNames.addAll(order.getAfterNames());
                          }
                      }
                  }
                  if (webFragmentName != null) {
                      usedWebFragmentNames.add(webFragmentName);
                      if (webFragmentItemMap.containsKey(webFragmentName) && this.absoluteOrdering == null) {
                          throw new UnableToAdaptException(Tr.formatMessage(tc, "NO_UNIQUE_WEB_FRAGMENT_NAMES",
                                                                            webFragmentName, libraryURI,
                                                                            webFragmentItemMap.get(webFragmentName).libraryURI));
                          //Set null for the web-fragment name of current web-fragment.xml, so we could assign it a temporary name in the following codes
                          //webFragmentName = null;
                      }
                  }
                  if (webFragmentName == null) {
                      webFragmentName = internalGeneratedWebFragmentNamePrefix + nameSuffix;
                      while (usedWebFragmentNames.contains(webFragmentName)) {
                          nameSuffix++;
                          webFragmentName = internalGeneratedWebFragmentNamePrefix + nameSuffix;
                      }
                      usedWebFragmentNames.add(webFragmentName);
                  }
  
                  webFragmentItemMap.put(webFragmentName, new WebFragmentItemImpl(container, webFragment, libraryURI, webFragmentName, isSeed));
              } //else type is not webinf_classes or webinf_lib
          }
  
          // 'original' and 'relative' ordering generates no excluded fragment items.
          //
          // Only 'absolute' ordering can generate excluded fragment items.
  
          if (this.servletSpecLevel == WebApp.VERSION_3_0) {
              //SERVLET 3.0 COMPATIBILITY. This was shipped Liberty function and must be maintained.
              //Any future changes here should be done with custom property enablement.
              if (this.isMetadataComplete) {
                  orderedItems.addAll(originalOrderWebFragments(webFragmentItemMap));
              } else if (this.absoluteOrdering != null) {
                  orderedItems.addAll(absoluteOrderWebFragments(webFragmentItemMap, excludedWebFragmentItems));
              } else {
                  orderedItems.addAll(relativeOrderWebFragments(webFragmentItemMap));
              }
          } else {
              //SERVLET 3.1 SPEC CORRECT
              //Absolute ordering is used whether metadata-complete is true or not.
              //We use that first, if it's not specified then we check MD-complete. If that's false, then we go into
              //the collection of ordering elements from fragments.
              if (this.absoluteOrdering != null)
                  orderedItems.addAll(absoluteOrderWebFragments(webFragmentItemMap, excludedWebFragmentItems));
              else if (this.isMetadataComplete)
                  orderedItems.addAll(originalOrderWebFragments(webFragmentItemMap));
              else
                  orderedItems.addAll(relativeOrderWebFragments(webFragmentItemMap));
          }
  
          return orderedItems;
      }