Docs/examples for JSAdapter
Tal Liron
tal.liron at threecrickets.com
Tue Oct 22 10:42:39 PDT 2013
Rick, have you considered writing a wrapper library in pure JavaScript
over the harsher Java-written API? Users won't even have to know that
Java is being called behind the scenes.
It's much more natural to write such things in JavaScript, and it would
also be more portable to other JS engines (Rhino). I've done this quite
a bit!
On 10/23/2013 12:58 AM, Rick Bullotta wrote:
> I totally agree on the benefit of calling Java directly. I just want to create a seamless DSL for my users.
>
> So subclassing JSObject is the only way it seems (e.g. an interface-based approach wouldn't work). What about a hybrid interface + annotation based approach? Annotate the class to tell it to dynalink, and have an interface that implements getMember, getSlot, etc...
>
> Is that possible?
>
More information about the nashorn-dev
mailing list