-
public interface IServiceProviderA service provider gives access to the implementations of a service.
-
-
Method Summary
Modifier and Type Method Description abstract <T extends Any> BooleanhasService(Class<T> c)Determine if the service provide has the provided service. abstract <T extends Any> TgetService(Class<T> c)Retrieve the service that is a T. abstract <T extends Any> TgetServiceOrNull(Class<T> c)Retrieve the service that is a T. abstract <T extends Any> List<T>getAllServices(Class<T> c)Retrieve the list of services that are a T. -
-
Method Detail
-
hasService
abstract <T extends Any> Boolean hasService(Class<T> c)
Determine if the service provide has the provided service.
-
getService
abstract <T extends Any> T getService(Class<T> c)
Retrieve the service that is a T. If multiple services exist, the last one registered will be returned. If no service exists, an exception will be thrown.
- Parameters:
c- The class type of the service that is to be retrieved.
-
getServiceOrNull
abstract <T extends Any> T getServiceOrNull(Class<T> c)
Retrieve the service that is a T. If multiple services exist, the last one registered will be returned. If no service exists, null will be returned.
- Parameters:
c- The class type of the service that is to be retrieved.
-
-
-
-