Class GuiceElementLoader
java.lang.Object
dev.getelements.elements.sdk.spi.guice.GuiceElementLoader
- All Implemented Interfaces:
ElementLoader
,ElementStandardBeanProperties
The
GuiceElementLoader
uses Guice to scan and instantiate an SDK element using a guice element with the
following strategy.
- Guice, by default honors the
Singleton
annotation. - Each type will be explicitly bound via the
ElementService
annotation. - Each specification of
ElementServiceExport
will expose the the service exposed.
-
Nested Class Summary
Nested classes/interfaces inherited from interface dev.getelements.elements.sdk.ElementLoader
ElementLoader.Default
Nested classes/interfaces inherited from interface dev.getelements.elements.sdk.ElementStandardBeanProperties
ElementStandardBeanProperties.StandardBeanProperty<T>
-
Field Summary
Fields inherited from interface dev.getelements.elements.sdk.ElementLoader
SYSTEM_EVENT_ELEMENT_LOADED
Fields inherited from interface dev.getelements.elements.sdk.ElementStandardBeanProperties
ELEMENT_DEFINITION_RECORD, ELEMENT_DEFINITION_RECORD_PROPERTY, ELEMENT_RECORD, ELEMENT_RECORD_PROPERTY, ELEMENT_REGISTRY, ELEMENT_REGISTRY_PROPERTY, SERVICE_LOCATOR, SERVICE_LOCATOR_PROPERTY
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets theElementRecord
, which can be invoked before attepting aElementLoader.load()
orElementLoader.load(MutableElementRegistry)
operation.load
(MutableElementRegistry parent) Loads a new instance of theElement
with the suppliedElementRegistry
as the parent.void
setElementRecord
(ElementRecord elementRecord) 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.ElementLoader
load
-
Constructor Details
-
GuiceElementLoader
public GuiceElementLoader()
-
-
Method Details
-
load
Description copied from interface:ElementLoader
Loads a new instance of theElement
with the suppliedElementRegistry
as the parent.- Specified by:
load
in interfaceElementLoader
- Returns:
- the
Element
, loaded
-
getElementRecord
Description copied from interface:ElementLoader
Gets theElementRecord
, which can be invoked before attepting aElementLoader.load()
orElementLoader.load(MutableElementRegistry)
operation.- Specified by:
getElementRecord
in interfaceElementLoader
- Returns:
- the
ElementRecord
-
setElementRecord
-