Nashorn ScriptObject suggestion

Youssef EL HOUTI youssef.elhouti at
Fri Mar 7 03:09:16 PST 2014

I'm working on a project when I use Nashorn with java 8 in many ways, and I
thought that of an improvement in the class ScriptObject that doesn't cost
What? Make ScriptObject implement Map <String,Object>

   -  we could call java function from javascript by passing a javascript
   Objact as argument.
   - we could get a js function result (JSON) in java without casting...
   - ScriptObject already define almost all the methods needed (if not all)

thank you for your time and please let me know if it's a bad suggestion why?
I would be glad to help coding that.
Best Regards.

More information about the nashorn-dev mailing list