org.mozilla.javascript
public class ImporterTopLevel extends IdScriptableObject
This class can be used to create a top-level scope using the following code:
Scriptable scope = new ImporterTopLevel(cx);Then JavaScript code will have access to the following methods:
js> importClass(java.io.File) js> f = new File('help.txt') help.txt js> importPackage(java.util) js> v = new Vector() []
Constructor Summary | |
---|---|
ImporterTopLevel() | |
ImporterTopLevel(Context cx) | |
ImporterTopLevel(Context cx, boolean sealed) |
Method Summary | |
---|---|
Object | execIdCall(IdFunctionObject f, Context cx, Scriptable scope, Scriptable thisObj, Object[] args) |
protected int | findPrototypeId(String s) |
Object | get(String name, Scriptable start) |
String | getClassName() |
boolean | has(String name, Scriptable start) |
void | importPackage(Context cx, Scriptable thisObj, Object[] args, Function funObj) |
static void | init(Context cx, Scriptable scope, boolean sealed) |
protected void | initPrototypeId(int id) |
void | initStandardObjects(Context cx, boolean sealed) |
Deprecated: Kept only for compatibility.