Class GuiceServiceLocator
java.lang.Object
dev.getelements.elements.sdk.guice.GuiceServiceLocator
- All Implemented Interfaces:
ServiceLocator
Created by patricktwohig on 9/1/15.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfindInstance
(ElementServiceKey<T> elementServiceKey) Gets the service using theElementServiceKey
.com.google.inject.Injector
void
setInjector
(com.google.inject.Injector injector) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface dev.getelements.elements.sdk.ServiceLocator
findInstance, findInstance, getInstance, getInstance, getInstance
-
Constructor Details
-
GuiceServiceLocator
public GuiceServiceLocator()
-
-
Method Details
-
findInstance
Description copied from interface:ServiceLocator
Gets the service using theElementServiceKey
.- Specified by:
findInstance
in interfaceServiceLocator
- Type Parameters:
T
- the type to request- Parameters:
elementServiceKey
- the key- Returns:
- an
Optional
ofSupplier
to the object
-
getInjector
public com.google.inject.Injector getInjector() -
setInjector
@Inject public void setInjector(com.google.inject.Injector injector)
-