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

de.intarsys.tools.provider.ProviderTools Maven / Gradle / Ivy

There is a newer version: 4.11
Show newest version
package de.intarsys.tools.provider;

import java.util.Iterator;

/**
 * Tool class to ease access to provider implementations.
 */
public class ProviderTools {

	public static  Iterator providers(Class type) {
		return providers(type, type);
	}

	public static  Iterator providers(Class type, Class callerClass) {
		ClassLoader classLoader = Thread.currentThread()
				.getContextClassLoader();
		if (classLoader == null) {
			classLoader = callerClass.getClassLoader();
		}
		return Providers.get(classLoader).lookupProviders(type);
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy