In expanders versions < 4.0.0, the order of anchors in the harvest files was defined by the order they added in by the java implementation of the expander. In expanders 4.0.0 and higher, the harvest occurs automatically and the harvested anchors are sorted by one of two options:
By default, the harvest will sorted by the following order:
- the anchors
custom-methodswill always occur first, in that order.
- the rest of the anchors will be sorted alphabetically
This order is used by default because it is stable towards future versions of the expanders. E.g. some methods in the bean may change place when they are extracted as features. Also, introduced features do not have a strictly deterministic ordering when introducing new features. Because of this, this order will introduce less changes to harvest files than the next ordering.
The 3 ‘priority anchors’ are placed at the start because this introduces less changes in the harvest files to the versions before 4.0.0 and because they will improve readability for the most harvest files.
Order by appearance
If the expansionOption
sortHarvestByAppearance is defined, harvested anchors will keep the order they appeared in in the file. This has the advantage of producing more readable harvest files. It may also produce less changes than the alphabetic order of the default sorting to versions before 4.0.0.
This can, however, introduce changes in the harvest files each time an expander is updated and is thus less transparent when updating expander versions.