1. 编译JDpend
    1. cd %JDpend_Path%
    2. ant jar
    1. 执行jdepend
    1. java -cp .\dist\jdepend-2.10.jar jdepend.swingui.JDepend <source_folder>

    输出信息:

    The root of each tree displays a branch for each analyzed Java package, annotated with the following metrics:
    • CC - Concrete Class Count 具体类数量
    • AC - Abstract Class (and Interface) Count 抽象类数量
    • Ca - Afferent Couplings (Ca) 输入耦合
    • Ce - Efferent Couplings (Ce) 输出耦合
    • A - Abstractness (0-1) 抽象
    • I - Instability (0-1) 不稳定性
    • D - Distance from the Main Sequence (0-1) 与主序列的距离
    • V - Volatility (0-1) 波动性
    • Cyclic - If the package contains a dependency cycle 循环依赖
    • Afferent Couplings (Ca): The number of classes in other packages that depend upon classes within the package is an indicator of the package’s responsibility. Afferent = incoming
      • 传入耦合(Ca):其他包中依赖该包中的类的数量是该包责任的一个指标。传入=传入。
    • Efferent Couplings (Ce): The number of classes in other packages that the classes in the package depend upon is an indicator of the package’s dependence on externalities. Efferent = outgoing.
      • 传出耦合(Ce):包中的类所依赖的其他包中的类的数量是包对外部性依赖的指标。传入=传出。
    • 组件分析 components 参数
    1. java jdepend.textui.JDepend -components com.xyx.package_a,com.xyz.package_b /path/to/classes
    • 使用jdepend.properties
    1. java -cp ".;.\dist\jdepend-2.10.jar" jdepend.textui.JDepend D:\develop\code\qax\cybertron -file cybertron_jdepend_filter.txt