How do I create Java documentation in order of appearance?

I have one very large .java class file that has many members. How do I create HTML documentation for this so that it shows me the elements in order of appearance, without sorting by member type? (methods, constants and variables)

For example, if my Java code is:

 private int typeOfAction_1;      // notice the order:  1,2,3..
 public void startAction_2(){
 }

 private int jobtype_3;
 private int jobcount_4;
 private void doJob_5(){
 }

 public void haltAction_6(){
 }

      

The Javadoc orders the elements alphabetically and sorts by type, and so the relationship between the members is lost:

int jobcount_4;        // notice how the order is lost:  4,3,1..
int jobtype_3;
int typeOfAction_1;

doJob_5()
haltAction_6()
startAction_2()

      

Also, is there any documentation with smarter features? as:

  • Retrieving Nearby Comments for Methods and Variables
  • Method Size - Lines of Code
+2


source to share


2 answers


The standard Javadoc docklet does not support custom display order of methods. If you need this feature, you need to develop your own docklet (or find an existing one that suits your requirements).



Besides Javadoc, there are many document generators that can handle Java. Doxygen and ROBODoc are two such tools. I believe both of these tools provide the ability for elements (like methods) to appear in the same order in the generated documentation as they do in the source code.

+4


source


Another possible approach would be to simply exclude members that belong to each other in separate class or classes if they are indeed conceptually separate from other members of the class ...



0


source







All Articles