Class NashornBindingsParametersCallback

All Implemented Interfaces:
Map<String,Object>, Bindings, ParametersCallback

public class NashornBindingsParametersCallback extends BindingsParametersCallback
Implementation of Bindings for Java 8 JavaScript engine "Nashorn".

See Nashorn engine notes for reasoning. In essence, Nashorn expects Bindings to be an instance of jdk.nashorn.api.scripting.ScriptObjectMirror, otherwise it puts "nashorn.global" variable inside and use it to store all variables. This makes the interface pretty unusable and requires some tricks implemented below

TODO: Fix issue with outer scripts variables not being visible to Nashorn. https://github.com/scriptella/scriptella-etl/issues/2
Author:
Fyodor Kupolov