public class Dependencies extends DependencyResolver.Adapter implements DependencySatisfier
DependencyResolver.Adapter, DependencyResolver.SelectionStrategy| Constructor and Description |
|---|
Dependencies() |
Dependencies(DependencyResolver parent) |
| 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,
DependencyResolver.SelectionStrategy selector)
Tries to resolve a dependency that matches a given class.
|
<T> Iterable<? extends T> |
resolveTypeDependencies(Class<T> type)
Tries to resolve a dependencies that matches a given class.
|
void |
satisfyDependencies(Object... dependencies) |
<T> T |
satisfyDependency(T dependency) |
resolveDependencypublic Dependencies()
public Dependencies(DependencyResolver parent)
public <T> T resolveDependency(Class<T> type, DependencyResolver.SelectionStrategy selector)
DependencyResolverselector which ultimately becomes responsible for making the choice between all available candidates.resolveDependency in interface DependencyResolverT - the type that the returned instance must implementtype - 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.public <T> Iterable<? extends T> resolveTypeDependencies(Class<T> type)
DependencyResolverresolveTypeDependencies in interface DependencyResolverT - the type that the returned instance must implementtype - the type of Class that the returned instances must implement.public <T> Supplier<T> provideDependency(Class<T> type, DependencyResolver.SelectionStrategy selector)
provideDependency in interface DependencyResolverprovideDependency in class DependencyResolver.Adapterpublic <T> Supplier<T> provideDependency(Class<T> type)
provideDependency in interface DependencyResolverprovideDependency in class DependencyResolver.Adapterpublic <T> T satisfyDependency(T dependency)
satisfyDependency in interface DependencySatisfierpublic void satisfyDependencies(Object... dependencies)
Copyright © 2016–2021 MWARE SOLUTIONS. All rights reserved.