📄 object.js
字号:
// Description: js.lang.Object 基类
// Author: Wan Changhua
// Version: 2004.02.09.01
_package("js.lang");
_import("js.lang.Class");
function js.lang.Object() {
this.window = window;
var _classPath = null;
this.getClassPath = function() {
if (_classPath == null) _classPath = $js_classpath + this.className.replace(/\./gi, "\/");
return _classPath;
};
var _codeBase = null;
this.getCodeBase = function() {
if (_codeBase == null) {
_classPath = this.getClassPath();
var idx = _classPath.lastIndexOf("\/");
_codeBase = _classPath.substring(0, idx);
}
return _codeBase;
};
this.toString = function() {
return("[jclass/object]:" + this.className);
};
this.getClass = function() {
return Class.forName(this.className);
};
this.getClassLoader = function() {
//TODO
}
this.clone = function() {
//TODO
};
this.instanceOf = function(c) {
return Class.forName("js.lang.Class").instanceOf(this, c);
};
this.getUID = function() {
if (typeof(this.uniqueID) == "undefined") {
this.uniqueID = "obj_"
+ (new Date()).getTime()
+ Math.round(Math.random() * 1000);
eval("window." + this.uniqueID + " = this;");
}
return this.uniqueID;
};
}
//var _p = js.lang.Object._extends("Object");
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -