|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
org.dom4j.util Class SimpleSingleton
java.lang.Object org.dom4j.util.SimpleSingleton
- All Implemented Interfaces:
- SingletonStrategy
- public class SimpleSingleton
- extends 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.
- Version:
- $Revision: 1.3 $
- Author:
- David Lucas
Constructor Summary | |
SimpleSingleton()
|
Method Summary | |
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(String singletonClassName)
set a singleton class name that will be used to create the singleton based on the strategy implementation of this interface. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
SimpleSingleton
public SimpleSingleton()
Method Detail |
instance
public Object instance()
- Description copied from interface:
SingletonStrategy
- return a singleton instance of the class specified in setSingletonClass
- Specified by:
instance
in interfaceSingletonStrategy
reset
public void reset()
- Description copied from interface:
SingletonStrategy
- reset the instance to a new instance for the implemented strategy
- Specified by:
reset
in interfaceSingletonStrategy
setSingletonClassName
public void setSingletonClassName(String singletonClassName)
- Description copied from interface:
SingletonStrategy
- set a singleton class name that will be used to create the singleton
based on the strategy implementation of this interface. The default
constructor of the class will be used and must be public.
- Specified by:
setSingletonClassName
in interfaceSingletonStrategy
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 2001-2005 MetaStuff Ltd.. All Rights Reserved.