SingletonStrategy<T>
public class SimpleSingleton<T> extends java.lang.Object implements SingletonStrategy<T>
SimpleSingleton
is an implementation of the SingletonStrategy
interface used to provide common factory access for the same object instance.
This implementation will create a new instance from the class specified and
will not create a new one unless it is reset.
Constructor | Description |
---|---|
SimpleSingleton() |
Modifier and Type | Method | Description |
---|---|---|
T |
instance() |
|
void |
reset() |
reset the instance to a new instance for the implemented strategy
|
void |
setSingletonClassName(java.lang.String singletonClassName) |
set a singleton class name that will be used to create the singleton
based on the strategy implementation of this interface.
|
public T instance()
instance
in interface SingletonStrategy<T>
public void reset()
SingletonStrategy
reset
in interface SingletonStrategy<T>
public void setSingletonClassName(java.lang.String singletonClassName)
SingletonStrategy
setSingletonClassName
in interface SingletonStrategy<T>
singletonClassName
- DOCUMENT ME!