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 DigesterThe associatedDigesterinstance that was set up byFactoryCreateRuleupon initialization. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract TcreateObject(Attributes attributes) Factory method called byFactoryCreateRuleto supply an object based on the element's attributes.Returns theDigesterthat was set by theFactoryCreateRuleupon initialization.voidsetDigester(Digester digester) Set theDigesterto allow the implementation to do logging, classloading based on the digester's classloader, etc.
-
Field Details
-
digester
The associatedDigesterinstance that was set up byFactoryCreateRuleupon initialization.
-
-
Constructor Details
-
AbstractObjectCreationFactory
public AbstractObjectCreationFactory()
-
-
Method Details
-
createObject
Factory method called byFactoryCreateRuleto supply an object based on the element's attributes.- Specified by:
createObjectin 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 theDigesterthat was set by theFactoryCreateRuleupon initialization.- Specified by:
getDigesterin interfaceObjectCreationFactory<T>- Returns:
- the
Digesterthat was set by theFactoryCreateRuleupon initialization
-
setDigester
Set theDigesterto allow the implementation to do logging, classloading based on the digester's classloader, etc.- Specified by:
setDigesterin interfaceObjectCreationFactory<T>- Parameters:
digester- parent Digester object
-