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 forObjectCreationFactoryimplementations.
-
-
Constructor Summary
Constructors Constructor Description AbstractObjectCreationFactory()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract TcreateObject(org.xml.sax.Attributes attributes)Factory method called byFactoryCreateRuleto supply an object based on the element's attributes.DigestergetDigester()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.
-
-
-
Constructor Detail
-
AbstractObjectCreationFactory
public AbstractObjectCreationFactory()
-
-
Method Detail
-
createObject
public abstract T createObject(org.xml.sax.Attributes attributes) throws java.lang.Exception
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:
java.lang.Exception- any exception thrown will be propagated upwards
-
getDigester
public Digester getDigester()
Returns theDigesterthat was set by theFactoryCreateRuleupon initialization.- Specified by:
getDigesterin interfaceObjectCreationFactory<T>- Returns:
- the
Digesterthat was set by theFactoryCreateRuleupon initialization
-
setDigester
public void setDigester(Digester digester)
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
-
-