zoukankan      html  css  js  c++  java
  • Source Xref 与 JavaDocs 学习理解

      最近学习Mybatis的官方文档,看到了【项目文档】一节有很多内容没有见过,做个笔记,理解一下。

        没找到java相关代码的解释,其实用下面这个php版本解释,也非常不错。

    What is SOURCEXref?

    SOURCEXref is a developer tool that’s designed to ease the process of working on large PHP projects by making it very fast and easy to browse the code documentation along with the code itself.

    It works by scanning a project directory and translating the files it finds into readable cross-referenced HTML, simultaneously utilizing comments in the code to produce documentation to accompany it. The result is a collection of plain HTML files that can be read using any browser, with no supporting software required.

    SOURCEXref has very minimal requirements to run; just having a copy of Perl installed is all you need (and the Windows binary supplies that for you). Getting started requires editing two or three lines in the configuration file and running the program.

    Features

    • Minimal requirements, minimal setup.
    • No web server required to view output.
    • Cross-references PHP classes, functions, variables, constants and require/include usage.
    • Extracts phpdoc style documentation from source files.
    • Javascript enhanced output provides:Pretty-prints PHP files from the browser.
      • Mouse-over information for classes and functions in the source view.
      • Hot-jump to the source of any class/function definition.
      • Instant lookup of classes, functions, constants and tables by name.
      • Search/lookup history.

                                                ——又找到个代码网站:http://www.sourcexref.com/

      说得简练一点儿,就是在浏览器里可以直接向上通过类型、通过调用,跟踪源代码的结构,当然是通过链接来实现

      

      那这个插件和javaDocs是什么关系呢?

      其实很像啦,只不过javaDocs主要是用来展现代码里的各个注释

      

      

    至于实现原理上,我在想,
        首先,程序文件按照目录进行存放,这个和网址里的目录概念上可以对应。
        然后,像类名,方法名就可以做出链接了。把包名定义中的 .  切换成 / 向上回溯。
    
    又或者基于IDE中的类结构,做个类型表之类的,想不通了。没玩过。
         
    

      

      

  • 相关阅读:
    etcd 部署、备份与恢复
    centos7 mysql 5.7.24 源码编译
    生产中两块网卡bond
    shell 免密批量执行脚本
    MegaCli 清除与添加raid5
    centos7 mongodb4.0.2 复制集主从部署
    centos6.6 部署 cacti 并采集交换机流量
    shell 批量远程主机执行命令
    拯救系统文件只读模式
    下推自动机(PDA)在程序设计中的应用
  • 原文地址:https://www.cnblogs.com/haore147/p/5498896.html
Copyright © 2011-2022 走看看