public abstract class ServiceLoaderWrapper extends Object
ServiceLoader class which allows for easier testing.| Constructor and Description |
|---|
ServiceLoaderWrapper() |
| Modifier and Type | Method and Description |
|---|---|
static ServiceLoaderWrapper |
getDefault()
Gets the default ServiceLoaderWrapper instance.
|
abstract <T> ElementIterator<T> |
loadService(Class<T> providerClass,
ClassLoader classLoader)
Returns an
Iterator of all implementors of the given service
provider interface. |
public static ServiceLoaderWrapper getDefault()
public abstract <T> ElementIterator<T> loadService(Class<T> providerClass, ClassLoader classLoader)
Iterator of all implementors of the given service
provider interface.T - Type of the service provider interface.providerClass - The service provider interface.classLoader - The Classloader to use.Copyright © 2014–2015. All rights reserved.