code: private void scanExtensions(List<T> factories, String extensionsDir) {
      LOG.info("Loading extension jars from {}", extensionsDir);
      scan(Arrays.asList(ExtensionUtils.listExtensions(extensionsDir)), factories);
    }
docs: Finds all factory from the extensions directory.
  
  @param factories list of factories to add to