Package org.apache.commons.digester3
Interface ObjectCreationFactory<T>
-
- Type Parameters:
T
- The object type created byt the factory.
- All Known Implementing Classes:
AbstractObjectCreationFactory
,FactoryCreate.DefaultObjectCreationFactory
public interface ObjectCreationFactory<T>
Interface for use with
FactoryCreateRule
. The rule callscreateObject(org.xml.sax.Attributes)
to create an object to be pushed onto theDigester
stack whenever it is matched.AbstractObjectCreationFactory
is an abstract implementation suitable for creating anonymousObjectCreationFactory
implementations.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description 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.
-
-
-
Method Detail
-
createObject
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.- Parameters:
attributes
- the element's attributes- Returns:
- the object to be pushed onto the
Digester
stack - Throws:
java.lang.Exception
- any exception thrown will be propagated upwards
-
getDigester
Digester getDigester()
Returns theDigester
that was set by theFactoryCreateRule
upon initialization.- Returns:
- the
Digester
that was set by theFactoryCreateRule
upon initialization
-
-