org.mozilla.javascript
Class NativeGlobal
java.lang.Object
|
+--org.mozilla.javascript.NativeGlobal
- All Implemented Interfaces:
- IdFunctionMaster
- public class NativeGlobal
- extends java.lang.Object
- implements IdFunctionMaster
This class implements the global native object (function and value
properties only).
See ECMA 15.1.[12].
- Author:
- Mike Shaver
Method Summary |
static EcmaError |
constructError(Context cx,
java.lang.String error,
java.lang.String message,
java.lang.Object scope)
The NativeError functions
See ECMA 15.11.6 |
static EcmaError |
constructError(Context cx,
java.lang.String error,
java.lang.String message,
java.lang.Object scope,
java.lang.String sourceName,
int lineNumber,
int columnNumber,
java.lang.String lineSource)
The NativeError functions
See ECMA 15.11.6 |
static java.lang.Object |
evalSpecial(Context cx,
Scriptable scope,
java.lang.Object thisArg,
java.lang.Object[] args,
java.lang.String filename,
int lineNumber)
The eval function property of the global object.
|
java.lang.Object |
execMethod(int methodId,
IdFunction function,
Context cx,
Scriptable scope,
Scriptable thisObj,
java.lang.Object[] args)
'thisObj' will be null if invoked as constructor, in which case
instance of Scriptable should be returned |
static void |
init(Context cx,
Scriptable scope,
boolean sealed)
|
int |
methodArity(int methodId)
Get arity or defined argument count for method with given id.
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NativeGlobal
public NativeGlobal()
init
public static void init(Context cx,
Scriptable scope,
boolean sealed)
execMethod
public java.lang.Object execMethod(int methodId,
IdFunction function,
Context cx,
Scriptable scope,
Scriptable thisObj,
java.lang.Object[] args)
throws JavaScriptException
- Description copied from interface:
IdFunctionMaster
- 'thisObj' will be null if invoked as constructor, in which case
instance of Scriptable should be returned
- Specified by:
execMethod
in interface IdFunctionMaster
methodArity
public int methodArity(int methodId)
- Description copied from interface:
IdFunctionMaster
- Get arity or defined argument count for method with given id.
Should return -1 if methodId is not known or can not be used
with execMethod call
- Specified by:
methodArity
in interface IdFunctionMaster
evalSpecial
public static java.lang.Object evalSpecial(Context cx,
Scriptable scope,
java.lang.Object thisArg,
java.lang.Object[] args,
java.lang.String filename,
int lineNumber)
throws JavaScriptException
- The eval function property of the global object.
See ECMA 15.1.2.1
constructError
public static EcmaError constructError(Context cx,
java.lang.String error,
java.lang.String message,
java.lang.Object scope)
- The NativeError functions
See ECMA 15.11.6
constructError
public static EcmaError constructError(Context cx,
java.lang.String error,
java.lang.String message,
java.lang.Object scope,
java.lang.String sourceName,
int lineNumber,
int columnNumber,
java.lang.String lineSource)
- The NativeError functions
See ECMA 15.11.6