Package com.google.inject.spi
Class Elements
java.lang.Object
com.google.inject.spi.Elements
Exposes elements of a module so they can be inspected, validated or
rewritten
.- Since:
- 2.0
- Author:
- jessewilson@google.com (Jesse Wilson)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetElements
(Module... modules) Records the elements executed bymodules
.getElements
(Stage stage, Module... modules) Records the elements executed bymodules
.getElements
(Stage stage, Iterable<? extends Module> modules) Records the elements executed bymodules
.getElements
(Iterable<? extends Module> modules) Records the elements executed bymodules
.static Module
Returns the module composed ofelements
.static Binder
withTrustedSource
(GuiceInternal guiceInternal, Binder binder, Object source) Internal version of Binder.withSource for establishing a trusted ElementSource chain for source-restricting bindings that are re-written usingElement.applyTo(com.google.inject.Binder)
.
-
Constructor Details
-
Elements
public Elements()
-
-
Method Details
-
getElements
Records the elements executed bymodules
. -
getElements
Records the elements executed bymodules
. -
getElements
Records the elements executed bymodules
. -
getElements
Records the elements executed bymodules
. -
withTrustedSource
Internal version of Binder.withSource for establishing a trusted ElementSource chain for source-restricting bindings that are re-written usingElement.applyTo(com.google.inject.Binder)
.Using Binder.withSource is not trustworthy because it's a public API that external users can use to spoof the original ElementSource of a binding by calling withSource(bogusElementSource).
- Since:
- 5.0
-
getModule
Returns the module composed ofelements
.
-