Re: [Simple-support] positions of elements
Brought to you by:
niallg
|
From: Dawid W. <daw...@gm...> - 2011-11-17 07:22:08
|
There is no such thing as "declaration order" -- java reflection may (and does, depending on the jvm) return the fields/ methods in any order it likes to return it. http://download.oracle.com/javase/6/docs/api/java/lang/Class.html#getDeclaredMethods() "The elements in the array returned are not sorted and are not in any particular order." Dawid On Thu, Nov 17, 2011 at 7:20 AM, Jouni Latvatalo <Jou...@sa...> wrote: > Hi, > > By default the serialization of fields is done in declaration order, so the > simplest way would be to just declare C before B. If you need more control > see the Order –annotation in the documentation and tutorials. > > -J > > > On 16.11.11 22:49, "gato chalar" <da...@gm...> wrote: > > Hi > I have a class like next one: > class A{ > @Element > B b; > > @Element > C c; > } > > result at parsing: > > <a > > <b> > <c> > </a> > > How can I change the positions of elements?, in order to get: > > <a > > <c> > <b> > </a> > > Thanks a lot. > > > > > ------------------------------------------------------------------------------ > All the data continuously generated in your IT infrastructure > contains a definitive record of customers, application performance, > security threats, fraudulent activity, and more. Splunk takes this > data and makes sense of it. IT sense. And common sense. > http://p.sf.net/sfu/splunk-novd2d > _______________________________________________ > Simple-support mailing list > Sim...@li... > https://lists.sourceforge.net/lists/listinfo/simple-support > > |