public interface Dependency
Definition of an interface for describing a dependency to another
in an abstract way.
BeanProvider
BeanProvider
s often depend on other providers, e.g. some
properties of the bean to be created need to be initialized with other beans.
There are different ways of defining such dependencies: by specifying the
name of the dependent bean, by specifying its class, etc. This interface
provides a generic way of defining dependencies. It has a
resolve()
method that can be implemented in a suitable way.
Modifier and Type | Method and Description |
---|---|
BeanProvider |
resolve(BeanStore store,
DependencyProvider depProvider)
Resolves this dependency starting from the specified
BeanStore . |
BeanProvider resolve(BeanStore store, DependencyProvider depProvider)
BeanStore
. A concrete implementation has to search for the
BeanProvider
it depends on. If necessary, the given bean
store's parent has to be searched recursively. The DependencyProvider
can be used for querying further information about the current context,
e.g. for resolving classes using predefined class loaders.store
- the current bean storedepProvider
- the dependency providerInjectionException
- if resolving of the dependency failsCopyright © 2016 The JGUIraffe Team. All rights reserved.