class Nashorn implements JavascriptEngine<ScriptEngine> {

	@Override
	public Object executeFunction(String name, Object... parameters) {
		try {
			return ((Invocable) engine).invokeFunction(name, parameters);
		} catch (ScriptException | NoSuchMethodException e) {
			log.error("Error executing function [" + name + "]", e);
		}
		return null;
	}

}