Source Xref 与 JavaDocs 学习理解
Posted 二郎那个三郎
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了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中的类结构,做个类型表之类的,想不通了。没玩过。
以上是关于Source Xref 与 JavaDocs 学习理解的主要内容,如果未能解决你的问题,请参考以下文章