public <T> Collection<T> load(File dir, Class<T> type) {
    Set<T> logImporters = new HashSet<>();
    if (!dir.exists()) {
      // dir not exist!
      return new ArrayList<>();
    }
    File[] files = dir.listFiles(pathname -> {
      return pathname.getName().endsWith(".jar") || pathname.getName().endsWith(".zip");
    });
    logImporters.addAll(loadFromDir(dir, type));
    for (File file : files) {
      logImporters.addAll(loadFromJar(file, type));
    }
    return logImporters;
  }
Load classes (interface implementation) from directory.

@param <T>
@param dir  dir with classes, zip or jar's
@param type interface to load
@return
olv-core/src/main/java/pl/otros/logview/api/BaseLoader.java