code: public Weld setBeanDiscoveryMode(BeanDiscoveryMode mode) {
          // NONE makes no sense as an option
          if (mode.equals(BeanDiscoveryMode.NONE)) {
              throw WeldSELogger.LOG.beanArchiveWithModeNone(containerId);
          }
          beanDiscoveryMode = mode;
          return this;
      }
docs: Sets the bean discovery mode for synthetic bean archive. Default mode is ALL.
  @param mode bean discovery mode in a form of an enum from {@link org.jboss.weld.bootstrap.spi.BeanDiscoveryMode}. Accepted values are ALL, ANNOTATED
  
  @return  self
  @throws IllegalArgumentException if BeanDiscoveryMode.NONE is passed as an argument