All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.coveo.nashorn_modules.Require Maven / Gradle / Ivy

There is a newer version: 1.0.9
Show newest version
package com.coveo.nashorn_modules;

import javax.script.Bindings;
import javax.script.ScriptContext;
import javax.script.ScriptException;

import jdk.nashorn.api.scripting.NashornScriptEngine;

public class Require {
  public static Module enable(NashornScriptEngine engine, Folder folder) throws ScriptException {
    Bindings global = engine.getBindings(ScriptContext.ENGINE_SCOPE);
    Module module = new Module(engine, folder, new ModuleCache(), "
", global, null, null); module.setLoaded(); return module; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy