ProviderInstanceBindingImpl for implementing 'native' guice extensions.
Beyond the normal binding contract that is mostly handled by our baseclass, this also
implements DelayedInitialize in order to initialize factory state.
| Modifier and Type | Class and Description |
|---|---|
| pack-priv abstract static class | InternalProviderInstanceBindingImpl.
An base factory implementation that can be extended to provide a specialized implementation of
a |
| pack-priv abstract static class | |
| pack-priv static enum |
| Modifier and Type | Field and Description |
|---|---|
| private final InternalProviderInstanceBindingImpl. |
| Access | Constructor and Description |
|---|---|
| pack-priv | InternalProviderInstanceBindingImpl(InjectorImpl injector, Key<T> key, Object source, InternalProviderInstanceBindingImpl.
|
| Modifier and Type | Method and Description |
|---|---|
| pack-priv InternalProviderInstanceBindingImpl. | |
| public void | initialize(final InjectorImpl injector, final Errors errors)
Implements com. |
| originalFactory | back to summary |
|---|---|
| private final InternalProviderInstanceBindingImpl. | |
| InternalProviderInstanceBindingImpl | back to summary |
|---|---|
| pack-priv InternalProviderInstanceBindingImpl(InjectorImpl injector, Key<T> key, Object source, InternalProviderInstanceBindingImpl. | |
| getInitializationTiming | back to summary |
|---|---|
| pack-priv InternalProviderInstanceBindingImpl. | |
| initialize | back to summary |
|---|---|
| public void initialize(final InjectorImpl injector, final Errors errors) throws ErrorsException Implements com. Doc from com. Initializes this binding, throwing any errors if necessary.
| |
ProviderWithExtensionVisitor and also implements InternalFactory
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public final T | get(final InternalContext
of this injection context, final Dependency<?> dependency, boolean true if getting as a result of a linked binding linked)Overrides com. Implements com. |
| private T | provision(Dependency<?> dependency, InternalContext context, ConstructionContext<T> constructionContext)
|
| CyclicFactory | back to summary |
|---|---|
| pack-priv CyclicFactory(InternalProviderInstanceBindingImpl. | |
| get | back to summary |
|---|---|
| public final T get(final InternalContext context, final Dependency<?> dependency, boolean linked) throws InternalProvisionException Overrides com. Implements com. Doc from com. Creates an object to be injected.
| |
| provision | back to summary |
|---|---|
| private T provision(Dependency<?> dependency, InternalContext context, ConstructionContext<T> constructionContext) throws InternalProvisionException | |
CyclicFactory subclass, but trivial factories can use this one.
| Modifier and Type | Field and Description |
|---|---|
| private Provider | |
| private final InternalProviderInstanceBindingImpl. | |
| pack-priv ProvisionListenerStackCallback | |
| private Object |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| protected abstract T | Returns: instance to be injectedCreates an object to be injected. |
| public final T | |
| public T | get(final InternalContext
of this injection context, final Dependency<?> dependency, boolean true if getting as a result of a linked binding linked)Implements com. |
| pack-priv final Object | |
| pack-priv abstract void | initialize(InjectorImpl injector, Errors errors)
A callback that allows for implementations to fetch dependencies on other bindings. |
| delegateProvider | back to summary |
|---|---|
| private Provider<T> delegateProvider | |
| initializationTiming | back to summary |
|---|---|
| private final InternalProviderInstanceBindingImpl. | |
| provisionCallback | back to summary |
|---|---|
| pack-priv ProvisionListenerStackCallback<T> provisionCallback | |
| source | back to summary |
|---|---|
| private Object source | |
| Factory | back to summary |
|---|---|
| pack-priv Factory(InternalProviderInstanceBindingImpl. | |
| doProvision | back to summary |
|---|---|
| protected abstract T doProvision(InternalContext context, Dependency<?> dependency) throws InternalProvisionException Creates an object to be injected.
| |
| get | back to summary |
|---|---|
| public final T get() Implements com. Doc from com. Provides an instance of
| |
| get | back to summary |
|---|---|
| public T get(final InternalContext context, final Dependency<?> dependency, boolean linked) throws InternalProvisionException Implements com. Doc from com. Creates an object to be injected.
| |
| getSource | back to summary |
|---|---|
| pack-priv final Object getSource() The binding source. May be useful for augmenting runtime error messages. Note this will return | |
| initialize | back to summary |
|---|---|
| pack-priv abstract void initialize(InjectorImpl injector, Errors errors) throws ErrorsException A callback that allows for implementations to fetch dependencies on other bindings. Will be called exactly once, prior to any call to | |
| Modifier and Type | Field and Description |
|---|---|
| public static final InternalProviderInstanceBindingImpl. | DELAYED
Initialization of this factory should be delayed until after all other static initialization completes. |
| public static final InternalProviderInstanceBindingImpl. | EAGER
This factory can be initialized eagerly. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static InternalProviderInstanceBindingImpl. | |
| public static InternalProviderInstanceBindingImpl. |
| DELAYED | back to summary |
|---|---|
| public static final InternalProviderInstanceBindingImpl. Initialization of this factory should be delayed until after all other static initialization
completes. This will be useful for factories that need to call | |
| EAGER | back to summary |
|---|---|
| public static final InternalProviderInstanceBindingImpl. This factory can be initialized eagerly. This should be the case for most things. | |
| InitializationTiming | back to summary |
|---|---|
| private InitializationTiming() | |
| valueOf | back to summary |
|---|---|
| public static InternalProviderInstanceBindingImpl. | |
| values | back to summary |
|---|---|
| public static InternalProviderInstanceBindingImpl. | |