All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.enofex.naikan.maven.ProviderFactory Maven / Gradle / Ivy

Go to download

The Naikan Model Plugin for Naikan the software inventory management tool for dev teams driven by our CI/CD pipeline.

The newest version!
package com.enofex.naikan.maven;

import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;
import java.util.ServiceLoader;

final class ProviderFactory {

  private ProviderFactory() {
  }

  static  List> providers(Class clazz) {
    List> providers = new ArrayList<>();

    for (Provider provider : ServiceLoader.load(Provider.class)) {
      if (provider.support(clazz)) {
        providers.add(provider);
      }
    }

    providers.sort(Comparator.comparingInt(Provider::order));

    return providers;
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy