Closed GoogleCodeExporter closed 9 years ago
Do you mean Java class or Java source ?
When the class is compiled the order from the source is lost. Java runtime does
not
provide a way to keep the order of instance variables.
Original comment by py4fun@gmail.com
on 19 Sep 2009 at 8:14
Explicit ordering would be possible - Annotate fields with a user defined
number and
then sort it. But that would be asking for too much ;-)
Cheers!
Original comment by ashwin.j...@gmail.com
on 20 Sep 2009 at 7:16
I do not think field sorting is important enough to be implemented in
SnakeYAML.
Imagine the class extends another class. Imagine the child _overwrites_ some
fields.
I am afraid if you ask 10 developers how it shall be sorted you will get 10
different opinions.
If you think the order may be very important then indeed we may consider to use
annotations.
Original comment by py4fun@gmail.com
on 20 Sep 2009 at 10:44
We shall collect more input from the user community.
Original comment by aso...@gmail.com
on 24 Sep 2009 at 3:30
Original issue reported on code.google.com by
ashwin.j...@gmail.com
on 18 Sep 2009 at 10:34