public abstract class BaseAppScope<T_Application extends BaseApplication> extends AppDependencyScope<T_Application>
dependants, dependencies, dependencyProvider, initialized, mockScope, parentScope
Modifier | Constructor and Description |
---|---|
protected |
BaseAppScope(T_Application application) |
Modifier and Type | Method and Description |
---|---|
protected <T> T |
getDependency()
This method is meant to be implemented by each concrete implementation of
DependencyScope . |
getApplication, getApplicationContext, getInstance, isAppScope, isDisposable
addDependant, cache, createDependencyProvider, dependency, dispose, getDependencies, getDependency, getDependencyProvider, getId, getMockedScope, getOwner, getParentScope, hasDependency, hasDependency, initialize, onActivated, onDeactivated, removeDependant, removeDependency, setMockedScope, setOwner, setParentScope, type
protected BaseAppScope(T_Application application)
protected <T> T getDependency()
DependencyScope
DependencyScope
.
The requested dependency instance is returned by the implementation, if it is capable of providing
a such instance. The implementation of this method should not delegate the request to any other
DependencyScope
. If the implementation is not able to cache the requested instance,
the design contract is to return null
instead.getDependency
in class AppDependencyScope<T_Application extends BaseApplication>
T
- A type parameter for casting the requested instance to expected type.DependencyScope
implementation is
capable of providing such instance otherwise null
. This default implementation returns
null
.