public class Services<T>
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static <T> java.util.Optional<T> |
get(java.lang.Class<T> service)
Returns an optional with a service, if previously a ServiceFactory was registered.
|
static <T> void |
registerServiceFactory(ServiceFactory<T> factory)
Required call to register a ServiceFactory for a given service of type T.
|
public static <T> void registerServiceFactory(ServiceFactory<T> factory)
T - The type of servicefactory - The ServiceFactory instancepublic static <T> java.util.Optional<T> get(java.lang.Class<T> service)
T - the type of serviceservice - the class of service