public class SingleInstantiatorStrategy extends Object implements InstantiatorStrategy
Constructor and Description |
---|
SingleInstantiatorStrategy(Class<T> instantiator)
Create a strategy that will return always the same instantiator type.
|
Modifier and Type | Method and Description |
---|---|
<T> ObjectInstantiator<T> |
newInstantiatorOf(Class<T> type)
Create a dedicated instantiator for the given class
|
public SingleInstantiatorStrategy(Class<T> instantiator)
instantiator
- the instantiator typepublic <T> ObjectInstantiator<T> newInstantiatorOf(Class<T> type)
InstantiatorStrategy
newInstantiatorOf
in interface InstantiatorStrategy
type
- Class that will be instantiatedCopyright © 2006–2015 Joe Walnes, Henri Tremblay, Leonardo Mesquita. All rights reserved.