public <T> List<T> loadServiceProviders(Class<T> iface) {
        List<T> tmp = new ArrayList<>();
        tmp.addAll(loadDynamicServiceProviders(iface));
        tmp.addAll(loadStaticServiceProviders(iface));

        List<T> providers = new ArrayList<>();
        Set<String> seen = new HashSet<>();
        for (T provider : tmp) {
            if (! seen.contains(provider.getClass().getCanonicalName())) {
                providers.add(provider);
                seen.add(provider.getClass().getCanonicalName());
            }
        }
        return providers;
    }
Returns all the available service providers of the given type.

As of versions after 2.4.1, this removes duplicate classes

@param iface service provider interface
@return available service providers
tika-core/src/main/java/org/apache/tika/config/ServiceLoader.java