private void processDeferredImportSelectors() {
    List<DeferredImportSelectorHolder> deferredImports = this.deferredImportSelectors;
    this.deferredImportSelectors = null;
    Collections.sort(deferredImports, DEFERRED_IMPORT_COMPARATOR);

    for (DeferredImportSelectorHolder deferredImport : deferredImports) {
      ConfigurationClass configClass = deferredImport.getConfigurationClass();
      try {
        String[] imports =
            deferredImport.getImportSelector().selectImports(configClass.getMetadata());
        processImports(configClass, asSourceClass(configClass), asSourceClasses(imports), false);
      } catch (BeanDefinitionStoreException ex) {
        throw ex;
      } catch (Exception ex) {
        throw new BeanDefinitionStoreException(
            "Failed to process import candidates for configuration class ["
                + configClass.getMetadata().getClassName()
                + "]",
            ex);
      }
    }
  }
 @Override
 public int compare(DeferredImportSelectorHolder o1, DeferredImportSelectorHolder o2) {
   return AnnotationAwareOrderComparator.INSTANCE.compare(
       o1.getImportSelector(), o2.getImportSelector());
 }