Added a comment. 

Sorting the fields as getDeclaredFields does not return fields in any particular order. This is so we insert/read entries into fieldsForAnnotations in a deterministic order.