var O = function(someValue) { } O.prototype.hello = function(){ return "hhhhhhh"; } var i = new O("chris"); console.log(i.hello()); //this prints out hhhhhhh
/** @generated * @param jcas JCas to which this Feature Structure belongs * @param begin offset to the begin spot in the SofA * @param end offset to the end spot in the SofA */ public O(JCas jcas, int begin, int end) { super(jcas); setBegin(begin); setEnd(end); readObject(); }
/** @generated * @param jcas JCas to which this Feature Structure belongs */ public O(JCas jcas) { super(jcas); readObject(); }
/** @generated * @param jcas JCas to which this Feature Structure belongs * @param begin offset to the begin spot in the SofA * @param end offset to the end spot in the SofA */ public O(JCas jcas, int begin, int end) { super(jcas); setBegin(begin); setEnd(end); readObject(); }
/** Internal - constructor used by generator * @generated * @param addr low level Feature Structure reference * @param type the type of this Feature Structure */ public O(int addr, TOP_Type type) { super(addr, type); readObject(); }
/** @generated * @param jcas JCas to which this Feature Structure belongs * @param begin offset to the begin spot in the SofA * @param end offset to the end spot in the SofA */ public O(JCas jcas, int begin, int end) { super(jcas); setBegin(begin); setEnd(end); readObject(); }
/** Internal - constructor used by generator * @generated * @param addr low level Feature Structure reference * @param type the type of this Feature Structure */ public O(int addr, TOP_Type type) { super(addr, type); readObject(); }
var O = function() { this.b = 4; this.c = 8; this.d = this.b + this.c; } var o = new O();
/** @generated * @param jcas JCas to which this Feature Structure belongs * @param begin offset to the begin spot in the SofA * @param end offset to the end spot in the SofA */ public O(JCas jcas, int begin, int end) { super(jcas); setBegin(begin); setEnd(end); readObject(); }
/** Internal - constructor used by generator * @generated * @param addr low level Feature Structure reference * @param type the type of this Feature Structure */ public O(int addr, TOP_Type type) { super(addr, type); readObject(); }
var O = function O() { this.val = 'value'; this.toJSON = function () { return ['VALUE!']; }; }; var o = new O(); var s = JSON.stringify(o); console.log(s); // >> ["VALUE!"]
/** @generated * @param jcas JCas to which this Feature Structure belongs */ public O(JCas jcas) { super(jcas); readObject(); }
function O(x,y) { this.x=x; this.y=y; this.method=function() {...} return this; } var o=new O(0,0);
/** @generated * @param jcas JCas to which this Feature Structure belongs */ public O(JCas jcas) { super(jcas); readObject(); }
jsEngine.eval("function makeJsObject(nativeObject) { return {nativeObject:nativeObject}; };"); O o = new O(3); Object q = iv.invokeFunction("makeJsObject", o); jsEngine.put("q", q); jsEngine.eval("q.test = function(x) { return this.nativeObject.test(this.nativeObject.mV * x); };"); Object result = iv.invokeMethod(q, "test", 4);
/** Internal - constructor used by generator * @generated * @param addr low level Feature Structure reference * @param type the type of this Feature Structure */ public O(int addr, TOP_Type type) { super(addr, type); readObject(); }
function O(){ var self = this; this.name="hello"; this.f=function(){ alert(self.name);//why does "this" refer to the array arr rather than the object? }; this.arr=[]; this.arr["x"]=this.f; } var d=new O(); d.arr["x"]();
/** @generated * @param jcas JCas to which this Feature Structure belongs */ public O(JCas jcas) { super(jcas); readObject(); }
function O() { this.resize = function() {}.bind(this); } var o = new O();