public interface DependencyResolver
| Modifier and Type | Interface and Description |
|---|---|
static class |
DependencyResolver.Adapter
Adapter for
DependencyResolver which will select the first available candidate by default
for DependencyResolver.Adapter.resolveDependency(Class). |
static interface |
DependencyResolver.SelectionStrategy
Responsible for making the choice between available candidates.
|
| Modifier and Type | Method and Description |
|---|---|
<T> T |
resolveDependency(Class<T> type)
Tries to resolve a dependency that matches a given class.
|
<T> T |
resolveDependency(Class<T> type,
DependencyResolver.SelectionStrategy selector)
Tries to resolve a dependency that matches a given class.
|
<T> T resolveDependency(Class<T> type) throws IllegalArgumentException
DependencyResolver.SelectionStrategy is used, so the first encountered matching dependency will be returned.type - the type of Class that the returned instance must implement.IllegalArgumentException - if no matching dependency was found.<T> T resolveDependency(Class<T> type, DependencyResolver.SelectionStrategy selector) throws IllegalArgumentException
selector which ultimately becomes responsible for making the choice between all available candidates.type - the type of Class that the returned instance must implement.selector - DependencyResolver.SelectionStrategy which will make the choice of which one to return among
matching candidates.IllegalArgumentException - if no matching dependency was found.Copyright © 2002–2015 The Neo4j Graph Database Project. All rights reserved.