$args : [], // original arguments used when constructing.
addOn : "",
alias : "",
- augments : false, // Doctag
+ augments : [], // Doctag[]
author : "",
classDesc : "",
comment : {},
deprecated : "",
desc : "",
- events : [],
+ //events : false,
example : "",
- exceptions : [],
- inherits : [],
- inheritsFrom : [],
+ exceptions : [], // Doctag[]
+ inherits : [], // Doctag[]
+ //inheritsFrom : [],
isa : "OBJECT", // OBJECT//FUNCTION
isEvent : false,
isConstant : false,
isPrivate : false,
isStatic : false,
memberOf : "",
- methods : [],
+ methods : [], // Symbol[]
_name : "",
- _params : [],
- properties : [],
- requires : [],
- returns : [],
- see : [],
+ _params : [], //Doctag[]
+ properties : [], //Doctag[]
+ requires : [], //Doctag[]
+ returns : [], //Doctag[]
+ see : [], //Doctag[]
since : "",
srcFile : {},
type : "",
- toObject : function()
+ toJSON : function()
{
- function array2object(a)
- {
-
- var r = [];
- a.forEach(function(e) {
- r.push(e.toObject());
- });
- return r;
- }
-
- var ret = { };
+
+ var ret = { '*object' : 'Symbol' };
for (var i in this) {
if (Symbol.hide.indexOf(i) > -1) {
continue;
switch(i) {
//arrays..
case 'params' :
- ret[i] = array2object(this[i],true);
- continue;
-
- //objects..
- case 'augments' :
+ case 'augments' :
+ case 'exceptions' :
+ case 'inherits' :
+ case 'methods' :
+ case '_params':
+ case 'properties':
+ case 'requires':
+ case 'returns':
+ case 'see':
+ case 'cfgs': // key val of doctags..
case 'comment' :
- print(JSON.stringify(this[i]));
- ret[i] = this[i].toObject();
+ ret[i] = this[i]
+ continue;
+
+ //skip
+ case 'inheritsFrom':
+ case 'childClasses':
continue;
-
+
default:
print("object? :" + i);
Seed.quit();
case 'string':
case 'number':
+ case 'boolean':
ret[i] = this[i]; continue;
default:
+
print("unknown type:" + typeof(this[i]));
+ print(JSON.stringify(this));
Seed.quit();
}
}
this.params = [];
this.$args = [];
- this.events = [];
+ //this.events = [];
this.exceptions = [];
this.inherits = [];
- this.inheritsFrom = [];
+ //
this.isa = "OBJECT"; // OBJECT//FUNCTION
this.methods = [];
this._params = [];
this.returns = [];
this.see = [];
this.srcFile = {};
- this.childClasses = [];
+
+
this.cfgs = {};
+ // derived later?
+ this.inheritsFrom = [];
+ this.childClasses = [];
this.comment = new DocComment();
this.comment.isUserComment = false;
// @class
var classes = this.comment.getTag("class");
if (classes.length) {
+ //print(JSON.stringify(this,null,4));
this.isa = "CONSTRUCTOR";
this.classDesc = classes[0].desc; // desc can't apply to the constructor as there is none.
if (!this.classDesc) {
// @static
if (this.comment.getTag("singleton").length) {
this.isStatic = true;
+ //print('------------- got singleton ---------------' + this.isa);
//if (this.isa == "CONSTRUCTOR") {
// this.isNamespace = true;
//}
if (memberOfs.length) {
this.memberOf = memberOfs[0].desc;
this.memberOf = this.memberOf.replace(/\.prototype\.?/g, "#");
+ this.name = this.name.split('.').pop();
+ this.name = this.name.split('#').pop();
+ this.name = this.memberOf + this.name;
+ this._name = this.name
+ this.alias = this.name;
}
/*~t
ns[i] = t[i];
}
return ns;
-}
\ No newline at end of file
+}