public interface ServiceProviderInstantiator
An instantiator of
ServiceLoader.Provider instances.- Author:
- Laird Nelson
-
Method Summary
Modifier and TypeMethodDescriptiondefault <T> Tinstantiate(ServiceLoader.Provider<? extends T> serviceLoaderProvider) Instantiates the suppliedServiceLoader.Providerand returns the resulting service provider.
-
Method Details
-
instantiate
Instantiates the suppliedServiceLoader.Providerand returns the resulting service provider.- Type Parameters:
T- the type of service provider to instantiate- Parameters:
serviceLoaderProvider- aServiceLoader.Provider; must not benull- Returns:
- a service provider; never
null - Throws:
NullPointerException- ifserviceLoaderProviderisnull- Idempotency:
- The idempotency and determinism of any implementation of this method is left undefined.
- Nullability:
- This method does not, and its overrides must not,
return
null. - Thread Safety:
- This method and any override is not guaranteed to be safe for concurrent use by multiple threads.
-