Class BindingImpl<T>
java.lang.Object
org.elasticsearch.common.inject.internal.BindingImpl<T>
- Direct Known Subclasses:
ExposedBindingImpl,InstanceBindingImpl,LinkedBindingImpl,LinkedProviderBindingImpl,ProviderInstanceBindingImpl,UntargettedBindingImpl
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedBindingImpl(Object source, Key<T> key, Scoping scoping)BindingImpl(Injector injector, Key<T> key, Object source, InternalFactory<? extends T> internalFactory, Scoping scoping) -
Method Summary
Modifier and TypeMethodDescription<V> VacceptScopingVisitor(BindingScopingVisitor<V> visitor)Accepts a scoping visitor.<V> VacceptVisitor(ElementVisitor<V> visitor)Accepts an element visitor.InternalFactory<? extends T>getKey()Returns the key for this binding.Returns the scoped provider guice uses to fulfill requests for this binding.Returns an arbitrary object containing information about the "place" where this element was configured.booleanIs this a constant binding? This returns true for constant bindings as well as toInstance() bindings.toString()protected BindingImpl<T>protected BindingImpl<T>withScoping(Scoping scoping)Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.elasticsearch.common.inject.Binding
acceptTargetVisitor
-
Constructor Details
-
BindingImpl
-
BindingImpl
-
-
Method Details
-
getKey
Description copied from interface:BindingReturns the key for this binding. -
getSource
Description copied from interface:ElementReturns an arbitrary object containing information about the "place" where this element was configured. Used by Guice in the production of descriptive error messages.Tools might specially handle types they know about;
StackTraceElementis a good example. Tools should simply calltoString()on the source object if the type is unfamiliar. -
getProvider
Description copied from interface:BindingReturns the scoped provider guice uses to fulfill requests for this binding.- Specified by:
getProviderin interfaceBinding<T>
-
getInternalFactory
-
getScoping
-
isConstant
public boolean isConstant()Is this a constant binding? This returns true for constant bindings as well as toInstance() bindings. -
acceptVisitor
Description copied from interface:ElementAccepts an element visitor. Invokes the visitor method specific to this element's type.- Specified by:
acceptVisitorin interfaceElement- Parameters:
visitor- to call back on
-
acceptScopingVisitor
Description copied from interface:BindingAccepts a scoping visitor. Invokes the visitor method specific to this binding's scoping.- Specified by:
acceptScopingVisitorin interfaceBinding<T>- Parameters:
visitor- to call back on
-
withScoping
-
withKey
-
toString
-
getInjector
-