Class SharedElementModule
java.lang.Object
com.google.inject.PrivateModule
dev.getelements.elements.sdk.guice.SharedElementModule
- All Implemented Interfaces:
com.google.inject.Module
- Direct Known Subclasses:
AppNodeServicesModule
,MongoDaoElementModule
,ServicesElementModule
public class SharedElementModule
extends com.google.inject.PrivateModule
Defines a new
Element
which is sourced from the guice bindings visible to the module at the time the injector
was created. This also assumes there exists an ElementRegistry
named ElementRegistry.ROOT
which will
be the parent of the newly created ElementRegistry
. In addition to the ElementLoader
specified in the
constructor of this module, it is possible to specify additional Element
instances to load within the same
ElementLoader
.-
Constructor Summary
ConstructorsConstructorDescriptionSharedElementModule
(Package aPackage) SharedElementModule
(String packageName) -
Method Summary
Modifier and TypeMethodDescriptionprotected final void
protected void
Configures theElement
which will be used in thisSharedElementModule
.protected void
configureElement
(com.google.inject.Scope thredLocalScope) Configures theElement
which will be used in thisSharedElementModule
.Methods inherited from class com.google.inject.PrivateModule
addError, addError, addError, bind, bind, bind, bindConstant, binder, bindInterceptor, bindListener, bindListener, bindScope, configure, convertToTypes, currentStage, expose, expose, expose, getMembersInjector, getMembersInjector, getProvider, getProvider, install, requestInjection, requestStaticInjection, requireBinding, requireBinding
-
Constructor Details
-
SharedElementModule
-
SharedElementModule
-
-
Method Details
-
configure
protected final void configure()- Specified by:
configure
in classcom.google.inject.PrivateModule
-
configureElement
protected void configureElement()Configures theElement
which will be used in thisSharedElementModule
. -
configureElement
protected void configureElement(com.google.inject.Scope thredLocalScope) Configures theElement
which will be used in thisSharedElementModule
.- Parameters:
thredLocalScope
- the thread local scope for theElement
-