public final class Elements
extends java.lang.Object
rewritten
.Modifier and Type | Class and Description |
---|---|
private static class |
Elements.ElementsAsModule |
private static class |
Elements.ModuleInfo |
private static class |
Elements.RecordingBinder |
Modifier and Type | Field and Description |
---|---|
private static BindingTargetVisitor<java.lang.Object,java.lang.Object> |
GET_INSTANCE_VISITOR |
Constructor and Description |
---|
Elements() |
Modifier and Type | Method and Description |
---|---|
static java.util.List<Element> |
getElements(java.lang.Iterable<? extends Module> modules)
Records the elements executed by
modules . |
static java.util.List<Element> |
getElements(Module... modules)
Records the elements executed by
modules . |
static java.util.List<Element> |
getElements(Stage stage,
java.lang.Iterable<? extends Module> modules)
Records the elements executed by
modules . |
static java.util.List<Element> |
getElements(Stage stage,
Module... modules)
Records the elements executed by
modules . |
(package private) static <T> BindingTargetVisitor<T,T> |
getInstanceVisitor() |
static Module |
getModule(java.lang.Iterable<? extends Element> elements)
Returns the module composed of
elements . |
static Binder |
withTrustedSource(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 using
Element.applyTo(com.google.inject.Binder) . |
private static final BindingTargetVisitor<java.lang.Object,java.lang.Object> GET_INSTANCE_VISITOR
public static java.util.List<Element> getElements(Module... modules)
modules
.public static java.util.List<Element> getElements(Stage stage, Module... modules)
modules
.public static java.util.List<Element> getElements(java.lang.Iterable<? extends Module> modules)
modules
.public static java.util.List<Element> getElements(Stage stage, java.lang.Iterable<? extends Module> modules)
modules
.public static Binder withTrustedSource(GuiceInternal guiceInternal, Binder binder, java.lang.Object source)
Element.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).
public static Module getModule(java.lang.Iterable<? extends Element> elements)
elements
.static <T> BindingTargetVisitor<T,T> getInstanceVisitor()