Package org.apache.commons.digester3
Class AbstractObjectCreationFactory<T>
- java.lang.Object
-
- 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 java.lang.Object implements ObjectCreationFactory<T>
Abstract base class forObjectCreationFactory
implementations.
-
-
Field Summary
Fields Modifier and Type Field Description private Digester
digester
The associatedDigester
instance that was set up byFactoryCreateRule
upon initialization.
-
Constructor Summary
Constructors Constructor Description AbstractObjectCreationFactory()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract T
createObject(org.xml.sax.Attributes attributes)
Factory method called byFactoryCreateRule
to supply an object based on the element's attributes.Digester
getDigester()
Returns theDigester
that was set by theFactoryCreateRule
upon initialization.void
setDigester(Digester digester)
Set theDigester
to allow the implementation to do logging, classloading based on the digester's classloader, etc.
-
-
-
Field Detail
-
digester
private Digester digester
The associatedDigester
instance that was set up byFactoryCreateRule
upon initialization.
-
-
Method Detail
-
createObject
public abstract T createObject(org.xml.sax.Attributes attributes) throws java.lang.Exception
Factory method called byFactoryCreateRule
to supply an object based on the element's attributes.- Specified by:
createObject
in interfaceObjectCreationFactory<T>
- Parameters:
attributes
- the element's attributes- Returns:
- creates a new T instance
- Throws:
java.lang.Exception
- any exception thrown will be propagated upwards
-
getDigester
public Digester getDigester()
Returns theDigester
that was set by theFactoryCreateRule
upon initialization.- Specified by:
getDigester
in interfaceObjectCreationFactory<T>
- Returns:
- the
Digester
that was set by theFactoryCreateRule
upon initialization
-
setDigester
public void setDigester(Digester digester)
Set theDigester
to allow the implementation to do logging, classloading based on the digester's classloader, etc.- Specified by:
setDigester
in interfaceObjectCreationFactory<T>
- Parameters:
digester
- parent Digester object
-
-