Hi Eitan,
You can actually handle this now by using a factory-method for the instances of the interface. I've got an example of that in the beta 3d code with a simple factory method to create an ArrayList. Whenever a List is being mapped, you can then just specify the factory-method and have a specific type created at runtime.
It'd be nice to have this happen automatically, so that you just make a particular factory-method the default for a particular type. That's something I'll have to think about.
- Dennis
Eitan Suez wrote:
hello,
i was curious as to the extent of "interface" support in jibx.
i wrote a little test program that shows how jibx can handle the polymorphic situation of a collection of items whose type adheres to a specific interface.
marshalling and unmarshalling work fine, by virtue of the fact that collections are not restricted to an item type. however, one cannot actually ask jibx to enforce the item-type to match an interface. jibx complains about the fact that it cannot find a no-argument constructor for the interface: it expects the item-type to be a concrete class.
dennis, are there any issues related to handling interfaces that you consider important enough and plan to address in future versions?
thanks, eitan
------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ jibx-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jibx-users
