org.apache.commons.digester

Class AbstractObjectCreationFactory

Implemented Interfaces:
ObjectCreationFactory
Known Direct Subclasses:
DigesterRuleParser.BeanPropertySetterRuleFactory, DigesterRuleParser.CallMethodRuleFactory, DigesterRuleParser.CallParamRuleFactory, DigesterRuleParser.FactoryCreateRuleFactory, DigesterRuleParser.NodeCreateRuleFactory, DigesterRuleParser.ObjectCreateRuleFactory, DigesterRuleParser.ObjectParamRuleFactory, DigesterRuleParser.SetNestedPropertiesRuleFactory, DigesterRuleParser.SetNextRuleFactory, DigesterRuleParser.SetPropertiesRuleFactory, DigesterRuleParser.SetPropertyRuleFactory, DigesterRuleParser.SetRootRuleFactory, DigesterRuleParser.SetTopRuleFactory

public abstract class AbstractObjectCreationFactory
extends java.lang.Object
implements ObjectCreationFactory

Abstract base class for ObjectCreationFactory implementations.

Field Summary

protected Digester
digester
The associated Digester instance that was set up by FactoryCreateRule upon initialization.

Method Summary

abstract Object
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.

Field Details

digester

protected Digester digester
The associated Digester instance that was set up by FactoryCreateRule upon initialization.

Method Details

createObject

public abstract Object 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
Parameters:
attributes - the element's attributes

getDigester

public Digester getDigester()
Returns the Digester that was set by the FactoryCreateRule upon initialization.
Specified by:
getDigester in interface ObjectCreationFactory

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
Parameters:
digester - parent Digester object

Copyright 2001-2005 The Apache Software Foundation.