public interface Script { public String execute(); }
execute: function() { return context.getScriptFile().getName(); }
importClass(org.scripthelper.context.ScriptContext); importClass(org.scripthelper.context.ScriptHelper); importClass(org.scripthelper.context.ContextListener); importClass(org.scripthelper.context.DefaultScriptContext) scriptClass = new JavaAdapter(org.scripthelper.js.samples.Script, org.scripthelper.context.ContextListener, { _ init: function(ctx) { _ context = ctx; _ }, _ execute: function() { _ return 10; _ } });
Copyright 2019-2020 Herve Girod. All Rights Reserved. Documentation and source under the BSD licence