Package org.atlanmod.commons.service
Class ServiceLoaderContext
- java.lang.Object
-
- org.atlanmod.commons.service.ServiceLoaderContext
-
- All Implemented Interfaces:
ServiceContext
@ParametersAreNonnullByDefault public class ServiceLoaderContext extends Object implements ServiceContext
AServiceContextable to retrieve registered services from aServiceLoader.
-
-
Constructor Summary
Constructors Constructor Description ServiceLoaderContext()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <S> Stream<ServiceDefinition<S>>getServices(Class<S> type)Retrieves all registered services of the specifiedtype.
-
-
-
Method Detail
-
getServices
@Nonnull public <S> Stream<ServiceDefinition<S>> getServices(Class<S> type)
Description copied from interface:ServiceContextRetrieves all registered services of the specifiedtype.- Specified by:
getServicesin interfaceServiceContext- Parameters:
type- the type of services to look for- Returns:
- a parallel stream of all registered services of the specified
type
-
-