Key to the strategy for getting instances of the type. This interface is
part of the introspection API and is intended primarily for use by tools.
Bindings are created in several ways:
bind() and bindConstant() statements:
bind(Service.class).annotatedWith(Red.class).to(ServiceImpl.class);
bindConstant().annotatedWith(ServerHost.class).to(args[0]);
pointer annotations or by using its annotated or default constructor.
providers, by delegating to the binding for the provided type.
They exist on both modules and on injectors, and their behaviour is different for each:
| Modifier and Type | Method and Description |
|---|---|
| public <V> V | |
| public <V> V | acceptTargetVisitor(BindingTargetVisitor<? super T, V>
to call back on visitor)Accepts a target visitor. |
| public Key | |
| public Provider |
| acceptScopingVisitor | back to summary |
|---|---|
| public <V> V acceptScopingVisitor(BindingScopingVisitor<V> visitor) Accepts a scoping visitor. Invokes the visitor method specific to this binding's scoping.
| |
| acceptTargetVisitor | back to summary |
|---|---|
| public <V> V acceptTargetVisitor(BindingTargetVisitor<? super T, V> visitor) Accepts a target visitor. Invokes the visitor method specific to this binding's target.
| |
| getKey | back to summary |
|---|---|
| public Key Returns the key for this binding. | |
| getProvider | back to summary |
|---|---|
| public Provider Returns the scoped provider guice uses to fulfill requests for this binding.
| |