Package com.google.inject.spi
Class Elements
- java.lang.Object
-
- com.google.inject.spi.Elements
-
public final class Elements extends java.lang.Object
Exposes elements of a module so they can be inspected, validated orrewritten
.- Since:
- 2.0
-
-
Constructor Summary
Constructors Constructor Description Elements()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.util.List<Element>
getElements(Module... modules)
Records the elements executed bymodules
.static java.util.List<Element>
getElements(Stage stage, Module... modules)
Records the elements executed bymodules
.static java.util.List<Element>
getElements(Stage stage, java.lang.Iterable<? extends Module> modules)
Records the elements executed bymodules
.static java.util.List<Element>
getElements(java.lang.Iterable<? extends Module> modules)
Records the elements executed bymodules
.static Module
getModule(java.lang.Iterable<? extends Element> elements)
Returns the module composed ofelements
.static Binder
withTrustedSource(com.google.inject.internal.GuiceInternal guiceInternal, Binder binder, java.lang.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)
.
-
-
-
Method Detail
-
getElements
public static java.util.List<Element> getElements(Module... modules)
Records the elements executed bymodules
.
-
getElements
public static java.util.List<Element> getElements(Stage stage, Module... modules)
Records the elements executed bymodules
.
-
getElements
public static java.util.List<Element> getElements(java.lang.Iterable<? extends Module> modules)
Records the elements executed bymodules
.
-
getElements
public static java.util.List<Element> getElements(Stage stage, java.lang.Iterable<? extends Module> modules)
Records the elements executed bymodules
.
-
withTrustedSource
public static Binder withTrustedSource(com.google.inject.internal.GuiceInternal guiceInternal, Binder binder, java.lang.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)
.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).
-
-