public class SingleInstantiatorStrategy extends java.lang.Object implements InstantiatorStrategy
| Modifier and Type | Field and Description |
|---|---|
private java.lang.reflect.Constructor<?> |
constructor |
| 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)
Create a dedicated instantiator for the given class
|
public SingleInstantiatorStrategy(java.lang.Class<T> instantiator)
instantiator - the instantiator typepublic <T> ObjectInstantiator<T> newInstantiatorOf(java.lang.Class<T> type)
InstantiatorStrategynewInstantiatorOf in interface InstantiatorStrategytype - Class that will be instantiated