org.apache.commons.digester3
Class AbstractObjectCreationFactory<T>

java.lang.Object
  extended by org.apache.commons.digester3.AbstractObjectCreationFactory<T>
Type Parameters:
T - The object type will be instantiate by this factory.
All Implemented Interfaces:
ObjectCreationFactory<T>
Direct Known Subclasses:
FactoryCreate.DefaultObjectCreationFactory

public abstract class AbstractObjectCreationFactory<T>
extends Object
implements ObjectCreationFactory<T>

Abstract base class for ObjectCreationFactory implementations.


Constructor Summary
AbstractObjectCreationFactory()
           
 
Method Summary
abstract  T createObject(Attributes attributes)
          Factory method called by FactoryCreateRule to supply an object based on the element's attributes.
 Digester getDigester()
          Returns the Digester that was set by the FactoryCreateRule upon initialization.
 void setDigester(Digester digester)
          Set the Digester to allow the implementation to do logging, classloading based on the digester's classloader, etc.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractObjectCreationFactory

public AbstractObjectCreationFactory()
Method Detail

createObject

public abstract T createObject(Attributes attributes)
                        throws Exception
Factory method called by FactoryCreateRule to supply an object based on the element's attributes.

Specified by:
createObject in interface ObjectCreationFactory<T>
Parameters:
attributes - the element's attributes
Returns:
creates a new T instance
Throws:
Exception - any exception thrown will be propagated upwards

getDigester

public Digester getDigester()
Returns the Digester that was set by the FactoryCreateRule upon initialization.

Specified by:
getDigester in interface ObjectCreationFactory<T>
Returns:
the Digester that was set by the FactoryCreateRule upon initialization

setDigester

public void setDigester(Digester digester)
Set the Digester to allow the implementation to do logging, classloading based on the digester's classloader, etc.

Specified by:
setDigester in interface ObjectCreationFactory<T>
Parameters:
digester - parent Digester object


Copyright © 2001-2011 The Apache Software Foundation. All Rights Reserved.