org.dbforms.util
Class SingletonClassFactoryCreate

java.lang.Object
  extended by org.apache.commons.digester.AbstractObjectCreationFactory
      extended by org.dbforms.util.SingletonClassFactoryCreate
All Implemented Interfaces:
org.apache.commons.digester.ObjectCreationFactory

public class SingletonClassFactoryCreate
extends org.apache.commons.digester.AbstractObjectCreationFactory

ObjectCreationFactory used by Digester to return the instance of a singleton class.

Author:
Luca Fossato

Field Summary
 
Fields inherited from class org.apache.commons.digester.AbstractObjectCreationFactory
digester
 
Constructor Summary
SingletonClassFactoryCreate(String className)
          EventFactoryCreate constructor.
 
Method Summary
 Object createObject(Attributes attributes)
          Get the unique instance of the Singleton class.
 String getClassName()
          Gets the className attribute of the EventFactoryCreate object
 void setClassName(String className)
          Sets the className attribute of the EventFactoryCreate object
 
Methods inherited from class org.apache.commons.digester.AbstractObjectCreationFactory
getDigester, setDigester
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SingletonClassFactoryCreate

public SingletonClassFactoryCreate(String className)
EventFactoryCreate constructor.

Parameters:
className - the name of the singleton class to instance
Method Detail

setClassName

public void setClassName(String className)
Sets the className attribute of the EventFactoryCreate object

Parameters:
className - The new className value

getClassName

public String getClassName()
Gets the className attribute of the EventFactoryCreate object

Returns:
The className value

createObject

public Object createObject(Attributes attributes)
Get the unique instance of the Singleton class.

Specified by:
createObject in interface org.apache.commons.digester.ObjectCreationFactory
Specified by:
createObject in class org.apache.commons.digester.AbstractObjectCreationFactory
Parameters:
attributes - not used
Returns:
the unique instance of the singleton class specified by the className member attribute


Copyright © 2002-2006 DbForms. All Rights Reserved.