|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.mozilla.javascript.commonjs.module.provider.MultiModuleScriptProvider
public class MultiModuleScriptProvider
A multiplexer for module script providers.
Constructor Summary | |
---|---|
MultiModuleScriptProvider(java.lang.Iterable<? extends ModuleScriptProvider> providers)
Creates a new multiplexing module script provider tht gathers the specified providers |
Method Summary | |
---|---|
ModuleScript |
getModuleScript(Context cx,
java.lang.String moduleId,
java.net.URI uri,
Scriptable paths)
Returns a module script. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MultiModuleScriptProvider(java.lang.Iterable<? extends ModuleScriptProvider> providers)
providers
- the providers to multiplex.Method Detail |
---|
public ModuleScript getModuleScript(Context cx, java.lang.String moduleId, java.net.URI uri, Scriptable paths) throws java.lang.Exception
ModuleScriptProvider
getModuleScript
in interface ModuleScriptProvider
cx
- current context. Can be used to compile module scripts.moduleId
- the ID of the module. An implementation must only accept
an absolute ID, starting with a term.uri
- the URI of the module. If this is not null, resolution
of moduleId
is bypassed and the script is directly loaded
from moduleUri
paths
- the value of the require() function's "paths" attribute. If
the require() function is sandboxed, it will be null, otherwise it will
be a JavaScript Array object. It is up to the provider implementation
whether and how it wants to honor the contents of the array.
java.lang.Exception
- if there was an unrecoverable problem obtaining the
script
java.lang.IllegalArgumentException
- if the module ID is syntactically not a
valid absolute module identifier.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |