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. |
static <S> ServiceLoader<S> |
reload(Class<S> serviceType)
Get service loader for given
serviceType, applying a ServiceLoader.reload() before returns. |
public static <S> ServiceLoader<S> reload(Class<S> serviceType)
serviceType, applying a ServiceLoader.reload() before returns.S - generic type of service to loadserviceType - type of service to loadreloaded.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–2021 Ultreia.io. All rights reserved.