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.InjectorvoidsetInjector(com.google.inject.Injector injector) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:ServiceLocatorGets the service using theElementServiceKey.- Specified by:
findInstancein interfaceServiceLocator- Type Parameters:
T- the type to request- Parameters:
elementServiceKey- the key- Returns:
- an
OptionalofSupplierto the object
-
getInjector
public com.google.inject.Injector getInjector() -
setInjector
@Inject public void setInjector(com.google.inject.Injector injector)
-