docs: @Override
      @FFDCIgnore(ParseException.class)
      public com.ibm.ws.javaee.dd.webext.WebExt adapt(
          Container root,
          OverlayContainer rootOverlay,
          ArtifactContainer artifactContainer,
          Container containerToAdapt) throws UnableToAdaptException {
  
          // What web extension is stored depends on the web descriptor version:
          // either "ibm-web-ext.xmi" or "ibm-web-ext.xml".
  
          com.ibm.ws.javaee.dd.web.WebApp primary = containerToAdapt.adapt(com.ibm.ws.javaee.dd.web.WebApp.class);
          String primaryVersion = ((primary == null) ? null : primary.getVersion());
          boolean xmi = ( "2.2".equals(primaryVersion) || "2.3".equals(primaryVersion) || "2.4".equals(primaryVersion) );
          String ddEntryName;
          if ( xmi ) {
              ddEntryName = com.ibm.ws.javaee.dd.webext.WebExt.XMI_EXT_NAME;
          } else {
              ddEntryName = com.ibm.ws.javaee.dd.webext.WebExt.XML_EXT_NAME;
          }
          Entry ddEntry = containerToAdapt.getEntry(ddEntryName);
  
          com.ibm.ws.javaee.ddmodel.webext.WebExtComponentImpl fromConfig =
              getConfigOverrides(rootOverlay, artifactContainer);
  
          // Neither the web-extension nor the configuration override is available:
          // Answer null.
  
          if ( (ddEntry == null) && (fromConfig == null) ) {
              return null;
          }
  
          if ( ddEntry != null ) {
              com.ibm.ws.javaee.dd.webext.WebExt fromApp;
              try {
                  fromApp = new com.ibm.ws.javaee.ddmodel.webext.WebExtDDParser(containerToAdapt, ddEntry, xmi).parse();
              } catch ( ParseException e ) {
                  throw new UnableToAdaptException(e);
              }
  
              if ( fromConfig == null ) {
                  // Only the web extension is available.
                  return fromApp;
              } else {  
                  // Both are available: Answer the configuration override, with the
                  // web extension set as a delegate.
                  fromConfig.setDelegate(fromApp);
                  return fromConfig;
              }
  
          } else {
              // Only the configuration override is available.
              return fromConfig;
          }
      }