public abstract class BindingImpl<T> extends Object implements Binding<T>
| Modifier | Constructor and Description |
|---|---|
|
BindingImpl(com.google.inject.internal.InjectorImpl injector,
Key<T> key,
Object source,
com.google.inject.internal.InternalFactory<? extends T> internalFactory,
Scoping scoping) |
protected |
BindingImpl(Object source,
Key<T> key,
Scoping scoping) |
| Modifier and Type | Method and Description |
|---|---|
<V> V |
acceptScopingVisitor(BindingScopingVisitor<V> visitor)
Accepts a scoping visitor.
|
<V> V |
acceptVisitor(ElementVisitor<V> visitor)
Accepts an element visitor.
|
com.google.inject.internal.InjectorImpl |
getInjector() |
com.google.inject.internal.InternalFactory<? extends T> |
getInternalFactory() |
Key<T> |
getKey()
Returns the key for this binding.
|
Provider<T> |
getProvider()
Returns the scoped provider guice uses to fulfill requests for this binding.
|
Scoping |
getScoping() |
Object |
getSource()
Returns an arbitrary object containing information about the "place" where this element was
configured.
|
boolean |
isConstant()
Is this a constant binding? This returns true for constant bindings as well as toInstance()
bindings.
|
String |
toString() |
protected BindingImpl<T> |
withKey(Key<T> key) |
protected BindingImpl<T> |
withScoping(Scoping scoping) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitacceptTargetVisitorpublic BindingImpl(com.google.inject.internal.InjectorImpl injector,
Key<T> key,
Object source,
com.google.inject.internal.InternalFactory<? extends T> internalFactory,
Scoping scoping)
public Key<T> getKey()
Bindingpublic Object getSource()
ElementTools might specially handle types they know about; StackTraceElement is a good
example. Tools should simply call toString() on the source object if the type is
unfamiliar.
public Provider<T> getProvider()
BindinggetProvider in interface Binding<T>public com.google.inject.internal.InternalFactory<? extends T> getInternalFactory()
public Scoping getScoping()
public boolean isConstant()
public <V> V acceptVisitor(ElementVisitor<V> visitor)
ElementacceptVisitor in interface Elementvisitor - to call back onpublic <V> V acceptScopingVisitor(BindingScopingVisitor<V> visitor)
BindingacceptScopingVisitor in interface Binding<T>visitor - to call back onprotected BindingImpl<T> withScoping(Scoping scoping)
protected BindingImpl<T> withKey(Key<T> key)
public com.google.inject.internal.InjectorImpl getInjector()
Copyright © 2006–2018 Google, Inc.. All rights reserved.