OK, an optional interface with one method getSortComparator() that can
be implemented by the inspected object could be a practicable solution.
Adds another interface though.
On 18.03.2016 16:56, Sean Luke wrote:
> On Mar 18, 2016, at 5:08 AM, Christian Meyer
> <[log in to unmask]> wrote:
>> Hmm, for me the property order is not how I put the accessors into
>> my source code. This seems to differ between JVMs.
> Well, the order certainly is left unspecified in the documentation.
> But almost all JVMs assume the order is the same as the order
> specified in the class file (by javac -- why wouldn't they?), *and*
> most (or all?) javac implementations put them in the order they're
> parsed from the file. So I think that a great many people have
> generally relied on this for their models. Certainly when I started
> alphabetizing, I got a bit of an outcry.
> It was for this reason that I thought maybe we should them unordered
> by default, but make it easy to dictate an order, perhaps via a
> method in the objects themselves?