public final class LinkedBindingImpl<T> extends BindingImpl<T> implements LinkedKeyBinding<T>, HasDependencies
Constructor and Description |
---|
LinkedBindingImpl(com.google.inject.internal.InjectorImpl injector,
Key<T> key,
Object source,
com.google.inject.internal.InternalFactory<? extends T> internalFactory,
Scoping scoping,
Key<? extends T> targetKey) |
LinkedBindingImpl(Object source,
Key<T> key,
Scoping scoping,
Key<? extends T> targetKey) |
Modifier and Type | Method and Description |
---|---|
<V> V |
acceptTargetVisitor(BindingTargetVisitor<? super T,V> visitor)
Accepts a target visitor.
|
void |
applyTo(Binder binder)
Writes this module element to the given binder (optional operation).
|
boolean |
equals(Object obj) |
Set<Dependency<?>> |
getDependencies()
Returns the known dependencies for this type.
|
Key<? extends T> |
getLinkedKey()
Returns the linked key used to resolve injections.
|
int |
hashCode() |
String |
toString() |
BindingImpl<T> |
withKey(Key<T> key) |
BindingImpl<T> |
withScoping(Scoping scoping) |
acceptScopingVisitor, acceptVisitor, getInjector, getInternalFactory, getKey, getProvider, getScoping, getSource, isConstant
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
acceptScopingVisitor, getKey, getProvider
acceptVisitor, getSource
public LinkedBindingImpl(com.google.inject.internal.InjectorImpl injector, Key<T> key, Object source, com.google.inject.internal.InternalFactory<? extends T> internalFactory, Scoping scoping, Key<? extends T> targetKey)
public <V> V acceptTargetVisitor(BindingTargetVisitor<? super T,V> visitor)
Binding
acceptTargetVisitor
in interface Binding<T>
visitor
- to call back onpublic Key<? extends T> getLinkedKey()
LinkedKeyBinding
Injector.getBinding(key)
.getLinkedKey
in interface LinkedKeyBinding<T>
public Set<Dependency<?>> getDependencies()
HasDependencies
Injector
will be
included in the returned set.getDependencies
in interface HasDependencies
public BindingImpl<T> withScoping(Scoping scoping)
withScoping
in class BindingImpl<T>
public BindingImpl<T> withKey(Key<T> key)
withKey
in class BindingImpl<T>
public void applyTo(Binder binder)
Element
public String toString()
toString
in class BindingImpl<T>
Copyright © 2006–2018 Google, Inc.. All rights reserved.