public abstract static class DependencyResolver.Adapter extends Object implements DependencyResolver
DependencyResolver
which will select the first available candidate by default
for resolveDependency(Class)
.DependencyResolver.Adapter, DependencyResolver.SelectionStrategy
Constructor and Description |
---|
Adapter() |
Modifier and Type | Method and Description |
---|---|
<T> Supplier<T> |
provideDependency(Class<T> type) |
<T> Supplier<T> |
provideDependency(Class<T> type,
DependencyResolver.SelectionStrategy selector) |
<T> T |
resolveDependency(Class<T> type)
Tries to resolve a dependency that matches a given class.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
resolveDependency
public <T> T resolveDependency(Class<T> type) throws IllegalArgumentException
DependencyResolver
DependencyResolver.SelectionStrategy
is used, so the first encountered matching dependency will be returned.resolveDependency
in interface DependencyResolver
T
- the type that the returned instance must implementtype
- the type of Class
that the returned instance must implement.IllegalArgumentException
- if no matching dependency was found.public <T> Supplier<T> provideDependency(Class<T> type, DependencyResolver.SelectionStrategy selector)
provideDependency
in interface DependencyResolver
public <T> Supplier<T> provideDependency(Class<T> type)
provideDependency
in interface DependencyResolver
Copyright © 2002–2018 The Neo4j Graph Database Project. All rights reserved.