public class LinkedProvider<T> extends StdProvider<T>
For this example
public interface Foo {
// ...
}
public class Bar implements Foo {
// ...
}
The link will be
bind(Foo.class).to(Bar.class);injected| Constructor and Description |
|---|
LinkedProvider(Key<T> key,
Key<? extends T> target) |
| Modifier and Type | Method and Description |
|---|---|
T |
get() |
Key<? extends T> |
getTarget() |
void |
inject(ProvisionStack stack,
InjectorImpl injector)
Used by standard providers and some other
providers to delegate the injection to the
wrapped provider (when it's a wrapper provider)
or injecting some provider properties without
checking everything
|
boolean |
isAutoBound()
Determines if the linked provider is linked to the same key
|
java.lang.String |
toString() |
get, isInjected, onBind, setInjected, withScopepublic void inject(ProvisionStack stack, InjectorImpl injector)
StdProviderUsed by standard providers and some other providers to delegate the injection to the wrapped provider (when it's a wrapper provider) or injecting some provider properties without checking everything
inject in class StdProvider<T>stack - The thread injection stack (passed as argument
instead of getting it from the thread-local held
by the injector)injector - The injector used to inject this providerpublic T get()
public boolean isAutoBound()
public java.lang.String toString()
toString in class java.lang.Object