public final class ModuleLoader extends Object
| Modifier and Type | Method and Description |
|---|---|
static <T> T |
getService(Class<T> intf)
Determine the first advertised service implementation for the specified interface.
|
static <T> T |
getService(Class<T> intf,
Class<? extends T> defaultImpl)
Determine the first advertised service implementation for the specified interface.
|
static <T> List<T> |
getServices(Class<T> intf)
Get all advertised service implementations of the specified interface.
|
public static <T> T getService(Class<T> intf) throws ModuleLoaderException
T - the interfaceintf - the interface to find an advertised service implementation forModuleLoaderException - if there is no advertised implementation availablepublic static <T> T getService(Class<T> intf, Class<? extends T> defaultImpl) throws ModuleLoaderException
T - the interfaceintf - the interface to find an advertised service implementation fordefaultImpl - the default implementation class if an advertised one is not found, may be nullModuleLoaderException - if the implementation is missing and no defaultImpl is specifiedpublic static <T> List<T> getServices(Class<T> intf)
T - the interfaceintf - the interface to find advertised service implementations ofCopyright © 2017. All rights reserved.