public class ClassInstantiator extends Object implements Instantiator
Constructor and Description |
---|
ClassInstantiator(Class<?> type,
List<Desire> desires,
Map<Desire,Instantiator> providers)
Create an ClassInstantiator that will provide instances of the given
type, with given the list of desires and a function mapping that
satisfies those providers.
|
public ClassInstantiator(Class<?> type, List<Desire> desires, Map<Desire,Instantiator> providers)
type
- The type of instance createddesires
- The dependency desires for the instanceproviders
- The providers that satisfy the desires of the typepublic Class getType()
Instantiator
getType
in interface Instantiator
public Object instantiate() throws ConstructionException
instantiate
in interface Instantiator
ConstructionException
Copyright © 2014 GroupLens Research. All Rights Reserved.