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 Object
implements ObjectCreationFactory<T>
Abstract base class for
ObjectCreationFactory
implementations.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Digester
The associatedDigester
instance that was set up byFactoryCreateRule
upon initialization. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract T
createObject
(Attributes attributes) Factory method called byFactoryCreateRule
to supply an object based on the element's attributes.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 Details
-
digester
The associatedDigester
instance that was set up byFactoryCreateRule
upon initialization.
-
-
Constructor Details
-
AbstractObjectCreationFactory
public AbstractObjectCreationFactory()
-
-
Method Details
-
createObject
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:
Exception
- any exception thrown will be propagated upwards
-
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
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
-