public class ClassInstantiator extends Object implements Instantiator
Constructor and Description |
---|
ClassInstantiator(Class<?> type,
List<Desire> desires,
Map<Desire,Instantiator> providers,
LifecycleManager manager)
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.
|
Modifier and Type | Method and Description |
---|---|
Class |
getType()
Get the type that this instantiator will instantiate.
|
Object |
instantiate() |
public ClassInstantiator(Class<?> type, List<Desire> desires, Map<Desire,Instantiator> providers, LifecycleManager manager)
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 © 2016 GroupLens Research. All rights reserved.