public class ClassServiceLoader extends Object
ServiceLoader except it returns
lists of Classes instead of an Iterable of
instances.| Constructor and Description |
|---|
ClassServiceLoader() |
| Modifier and Type | Method and Description |
|---|---|
static <S> List<Class<? extends S>> |
load(Class<S> service)
Loads the classes of the providers of a service.
|
static <S> List<Class<? extends S>> |
load(Class<S> service,
ClassLoader loader)
Loads the classes of the providers of a service.
|
public static <S> List<Class<? extends S>> load(Class<S> service)
service - a service type.ServiceConfigurationError - if something goes wrong with loading
a service provider's class.public static <S> List<Class<? extends S>> load(Class<S> service, ClassLoader loader)
service - a service type. If null, a
NullPointerException will be thrown.loader - a class loader. If null, the current thread's
context class loader will be used.ServiceConfigurationError - if something goes wrong with loading
a service provider's class.Copyright © 2012–2018 Emory University. All rights reserved.