java中怎样弹出文档,如何按出现顺序创建Java文档?

I've got one really big .java class file that has a lot of members. How do I create HTML documentation for this so it shows me the members 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(){

}

Javadoc orders members in alphabetical order and sorted by type, and therefore the relations between members are 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, are there documentation generates with smarter features? like:

Extraction of nearby comments for methods & variables

Size of methods - Lines of Code

解决方案

Javadoc's standard doclet does not support customized display order for methods. If you need this feature, you will need to develop a custom doclet (or find an existing one that satisfies your requirements).

There are a number of document generators other than Javadoc that can handle java. doxygen and ROBODoc are two such tools. I believe that both of these tools provide the option for items (e.g. methods) to appear in the same order in the generated documentation as they appear in the source code.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值