public class ServiceLoaders extends Object
| Constructor and Description |
|---|
ServiceLoaders() |
| Modifier and Type | Method and Description |
|---|---|
static <O> List<Class<O>> |
loadTypes(Class<O> serviceType)
Load of classes of the given
serviceType using ServiceLoader mecanism, but without
loading any of those services. |
static <S> S |
loadUniqueService(Class<S> serviceType)
Load the unique implementation of the given
serviceType. |
public static <S> S loadUniqueService(Class<S> serviceType)
serviceType.S - generic type of service to loadserviceType - type of service to loadIllegalStateException - if could not find the servcie, or if there is more than one implementations found.public static <O> List<Class<O>> loadTypes(Class<O> serviceType)
serviceType using ServiceLoader mecanism, but without
loading any of those services.O - type of service to seekserviceType - type of service to seekServiceLoader mechanism for given typeCopyright © 2018–2019 Ultreia.io. All rights reserved.