org.dom4j.util
public class SimpleSingleton extends java.lang.Object implements SingletonStrategy
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 and Description |
|---|
SimpleSingleton() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
instance()
return a singleton instance of the class specified in setSingletonClass
|
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 java.lang.Object instance()
SingletonStrategyinstance in interface SingletonStrategypublic void reset()
SingletonStrategyreset in interface SingletonStrategypublic void setSingletonClassName(java.lang.String singletonClassName)
SingletonStrategysetSingletonClassName in interface SingletonStrategyCopyright ? 2005 MetaStuff Ltd. All Rights Reserved. Hosted by