public abstract class BindingImpl<T> extends Objectimplements Binding <T>
| Modifier | Constructor and Description |
|---|---|
|
BindingImpl(com
|
protected |
BindingImpl(Object
|
| Modifier and Type | Method and Description |
|---|---|
<V> V |
acceptScopingVisitor(BindingScopingVisitor
Accepts a scoping visitor.
|
<V> V |
acceptVisitor(ElementVisitor
Accepts an element visitor.
|
com |
getInjector()
|
com |
getInternalFactory()
|
Key |
getKey()
Returns the key for this binding.
|
Provider |
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 |
withKey(Key
|
protected BindingImpl |
withScoping(Scoping
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitacceptTargetVisitorpublic BindingImpl(com.inject .internal .InjectorImpl injector, Key <T> key, Object source, com .inject .internal .InternalFactory <? extends T> internalFactory, Scoping scoping)
public Key<T> getKey()
Binding
public ObjectgetSource()
Element
Tools 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()
Binding
public com.inject .internal .InternalFactory <? extends T> getInternalFactory()
public ScopinggetScoping()
public boolean isConstant()
public <V> V acceptVisitor(ElementVisitor<V> visitor)
Element
acceptVisitor in interface
Element
visitor - to call back on
public <V> V acceptScopingVisitor(BindingScopingVisitor<V> visitor)
Binding
acceptScopingVisitor in interface
Binding<T>
visitor - to call back on
protected BindingImpl<T> withScoping(Scoping scoping)
protected BindingImpl<T> withKey(Key <T> key)
public StringtoString()
public com.inject .internal .InjectorImpl getInjector()