Interface InstanceBinding<T>
- All Superinterfaces:
Binding<T>
,Element
,HasDependencies
- All Known Implementing Classes:
InstanceBindingImpl
public interface InstanceBinding<T> extends Binding<T>, HasDependencies
A binding to a single instance. The same instance is returned for every injection.
- Since:
- 2.0
-
Method Summary
Modifier and Type Method Description java.util.Set<InjectionPoint>
getInjectionPoints()
Returns the field and method injection points of the instance, injected at injector-creation time only.T
getInstance()
Returns the user-supplied instance.Methods inherited from interface org.elasticsearch.common.inject.Binding
acceptScopingVisitor, acceptTargetVisitor, getKey, getProvider
Methods inherited from interface org.elasticsearch.common.inject.spi.Element
acceptVisitor, applyTo, getSource
Methods inherited from interface org.elasticsearch.common.inject.spi.HasDependencies
getDependencies
-
Method Details
-
getInstance
T getInstance()Returns the user-supplied instance. -
getInjectionPoints
java.util.Set<InjectionPoint> getInjectionPoints()Returns the field and method injection points of the instance, injected at injector-creation time only.- Returns:
- a possibly empty set
-