Hi Peter,
On 03/27/2013 01:31 PM, Peter Levart wrote:
I also don't know
whether having LinkedHashMap instead of plain HashMap is necessary, since it
is initialized with defaults from plain HashMap (which is hashCode %
capacity ordered) and only some of defaults are overridden in parsing loop
in general. For example, having this annotation:
@interface Ann {
String one();
String two() default "2";
}
and usage:
@Ann(one = "1")
...toString will print: @Ann(two = "2", one = "1")
While there perhaps is no natural ordering between the sets of default
elements and non-default elements you probably want an order following
source as closely as possible among the non-default elements.
cheers
/Joel