Re: [Simple-support] Providing Extra Type Information to the Serialization Engine
Brought to you by:
niallg
|
From: Azubuko O. <buk...@gm...> - 2011-05-14 04:16:39
|
Hey Niall,
UnionList looks cool but I'm not sure how it helps me. The problem is I have
a base class with a generic collection (see below). Subclasses
specialize this generic parameter but SimpleXml complains that it doesn't
know the type of the inherited collection being de/serialized.
>
> --- On *Fri, 13/5/11, Azubuko Obele <buk...@gm...>* wrote:
>
>
> From: Azubuko Obele <buk...@gm...>
> Subject: [Simple-support] Providing Extra Type Information to the
> Serialization Engine
> To: sim...@li...
> Received: Friday, 13 May, 2011, 4:55 AM
>
>
> Hello,
>
> If I have a generic class like:
>
> public class ItemList<T> {
>
> @ElementList(inline = true, required = false)
> private List<T> items = new ArrayList<T>();
>
> }
>
> And then I have subclasses of this like AList extends ItemList<A> and BList
> extends ItemList<B> ... Simple will fail to serialize such classes because
> it can't determine the type of the generic property. Is there perhaps a
> mechanism so that I might be able to provide this information to the engine
> somehow?
>
>
> Thanks
>
> -----Inline Attachment Follows-----
>
>
> ------------------------------------------------------------------------------
> Achieve unprecedented app performance and reliability
> What every C/C++ and Fortran developer should know.
> Learn how Intel has extended the reach of its next-generation tools
> to help boost performance applications - inlcuding clusters.
> http://p.sf.net/sfu/intel-dev2devmay
>
> -----Inline Attachment Follows-----
>
> _______________________________________________
> Simple-support mailing list
> Sim...@li...<http://mc/compose?to=...@li...>
> https://lists.sourceforge.net/lists/listinfo/simple-support
>
>
|