Hi there,
I'm considering using Rhino to create a behavior driven unit testing
framework for java classes, but I cannot figure out how to add dynamic
properties to java instances and/or extend java instance prototypes.
For example, I would like to define something like
Object.prototype.shouldEqual = function(that) {
if (this != that) {
throw new Error('<' + this + '> should equal ' + that)
}
}
to work for both instances of javascript objects as well as for
instances of java classes?
so That I might be able to say
new java.lang.String('foo').shouldEqual(new java.lang.String('bar'))
_______________________________________________
dev-tech-js-engine-rhino mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-js-engine-rhino