public class SingleInstantiatorStrategy extends java.lang.Object implements InstantiatorStrategy
| Constructor and Description |
|---|
SingleInstantiatorStrategy(java.lang.Class<T> instantiator)
Create a strategy that will return always the same instantiator type.
|
| Modifier and Type | Method and Description |
|---|---|
<T> ObjectInstantiator<T> |
newInstantiatorOf(java.lang.Class<T> type)
Return an instantiator for the wanted type and of the one and only type of instantiator returned by this
class.
|
public SingleInstantiatorStrategy(java.lang.Class<T> instantiator)
T - the type we want to instantiateinstantiator - the instantiator typepublic <T> ObjectInstantiator<T> newInstantiatorOf(java.lang.Class<T> type)
newInstantiatorOf in interface InstantiatorStrategyT - the type we want to instantiatetype - Class to instantiate