Interface ObjectCreationFactory
- All Known Implementing Classes:
AbstractObjectCreationFactory, DigesterRuleParser.CallMethodRuleFactory, DigesterRuleParser.CallParamRuleFactory, DigesterRuleParser.FactoryCreateRuleFactory, DigesterRuleParser.NodeCreateRuleFactory, DigesterRuleParser.ObjectCreateRuleFactory, DigesterRuleParser.ObjectParamRuleFactory, DigesterRuleParser.SetNestedPropertiesRuleFactory, DigesterRuleParser.SetNextRuleFactory, DigesterRuleParser.SetPropertiesRuleFactory, DigesterRuleParser.SetPropertyRuleFactory, DigesterRuleParser.SetRootRuleFactory, DigesterRuleParser.SetTopRuleFactory
public interface ObjectCreationFactory
Interface for use with FactoryCreateRule.
The rule calls createObject(Attributes) to create an object
to be pushed onto the Digester stack
whenever it is matched.
AbstractObjectCreationFactory is an abstract
implementation suitable for creating anonymous
ObjectCreationFactory implementations.
-
Method Summary
Modifier and TypeMethodDescriptioncreateObject(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.
-
Method Details
-
createObject
Factory method called by
FactoryCreateRuleto supply an object based on the element's attributes.- Parameters:
attributes- the element's attributes- Throws:
Exception- any exception thrown will be propagated upwards
-
getDigester
Returns the
Digesterthat was set by theFactoryCreateRuleupon initialization. -
setDigester
Set the
Digesterto allow the implementation to do logging, classloading based on the digester's classloader, etc.- Parameters:
digester- parent Digester object
-