ModuleScript.getUri
Code IndexAdd Codota to your IDE (free)

Best Java code snippets using org.mozilla.javascript.commonjs.module.ModuleScript.getUri (Showing top 8 results out of 315)

  • Common ways to obtain ModuleScript
private void myMethod () {
ModuleScript m =
  • CachingModuleScriptProviderBase.CachedModuleScript cachingModuleScriptProviderBaseCachedModuleScript;cachingModuleScriptProviderBaseCachedModuleScript.getModule()
  • CachingModuleScriptProviderBase cachingModuleScriptProviderBase;cachingModuleScriptProviderBase.getModuleScript(cx, moduleId, uri, base, paths)
  • ModuleScriptProvider moduleScriptProvider;Context cx;String moduleId;Scriptable paths;moduleScriptProvider.getModuleScript(cx, moduleId, null, null, paths)
  • Smart code suggestions by Codota
}
origin: geogebra/geogebra

@Override
protected void putLoadedModule(String moduleId, ModuleScript moduleScript,
    Object validator)
{
  scripts.put(moduleId, new ScriptReference(moduleScript.getScript(),
      moduleId, moduleScript.getUri(), moduleScript.getBase(),
      validator, scriptRefQueue));
}
origin: io.apigee/rhino

@Override
protected void putLoadedModule(String moduleId, ModuleScript moduleScript,
    Object validator)
{
  scripts.put(moduleId, new ScriptReference(moduleScript.getScript(),
      moduleId, moduleScript.getUri(), moduleScript.getBase(),
      validator, scriptRefQueue));
}
origin: ro.isdc.wro4j/rhino

@Override
protected void putLoadedModule(String moduleId, ModuleScript moduleScript,
    Object validator)
{
  scripts.put(moduleId, new ScriptReference(moduleScript.getScript(),
      moduleId, moduleScript.getUri(), moduleScript.getBase(),
      validator, scriptRefQueue));
}
origin: com.github.tntim96/rhino

@Override
protected void putLoadedModule(String moduleId, ModuleScript moduleScript,
    Object validator)
{
  scripts.put(moduleId, new ScriptReference(moduleScript.getScript(),
      moduleId, moduleScript.getUri(), moduleScript.getBase(),
      validator, scriptRefQueue));
}
origin: io.apigee/rhino

private Scriptable executeModuleScript(Context cx, String id,
    Scriptable exports, ModuleScript moduleScript, boolean isMain)
{
  final ScriptableObject moduleObject = (ScriptableObject)cx.newObject(
      nativeScope);
  URI uri = moduleScript.getUri();
  URI base = moduleScript.getBase();
  defineReadOnlyProperty(moduleObject, "id", id);
  if(!sandboxed) {
    defineReadOnlyProperty(moduleObject, "uri", uri.toString());
  }
  final Scriptable executionScope = new ModuleScope(nativeScope, uri, base);
  // Set this so it can access the global JS environment objects.
  // This means we're currently using the "MGN" approach (ModuleScript
  // with Global Natives) as specified here:
  // <http://wiki.commonjs.org/wiki/Modules/ProposalForNativeExtension>
  executionScope.put("exports", executionScope, exports);
  executionScope.put("module", executionScope, moduleObject);
  moduleObject.put("exports", moduleObject, exports);
  install(executionScope);
  if(isMain) {
    defineReadOnlyProperty(this, "main", moduleObject);
  }
  executeOptionalScript(preExec, cx, executionScope);
  moduleScript.getScript().exec(cx, executionScope);
  executeOptionalScript(postExec, cx, executionScope);
  return ScriptRuntime.toObject(nativeScope,
      ScriptableObject.getProperty(moduleObject, "exports"));
}
origin: geogebra/geogebra

private Scriptable executeModuleScript(Context cx, String id,
    Scriptable exports, ModuleScript moduleScript, boolean isMain)
{
  final ScriptableObject moduleObject = (ScriptableObject)cx.newObject(
      nativeScope);
  URI uri = moduleScript.getUri();
  URI base = moduleScript.getBase();
  defineReadOnlyProperty(moduleObject, "id", id);
  if(!sandboxed) {
    defineReadOnlyProperty(moduleObject, "uri", uri.toString());
  }
  final Scriptable executionScope = new ModuleScope(nativeScope, uri, base);
  // Set this so it can access the global JS environment objects.
  // This means we're currently using the "MGN" approach (ModuleScript
  // with Global Natives) as specified here:
  // <http://wiki.commonjs.org/wiki/Modules/ProposalForNativeExtension>
  executionScope.put("exports", executionScope, exports);
  executionScope.put("module", executionScope, moduleObject);
  moduleObject.put("exports", moduleObject, exports);
  install(executionScope);
  if(isMain) {
    defineReadOnlyProperty(this, "main", moduleObject);
  }
  executeOptionalScript(preExec, cx, executionScope);
  moduleScript.getScript().exec(cx, executionScope);
  executeOptionalScript(postExec, cx, executionScope);
  return ScriptRuntime.toObject(cx, nativeScope,
      ScriptableObject.getProperty(moduleObject, "exports"));
}
origin: ro.isdc.wro4j/rhino

private Scriptable executeModuleScript(Context cx, String id,
    Scriptable exports, ModuleScript moduleScript, boolean isMain)
{
  final ScriptableObject moduleObject = (ScriptableObject)cx.newObject(
      nativeScope);
  URI uri = moduleScript.getUri();
  URI base = moduleScript.getBase();
  defineReadOnlyProperty(moduleObject, "id", id);
  if(!sandboxed) {
    defineReadOnlyProperty(moduleObject, "uri", uri.toString());
  }
  final Scriptable executionScope = new ModuleScope(nativeScope, uri, base);
  // Set this so it can access the global JS environment objects.
  // This means we're currently using the "MGN" approach (ModuleScript
  // with Global Natives) as specified here:
  // <http://wiki.commonjs.org/wiki/Modules/ProposalForNativeExtension>
  executionScope.put("exports", executionScope, exports);
  executionScope.put("module", executionScope, moduleObject);
  moduleObject.put("exports", moduleObject, exports);
  install(executionScope);
  if(isMain) {
    defineReadOnlyProperty(this, "main", moduleObject);
  }
  executeOptionalScript(preExec, cx, executionScope);
  moduleScript.getScript().exec(cx, executionScope);
  executeOptionalScript(postExec, cx, executionScope);
  return ScriptRuntime.toObject(nativeScope,
      ScriptableObject.getProperty(moduleObject, "exports"));
}
origin: com.github.tntim96/rhino

private Scriptable executeModuleScript(Context cx, String id,
    Scriptable exports, ModuleScript moduleScript, boolean isMain)
{
  final ScriptableObject moduleObject = (ScriptableObject)cx.newObject(
      nativeScope);
  URI uri = moduleScript.getUri();
  URI base = moduleScript.getBase();
  defineReadOnlyProperty(moduleObject, "id", id);
  if(!sandboxed) {
    defineReadOnlyProperty(moduleObject, "uri", uri.toString());
  }
  final Scriptable executionScope = new ModuleScope(nativeScope, uri, base);
  // Set this so it can access the global JS environment objects.
  // This means we're currently using the "MGN" approach (ModuleScript
  // with Global Natives) as specified here:
  // <http://wiki.commonjs.org/wiki/Modules/ProposalForNativeExtension>
  executionScope.put("exports", executionScope, exports);
  executionScope.put("module", executionScope, moduleObject);
  moduleObject.put("exports", moduleObject, exports);
  install(executionScope);
  if(isMain) {
    defineReadOnlyProperty(this, "main", moduleObject);
  }
  executeOptionalScript(preExec, cx, executionScope);
  moduleScript.getScript().exec(cx, executionScope);
  executeOptionalScript(postExec, cx, executionScope);
  return ScriptRuntime.toObject(nativeScope,
      ScriptableObject.getProperty(moduleObject, "exports"));
}
org.mozilla.javascript.commonjs.moduleModuleScriptgetUri

Javadoc

Returns the URI of the module.

Popular methods of ModuleScript

  • <init>
    Creates a new CommonJS module.
  • getBase
    Returns the base URI from which this module source was loaded, or null if it was loaded from an abso
  • getScript
    Returns the script object representing the code of the module.
  • isSandboxed
    Returns true if this script has a base URI and has a source URI that is contained within that base U

Popular in Java

  • Creating JSON documents from java classes using gson
  • setContentView (Activity)
  • requestLocationUpdates (LocationManager)
  • setScale (BigDecimal)
    Returns a BigDecimal whose scale is the specified value, and whose value is numerically equal to thi
  • FileNotFoundException (java.io)
    Thrown when a file specified by a program cannot be found.
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • Iterator (java.util)
    An iterator over a sequence of objects, such as a collection.If a collection has been changed since
  • Timer (java.util)
    Timers schedule one-shot or recurring TimerTask for execution. Prefer java.util.concurrent.Scheduled
  • HttpServletRequest (javax.servlet.http)
    Extends the javax.servlet.ServletRequest interface to provide request information for HTTP servlets.

For IntelliJ IDEA,
Android Studio or Eclipse

  • Search for JavaScript code betaCodota IntelliJ IDEA pluginCodota Android Studio pluginCode IndexSign in
  • EnterpriseFAQAboutBlogContact Us
  • Plugin user guideTerms of usePrivacy policyCodeboxFind Usages
Add Codota to your IDE (free)