The Javadoc for enums always display its constants using alphabetic ordering. Is it possible to change that?
For instance, the javadoc for java.time.DayOfWeek
would look better if the constants weren't displayed as FRIDAY, MONDAY, SATURDAY, SUNDAY, THURSDAY TUESDAY, WEDNESDAY...
The default HTML doclet sorts the summaries of its members.
Collections.sort(members);
from /com/sun/tools/doclets/internal/toolkit/builders/MemberSummaryBuilder.java :312
It is probably best that you don't do this.
Javadoc puts the summaries in alphabetical order so that you can quickly find the one you want. Breaking that model would make the Javadoc much harder to quickly scan and find what you are looking for.
Alphabetical order only applies to the summary, the full Javadoc will be in the order of decleration in the source file.
If you really needed to do this then you could roll your own doclet or perhaps a taglet might be able to do it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With