- 浏览: 223209 次
- 性别:
- 来自: 深圳
文章分类
- 全部博客 (212)
- 架构师-01-文档目录 (3)
- 架构师-02-组织 (7)
- 架构师-03-实施 (35)
- 架构师-04-监督 (14)
- 架构师-05-工具 (29)
- 架构师-09-引用文集 (63)
- 专题-01-微博应用 (5)
- 专题-02-GoogleEarth (1)
- 专题-03-运行维护 (9)
- 专题-04-经纪人营平 (3)
- 专题-05-RCP&RAP (5)
- 专题-06-框架PK (3)
- 专题-07-Android (13)
- 专题-08-UI (3)
- 专题-liferay6 (6)
- 专题-extjs4 (3)
- 专题-CXF (3)
- 专题-封闭网络的社会化 (0)
- 扯谈 (4)
- 外包 (9)
- 专题-C++ (4)
- 专题-09-BI (2)
- jquery&easyui (2)
- 专题-搜索引擎 (1)
最新评论
-
brighter:
oMapper.configure(Deserializati ...
jackson 抛出 bean 中没有定义字段的错误,只好用 gson -
PassFeed_free:
public Bitmap decode(ImageDecod ...
android universalimageloader 几点改进 -
PassFeed_free:
楼主你好, 请问这个库, 在大屏显示高清图片 ,listvie ...
android universalimageloader 几点改进 -
yonghong:
楼主只是揣测
JIRA4.1 升级到 JIRA5.1 -
abdxj:
"Could NOT parse license t ...
JIRA4.1 升级到 JIRA5.1
可惜不支持 SC 代码格式,看看源码,想修改一下来支持,结果看到这是调用 mozilla 的 js.jar 包,没办法了,只能找其他的工具了,暂时用 aptana+sc 插件顶住。
许多现代编程语言都有自己的集成化文档生成工具,像Java有JavaDoc,.NET有NDoc,PHP有PHPDoc,这些自动化文档工具可以根据代码中的注释自动生成代码文档。
JsDoc Toolkit就是这样一个自动化文档工具,它是发布在Google code上的一个开源项目,和其他语言的文档工具一样,它可以自动从Javascript代码中提取注释生成格式化文档。
下载地址
http://code.google.com/p/jsdoc-toolkit/downloads/list
运行环境
JsDoc Toolkit是用Java开发的,运行时需要以下环境:
1.WindowXP
java version "1.6.0_03"
Java(TM) SE Runtime Environment (build 1.6.0_03-b05)
2.Mac OS X 10.5
java version "1.5.0_19"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_19-b02-304)
其它版本的Java可能导致JsDoc Toolkit运行失败。
用法
在运行之前,你需要把当前的工作目录切换到JsDoc Toolkit目录,并确保将java.exe所在目录添加到环境变量中。
java -jar jsrun.jar app\run.js -a -t=templates\jsdoc mycode.js
mycode.js是需要生成文档的js代码,如果mycode.js和JsDoc不在同一目录,请加上文件的绝对或者相对路径。如果项目中有多个js,可以使用通配符*来指定多个js文件(*.js)。-e参数指定文档编码,-t参数指定文档模板位置(可以新建或修改模板文件让输出的代码文件更具特色),生成的文档文件在JsDoc目录下的out目录中。为了使用方便,我写了一个批处理文件,你可以将代码保存为run.bat,放到JsDoc目录下:
::run.bat
@echo off
::js文件名(换成你的js文件名)
set jsname=jquery.js
::js文件路径(换成你的js文件路径)
set jspath=C:\test\
echo start...
java -jar jsrun.jar app\run.js -a -e=utf-8 -t=templates\jsdoc "%jspath%%jsname%.js"
::out\%jsname%\index.html
echo finished.
pause
常用关键字
author 标识代码作者
class 标识该函数是一个类的构造函数
constant 声明常量
constructor 同class
default 默认值
deprecated 声明已弃用的对象
description 对象描述
event 事件函数
example 例子代码
fileOverview Javascript文件总体描述
ignore 忽略有这个标记的函数
link 与其他JsDoc对象关联
name 显示声明JsDoc不能自动检测的对象
namespace 声明命名空间
param 参数
private 声明私有对象
property 显式声明一个属性
public 声明公开对象
requires 声明所依赖的对象或文件
returns 返回值
see 声明可参考的其它对象
since 声明对象从指定版本开始生效
static 显式声明一个静态对象
throws 声明函数执行过程中可能抛出的异常
type 声明变量类型或者函数返回值类型
version 版本号
详细语法请参阅:JsDoc Toolkit Wiki
以下是官方提示的示例代码:
/**
* @fileoverview This file is to be used for testing the JSDoc parser
* It is not intended to be an example of good JavaScript OO-programming,
* nor is it intended to fulfill any specific purpose apart from
* demonstrating the functionality of the
* <a href='http://sourceforge.net/projects/jsdoc'>JSDoc</a> parser
*
* @author Gabriel Reid gab_reid@users.sourceforge.net
* @version 0.1
*/
/**
* Construct a new Shape object.
* @class This is the basic Shape class.
* It can be considered an abstract class, even though no such thing
* really existing in JavaScript
* @constructor
* @throws MemoryException if there is no more memory
* @throws GeneralShapeException rarely (if ever)
* @return A new shape
*/
function Shape(){
/**
* This is an example of a function that is not given as a property
* of a prototype, but instead it is assigned within a constructor.
* For inner functions like this to be picked up by the parser, the
* function that acts as a constructor <b>must</b> be denoted with
* the <b>@constructor</b> tag in its comment.
* @type String
*/
this.getClassName = function(){
return "Shape";
}
/**
* This is a private method, just used here as an example
*/
function addReference(){
// Do nothing...
}
}
/**
* Create a new Hexagon instance.
* @extends Shape
* @class Hexagon is a class that is a <i>logical</i> sublcass of
* <a href="Shape.html#">Shape</a> (thanks to the <code>@extends</code> tag), but in
* reality it is completely unrelated to Shape.
* @param {int} sideLength The length of one side for the new Hexagon
*/
function Hexagon(sideLength) {
}
/**
* This is an unattached (static) function that adds two integers together.
* @param {int} One The first number to add
* @param {int http://jsdoc.sourceforge.net/} Two The second number to add
* @author Gabriel Reid
* @deprecated So you shouldn't use it anymore!
*/
function Add(One, Two){
return One + Two;
}
/**
* The color of this shape
* @type Color
*/
Shape.prototype.color = null;
/**
* The border of this shape.
* @type int
*/
Shape.prototype.border = null;
/*
* The assignment of function implementations for Shape, documentation will
* be taken over from the method declaration.
*/
Shape.prototype.getCoords = Shape_GetCoords;
Shape.prototype.getColor = Shape_GetColor;
Shape.prototype.setCoords = Shape_SetCoords;
Shape.prototype.setColor = Shape_SetColor;
/*
* These are all the instance method implementations for Shape
*/
/**
* Get the coordinates of this shape. It is assumed that we're always talking
* about shapes in a 2D location here.
* @requires Shape The shape class
* @returns A Coordinate object representing the location of this Shape
* @type Coordinate
*/
function Shape_GetCoords(){
return this.coords;
}
/**
* Get the color of this shape.
* @see #setColor
* @type Color
*/
function Shape_GetColor(){
return this.color;
}
/**
* Set the coordinates for this Shape
* @param {Coordinate} coordinates The coordinates to set for this Shape
*/
function Shape_SetCoords(coordinates){
this.coords = coordinates;
}
/**
* Set the color for this Shape
* @param {Color} color The color to set for this Shape
* @param other There is no other param, but it can still be documented if
* optional parameters are used
* @throws NonExistantColorException (no, not really!)
* @see #setColor
*/
function Shape_SetColor(color){
this.color = color;
}
/**
* Clone this shape
* @returns A copy of this shape
* @type Shape
* @author Gabriel Reid
*/
Shape.prototype.clone = function(){
return new Shape();
}
/**
* Create a new Rectangle instance.
* @class A basic rectangle class, inherits from Shape.
* This class could be considered a concrete implementation class
* @constructor
* @param {int} width The optional width for this Rectangle
* @param {int} height Thie optional height for this Rectangle
* @author Gabriel Reid
* @see Shape Shape is the base class for this
*/
function Rectangle(width, // This is the width
height // This is the height
){
if (width){
this.width = width;
if (height){
this.height = height;
}
}
}
/* Inherit from Shape */
Rectangle.prototype = new Shape();
/**
* Value to represent the width of the Rectangle.
* <br>Text in <b>bold</b> and <i>italic</i> and a
* link to <a href="http://sf.net">SourceForge</a>
* @private
* @type int
*/
Rectangle.prototype.width = 0;
/**
* Value to represent the height of the Rectangle
* @private
* @type int
*/
Rectangle.prototype.height = 0;
/**
* Get the type of this object.
* @type String
*/
Rectangle.prototype.getClassName= function(){
return "Rectangle";
}
/*
* These are all the instance method implementations for Rectangle
*/
Rectangle.prototype.getWidth = Rectangle_GetWidth;
Rectangle.prototype.getHeight = Rectangle_GetHeight;
Rectangle.prototype.setWidth = Rectangle_SetWidth;
Rectangle.prototype.setHeight = Rectangle_SetHeight;
Rectangle.prototype.getArea = Rectangle_GetArea;
/**
* Get the value of the width for the Rectangle
* @type int
* @see #setWidth
*/
function Rectangle_GetWidth(){
return this.width;
}
/**
* Get the value of the height for the Rectangle.
* Another getter is the <a href="Shape.html#getColor">Shape.getColor()</a> method in the
* <a href="Shape.html#">base Shape class</a>.
* @return The height of this Rectangle
* @type int
* @see #setHeight
*/
function Rectangle_GetHeight(){
return this.height;
}
/**
* Set the width value for this Rectangle.
* @param {int} width The width value to be set
* @see #setWidth
*/
function Rectangle_SetWidth(width){
this.width = width;
}
/**
* Set the height value for this Rectangle.
* @param {int} height The height value to be set
* @see #getHeight
*/
function Rectangle_SetHeight(height){
this.height = height;
}
/**
* Get the value for the total area of this Rectangle
* @return total area of this Rectangle
* @type int
*/
function Rectangle_GetArea(){
return width * height;
}
/**
* Create a new Square instance.
* @class A Square is a subclass of <a href="Rectangle.html#">Rectangle</a>
* @param {int} width The optional width for this Rectangle
* @param {int} height The optional height for this Rectangle
*/
function Square(width, height){
if (width){
this.width = width;
if (height){
this.height = height;
}
}
}
/* Square is a subclass of Rectangle */
Square.prototype = new Rectangle();
/*
* The assignment of function implementation for Shape.
*/
Square.prototype.setWidth = Square_SetWidth;
Square.prototype.setHeight = Square_SetHeight;
/**
* Set the width value for this Square.
* @param {int} width The width value to be set
* @see #getWidth
*/
function Square_SetWidth(width){
this.width = this.height = width;
}
/**
* Set the height value for this Square
* Sets the <a href="Rectangle.html#height">height</a> attribute in the Rectangle.
* @param {int} height The height value to be set
*/
function Square_SetHeight(height){
this.height = this.width = height;
}
/**
* Create a new Circle instance based on a radius.
* @class Circle class is another subclass of Shape
* @param {int} radius The optional radius of this Circle
*/
function Circle(radius){
if (radius){
this.radius = radius;
}
}
/* Circle inherits from Shape */
Circle.prototype = new Shape();
/**
* The radius value for this Circle
* @private
* @type int
*/
Circle.prototype.radius = 0;
/**
* A very simple class (static) field that is also a constant
* @final
* @type float
*/
Circle.PI = 3.14;
Circle.createCircle = Circle_CreateCircle;
Circle.prototype.getRadius = Circle_GetRadius;
Circle.prototype.setRadius = Circle_SetRadius;
/**
* Get the radius value for this Circle
* @type int
* @see #setRadius
*/
function Circle_GetRadius(){
return this.radius;
}
/**
* Set the radius value for this Circle
* @param {int} radius The radius value to set
* @see #getRadius
*/
function Circle_SetRadius(radius){
this.radius = radius;
}
/**
* An example of a class (static) method that acts as a factory for Circle
* objects. Given a radius value, this method creates a new Circle.
* @param {int} radius The radius value to use for the new Circle.
* @type Circle
*/
function Circle_CreateCircle(radius){
return new Circle(radius);
}
/**
* Create a new Coordinate instance based on x and y grid data.
* @class Coordinate is a class that can encapsulate location information.
* @param {int} x The optional x portion of the Coordinate
* @param {int} y The optinal y portion of the Coordinate
*/
function Coordinate(x, y){
if (x){
this.x = x;
if (y){
this.y = y;
}
}
}
/**
* The x portion of the Coordinate
* @type int
* @see #getX
* @see #setX
*/
Coordinate.prototype.x = 0;
/**
* The y portion of the Coordinate
* @type int
* @see #getY
* @see #setY
*/
Coordinate.prototype.y = 0;
Coordinate.prototype.getX = Coordinate_GetX;
Coordinate.prototype.getY = Coordinate_GetY;
Coordinate.prototype.setX = Coordinate_SetX;
Coordinate.prototype.setY = Coordinate_SetY;
/**
* Gets the x portion of the Coordinate.
* @type int
* @see #setX
*/
function Coordinate_GetX(){
return this.x;
}
/**
* Get the y portion of the Coordinate.
* @type int
* @see #setY
*/
function Coordinate_GetY(){
return this.y;
}
/**
* Sets the x portion of the Coordinate.
* @param {int} x The x value to set
* @see #getX
*/
function Coordinate_SetX(x){
this.x = x;
}
/**
* Sets the y portion of the Coordinate.
* @param {int} y The y value to set
* @see #getY
*/
function Coordinate_SetY(y){
this.y = y;
}
/**
* @class This class exists to demonstrate the assignment of a class prototype
* as an anonymous block.
*/
function ShapeFactory(){
}
ShapeFactory.prototype = {
/**
* Creates a new <a href="Shape.html#">Shape</a> instance.
* @return A new <a href="Shape.html#">Shape</a>
* @type Shape
*/
createShape: function(){
return new Shape();
}
}
/**
* An example of a singleton class
*/
MySingletonShapeFactory = new function(){
/**
* Get the next <a href="Shape.html#">Shape</a>
* @type Shape
* @return A new <a href="Shape.html#">Shape</a>
*/
this.getShape = function(){
return null;
}
}
/**
* Create a new Foo instance.
* @class This is the Foo class. It exists to demonstrate 'nested' classes.
* @constructor
* @see Foo.Bar
*/
function Foo(){}
/**
* Creates a new instance of Bar.
* @class This class exists to demonstrate 'nested' classes.
* @constructor
* @see Foo.Bar
*/
function Bar(){}
/**
* Nested class
* @constructor
*/
Foo.Bar = function(){this.x = 2;}
Foo.Bar.prototype = new Bar();
Foo.Bar.prototype.y = '3';
发表评论
-
Eclipse小工具集
2013-12-30 00:15 427Eclipse皮肤:酷炫黑色,更Geek!转自http:// ... -
两个好用运营监控工具
2013-04-01 16:48 0手机版本: http://demo.cobub.com ... -
腾讯内部用于软件原型设计的专用工具UIDesigner
2013-02-03 15:46 1019原文出自:http://www.webppd.com/thr ... -
抽取 Axure 设计输出到开发工作单
2013-02-03 10:03 0基于原型开发不是什么新鲜事,也一直被广泛应用于软件开发工作 ... -
PM-基于Axure的PRD写作思考
2013-02-01 15:54 680原文出自:http://blog.renren.com/sh ... -
arc-04-10-手机应用的性能测试
2013-01-05 15:01 664手机性能测试的工具一大堆,但专门针对开发手机应用的性能测试工 ... -
支持拼音和五笔的js软键盘,仿iphone风格,神一样的大作
2012-11-10 11:37 1743原文地址:提供一款支持拼音和五笔的js软键盘,仿iphone风 ... -
JIRA4.1 升级到 JIRA5.1
2012-07-26 10:50 3080(1)升级过程理应很简单,用网上的破解指南一步步安装,很快就成 ... -
arc-04-09-简单的性能调优
2012-07-05 16:45 710<%@ page contentType="t ... -
Arc-05-23- JIRA 的多种用法
2012-04-01 09:19 0每个使用 JIRA 的组织似乎都有不同的用法,有的作 bug ... -
生成器汇总
2012-02-23 09:59 0MinuteProject http://minutepro ... -
Arc-05-22- Codepro 代码复审及自动化工具
2012-02-14 10:52 1503无论如何,代码在最终封箱打包前,一定要复审一下下才放心。 自 ... -
Arc-05-21- AmaterasUML--自动生成UML图的Eclipse插件
2012-01-09 17:49 2018想选择一款免费或者破解的 eclipse 生成工具,比较了一大 ... -
Arc-05-20- Minimal Centos6.2 安装 vmware server
2012-01-07 13:50 1402Minimal Centos6.2 安装 vmware ser ... -
Arc-05-19- 数据库设计总结
2011-12-28 10:33 771以下几条经验从别处 K 来的,我也比较认同。 1 ... -
Arc-05-18- Regain 给内部文档站点嵌入内部搜索功能
2011-12-22 10:23 832公司内部有不少文档站点了,wiki,api,bbs... 使用 ... -
Arch-05-17-UltraEdit for linux 不断试用30天的方法
2011-12-08 16:27 993原文来自:http://space.itp ... -
Arch-05-16- Maven3+Tomcat7
2011-11-24 10:24 1162maven3+tomcat7 外部启动 tomcat 和嵌入启 ... -
Arch-05-14- MongDB 客户端工具MongoVUE
2011-10-19 11:30 3876MongoDB 客户端工具已经有不少了,其中 Mong ... -
Arch-05-13- maven常见问题问答
2011-08-29 14:10 853maven常见问题问答 http://www.cnblo ...
相关推荐
Arch-Linux-Install-ScriptArch_Linux_安装脚本_Arch-Linux-Installer
"cacti-plugin-arch-2.0.tar.gz" 是一个针对Cacti的插件包,用于扩展Cacti的功能,提供更丰富的监控选项。此插件名为“Arch”,可能是对系统架构或性能分析相关的增强。 该压缩包文件的名称表明它是版本2.0,通常这...
基于android8.1源码平台中生成的jar,亲测可用!!!!
变系数ARCH-M模型是时间序列分析领域的重要研究对象,其核心在于通过截面似然估计来检验模型是否具有条件异方差性(ARCH效应)。首先,我们来探讨一下条件异方差性的概念,它是指在时间序列分析中,随机变量的条件...
文档详细介绍了SSDP消息格式,包括SSDP消息的起始行、头部字段、头部字段扩展和UUID(通用唯一识别码)的格式及推荐的生成算法。同时,还讨论了SSDP的处理规则。 设备广告部分涉及设备如何通告其在网络上的存在,...
该文档是关于OpenRISC1000架构的手册,版本号为1.0,修订号为0,发布日期为2012年12月5日。 文档的版权归属为***和参与编写文档的作者们。根据文档,读者被授权在GNU通用公共许可证(GPL)的条款下重新分发和/或...
标题中的"Python库 | arch-4.11-cp35-cp35m-win32.whl"指的是一个特定版本的Python库,名为“arch”,版本为4.11,适用于Python 3.5解释器(由"cp35"标识),且是针对32位Windows操作系统("win32")的。"cp35m"表示...
安装克隆这个仓库git clone https://github.com/jannispinter/arch-openwrt-buildroot.git构建 docker 镜像 cd arch-openwrt-buildrootdocker build -t= " arch-openwrt-buildroot:trunk " . 最后的点表示Dockerfile...
python库。 资源全名:arch-4.8.0-cp27-cp27m-win32.whl
Next Generation On Demand (NGOD) Asset Architecture Comcast-SP-NGOD-ASSET-ARCH-I03-100731 Issued July 31, 2010
资源来自pypi官网。 资源全名:arch-4.17-cp39-cp39-manylinux1_x86_64.whl
Next Generation On Demand (NGOD) Overall Architecture Comcast-SP-NGOD-GEN-ARCH-I03-100731 Issued July 31, 2010
我的Arch_Linux安装步骤和日志_Arch-Linux-install-log
用户和开发者可以通过阅读这些文档来了解如何正确地加载和使用arch-snds100驱动,以确保s3c44b0x处理器的硬件设备能够正常工作。 总的来说,arch-snds100驱动程序是为s3c44b0x处理器定制的一个关键组件,它确保了...
Arch_Linux_盒装安装媒介的小盒子_arch-media-box-typst
**arch-box** 是一个专为Arch Linux自动化构建的项目,旨在为不同的虚拟化和容器环境提供预配置的Arch Linux镜像。它支持多种提供程序,包括 **Vagrant** 和 **VirtualBox**,同时也可能适用于 **QEMU** 等其他虚拟...
资源来自pypi官网。 资源全名:arch-4.9.1-cp36-cp36m-macosx_10_6_intel.whl
arch-model-estimation_solution.ipynb
UPnP-arch-DeviceArchitecture-v2.0文件是UPnP论坛发布的官方技术文档,为开发者提供了一套完整的UPnP协议开发流程。这份文件对于那些希望在网络环境中集成和实现UPnP设备的开发者来说,是一份非常有价值的资源。它...