docs: protected Deployment createDeployment(ResourceLoader resourceLoader, CDI11Bootstrap bootstrap) {
  
          final Iterable<Metadata<Extension>> extensions = getExtensions();
          final TypeDiscoveryConfiguration typeDiscoveryConfiguration = bootstrap.startExtensions(extensions);
          final Deployment deployment;
          final Set<WeldBeanDeploymentArchive> beanDeploymentArchives = new HashSet<WeldBeanDeploymentArchive>();
          final Map<Class<? extends Service>, Service> additionalServices = new HashMap<>(this.additionalServices);
          final Set<Class<? extends Annotation>> beanDefiningAnnotations = ImmutableSet.<Class<? extends Annotation>> builder()
              .addAll(typeDiscoveryConfiguration.getKnownBeanDefiningAnnotations())
              // Add ThreadScoped manually as Weld SE doesn't support implicit bean archives without beans.xml
              .add(ThreadScoped.class)
              // Add all custom bean defining annotations user registered via Weld.addBeanDefiningAnnotations()
              .addAll(extendedBeanDefiningAnnotations)
              .build();
  
          if (discoveryEnabled) {
              DiscoveryStrategy strategy = DiscoveryStrategyFactory.create(resourceLoader, bootstrap,
                     beanDefiningAnnotations, isEnabled(Jandex.DISABLE_JANDEX_DISCOVERY_STRATEGY, false));
              if (isImplicitScanEnabled()) {
                  strategy.setScanner(new ClassPathBeanArchiveScanner(bootstrap));
              }
              beanDeploymentArchives.addAll(strategy.performDiscovery());
              ClassFileServices classFileServices = strategy.getClassFileServices();
              if (classFileServices != null) {
                  additionalServices.put(ClassFileServices.class, classFileServices);
              }
          }
  
          if (isSyntheticBeanArchiveRequired()) {
              ImmutableSet.Builder<String> beanClassesBuilder = ImmutableSet.builder();
              beanClassesBuilder.addAll(scanPackages());
              Set<String> setOfAllBeanClasses = beanClassesBuilder.build();
              // the creation process differs based on bean discovery mode
              if (BeanDiscoveryMode.ANNOTATED.equals(beanDiscoveryMode)) {
                  // Annotated bean discovery mode, filter classes
                  ImmutableSet.Builder<String> filteredSetbuilder = ImmutableSet.builder();
                  for (String className : setOfAllBeanClasses) {
                      Class<?> clazz = Reflections.loadClass(resourceLoader, className);
                      if (clazz != null && Reflections.hasBeanDefiningAnnotation(clazz, beanDefiningAnnotations)) {
                         filteredSetbuilder.add(className);
                      }
                  }
                  setOfAllBeanClasses = filteredSetbuilder.build();
              }
              WeldBeanDeploymentArchive syntheticBeanArchive = new WeldBeanDeploymentArchive(WeldDeployment.SYNTHETIC_BDA_ID, setOfAllBeanClasses, null,
                  buildSyntheticBeansXml(), Collections.emptySet(), ImmutableSet.copyOf(beanClasses));
              beanDeploymentArchives.add(syntheticBeanArchive);
          }
  
          if (beanDeploymentArchives.isEmpty() && this.containerLifecycleObservers.isEmpty() && this.extensions.isEmpty()) {
              throw WeldSELogger.LOG.weldContainerCannotBeInitializedNoBeanArchivesFound();
          }
  
          Multimap<String, BeanDeploymentArchive> problems = BeanArchives.findBeanClassesDeployedInMultipleBeanArchives(beanDeploymentArchives);
          if (!problems.isEmpty()) {
              // Right now, we only log a warning for each bean class deployed in multiple bean archives
              for (Entry<String, Collection<BeanDeploymentArchive>> entry : problems.entrySet()) {
                  WeldSELogger.LOG.beanClassDeployedInMultipleBeanArchives(entry.getKey(), WeldCollections.toMultiRowString(entry.getValue()));
              }
          }
  
          if (isEnabled(ARCHIVE_ISOLATION_SYSTEM_PROPERTY, true)) {
              deployment = new WeldDeployment(resourceLoader, bootstrap, beanDeploymentArchives, extensions);
              CommonLogger.LOG.archiveIsolationEnabled();
          } else {
              Set<WeldBeanDeploymentArchive> flatDeployment = new HashSet<WeldBeanDeploymentArchive>();
              flatDeployment.add(WeldBeanDeploymentArchive.merge(bootstrap, beanDeploymentArchives));
              deployment = new WeldDeployment(resourceLoader, bootstrap, flatDeployment, extensions);
              CommonLogger.LOG.archiveIsolationDisabled();
          }
  
          // Register additional services if a service with higher priority not present
          for (Entry<Class<? extends Service>, Service> entry : additionalServices.entrySet()) {
              Services.put(deployment.getServices(), entry.getKey(), entry.getValue());
          }
          return deployment;
      }