Written directly in my mail-program, a.k.a. not tested:
public class MyDataItemFactory implements ObjectCreationFactory {
private Digester dig;
public void setDigester(Digester d) {
this.dig = d;
}
public Digester getDigester() {
return dig;
}
public Object createObject(Attributes attrib) {
return new DataItem("Neues", DataItem");
}
}
// In the Digester-configuration-code:
digester.addFactoryCreate(getPattern(), new MyDataItemFactory());
MyDataItemFactory can call whatever constructor you want and can do
arbitrary setup-work.
Wm.A.Stafford schrieb:
Tobias,
Thanks for the reply. Can you point me to examples that use
ObjectCreationFactory?
-=beeky
Not sure, if I understand your problem correctly, but a custom
ObjectCreationFactory used in conjunction with FactoryCreateRule may
help.
- Tobias
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]