Hi Andreas,
JSAdapter in nashorn introduces __call__ method. This is called when a
"method" is called on an object.
obj.x(); // --> calls __call__ method
obj.x // --> calls __get__ method
Thanks
-Sundar
On Monday 27 May 2013 03:36 PM, Andreas Rieber wrote:
Hi,
i just try to get the jconsole-plugin working and found the following
issue with JSAdapter:
var obj = new JSAdapter() {
__get__: function (name) {
return function() {
print(name);
};
}
};
var func = obj.x;
func();
obj.x();
Expected output should be x x but it fails with no such function "x".
Plain old Rhino did handle that case.
Andreas