
jjst.jjst.js.JSObject.js Maven / Gradle / Ivy
The newest version!
jjst.defineClass({
name: "js.JSObject",
instanceMethods: {
"": function(){
jjst.getClass("java.lang.Object").apply(this, []);
},
"serialize": function(){
return JSON.stringify(this);
},
"deserialize": function(json){
var obj = JSON.parse(json);
for (var field in obj)
if (field !== "$id")
this[field] = obj[field];
},
"getType": function(){
var JSType = jjst.getClass("js.reflection.JSType");
return new JSType(this);
}
},
classMethods: {
"setProperty": function(context, name, obj){
context[name] = obj;
},
"getProperty": function(context, name){
return context[name];
},
"getGlobal": function(name){
return jjst.getClass(name);
}
},
baseType: "java.lang.Object"
});
© 2015 - 2025 Weber Informatics LLC | Privacy Policy