final class FactoryProxy<T> extends java.lang.Object implements InternalFactory<T>, CreationListener
Modifier and Type | Field and Description |
---|---|
private InjectorImpl |
injector |
private Key<T> |
key |
private java.lang.Object |
source |
private InternalFactory<? extends T> |
targetFactory |
private Key<? extends T> |
targetKey |
Constructor and Description |
---|
FactoryProxy(InjectorImpl injector,
Key<T> key,
Key<? extends T> targetKey,
java.lang.Object source) |
Modifier and Type | Method and Description |
---|---|
T |
get(Errors errors,
InternalContext context,
Dependency<?> dependency,
boolean linked)
Creates an object to be injected.
|
void |
notify(Errors errors)
Notifies that creation should happen.
|
java.lang.String |
toString() |
private final InjectorImpl injector
private final java.lang.Object source
private InternalFactory<? extends T> targetFactory
FactoryProxy(InjectorImpl injector, Key<T> key, Key<? extends T> targetKey, java.lang.Object source)
public void notify(Errors errors)
CreationListener
notify
in interface CreationListener
public T get(Errors errors, InternalContext context, Dependency<?> dependency, boolean linked) throws ErrorsException
InternalFactory
get
in interface InternalFactory<T>
context
- of this injectionlinked
- true if getting as a result of a linked bindingErrorsException
- if a value cannot be providedpublic java.lang.String toString()
toString
in class java.lang.Object