de.intarsys.tools.provider.ProviderTools Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of isrt Show documentation
Show all versions of isrt Show documentation
The basic runtime tools and interfaces for intarsys components.
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