>How about this??
>
>public class ChildCreationFactory implements ObjectCreationFactory {
>  public Object createObject(Attributes x) {
>    ParentClass parent = (ParentClass) digester.peek();
>    String childClassName = parent.getChildClassName();
>
>    // create instance of child class and return it
>  }
>}
>  
>
Looks good to me. I think that's what the original poster wanted. He
just needs to add in the parts using reflection to instantiate the child
object and set the attributes on it. Although, I guess the reflection
code is a bit tricky, especially if there are type conversions, such as
converting a string value of an attribute into a number. (Basically,
it's re-implementing whatever digester.addSetProperties() does.)

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to