Fork me on GitHub

How to specify the order in which actions appear on the menu

The @MemberOrder annotation provides a hint to the viewer as to the order in which the actions should be displayed, eg in a menu.

For example:

public class Customer {
    public void placeOrder(Product p) { ... }

    public void blackList() { ... }

The syntax for the @MemberOrder is dewey decimal notation, so "3.5" and "3.6" come between "3" and "4"; "3.5.1" comes between "3.5" and "3.6".