depends:生成控制流

291 阅读1分钟

快速使用

  1. 下载最新的jar包
  2. 通过CLI使用depends
  3. 命令:java -Xmx4g -jar depends.jar <args>
  4. 实例:java -Xmx4g -jar depends.jar -g=method -f=dot java D:/src_dir output/result 此命令会将 D:/src_dir 作为输入,在 output 文件夹下输出一个名为 result.dot 的结果文件

<args>参数

Usage: depends [-hms] [--auto-include] [-d=<dir>] [-g=<granularity>]
               [-p=<namePathPattern>] [-f=<format>[,<format>...]]...
               [-i=<includes>[,<includes>...]]... <lang> <src> <output>
      <lang>                 The language of project files: [cpp, java, ruby, python, pom]
      <src>                  The directory to be analyzed
      <output>               The output file name
      
  --auto-include         auto include all paths under the source path (please notice the potential side effect)
      
  -i, --includes=<includes>[,<includes>...]
                             The files of searching path
                             
  -d, --dir=<dir>            The output directory
  
  -f, --format=<format>[,<format>...]
                             The output format: [json(default),xml,excel,dot,plantuml]
                             
  -g, --granularity=<granularity>
                             Granularity of dependency.[file(default),method,L#(the level of folder. e.g. L1=1st level folder)  ]
                             
  -h, --help                 Display this help and exit
  
  -s, --strip-leading-path   Strip the leading path.
  
  -m, --map                  Output DV8 dependency map file.
  
  -p, --namepattern=<namePathPattern>
                             The name path separators.[default(/),dot(.)

相关链接

multilang-depends/depends - GitHub