Xj3D 2.0 VRML/X3D Code API

org.web3d.vrml.scripting.ecmascript
Class Global

java.lang.Object
  extended by org.mozilla.javascript.ScriptableObject
      extended by org.web3d.vrml.scripting.ecmascript.Global
All Implemented Interfaces:
java.io.Serializable, org.mozilla.javascript.debug.DebuggableObject, org.mozilla.javascript.Scriptable

public class Global
extends org.mozilla.javascript.ScriptableObject

The global object for ECMAScript. Used to implement the print function.

Author:
Alan Hudson
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.mozilla.javascript.ScriptableObject
DONTENUM, EMPTY, parent, PERMANENT, prototype, READONLY
 
Fields inherited from interface org.mozilla.javascript.Scriptable
NOT_FOUND
 
Constructor Summary
Global()
           
 
Method Summary
 java.lang.String getClassName()
          Return name of this class, the global object.
static void print(org.mozilla.javascript.Context cx, org.mozilla.javascript.Scriptable thisObj, java.lang.Object[] args, org.mozilla.javascript.Function funObj)
          Print the string values of its arguments.
 void setErrorReporter(ErrorReporter reporter)
          Register an error reporter with the engine so that any errors generated by the script code can be reported in a nice, pretty fashion.
 
Methods inherited from class org.mozilla.javascript.ScriptableObject
callMethod, defineClass, defineClass, defineFunctionProperties, defineProperty, defineProperty, defineProperty, defineProperty, delete, delete, deleteProperty, deleteProperty, get, get, getAllIds, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getFunctionPrototype, getIds, getObjectPrototype, getParentScope, getProperty, getProperty, getPropertyIds, getPrototype, getTopLevelScope, has, has, hasInstance, hasProperty, hasProperty, isSealed, put, put, putProperty, putProperty, sealObject, setAttributes, setAttributes, setParentScope, setPrototype
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Global

public Global()
Method Detail

getClassName

public java.lang.String getClassName()
Return name of this class, the global object. This method must be implemented in all concrete classes extending ScriptableObject.

Specified by:
getClassName in interface org.mozilla.javascript.Scriptable
Specified by:
getClassName in class org.mozilla.javascript.ScriptableObject
See Also:
Scriptable.getClassName()

print

public static void print(org.mozilla.javascript.Context cx,
                         org.mozilla.javascript.Scriptable thisObj,
                         java.lang.Object[] args,
                         org.mozilla.javascript.Function funObj)
Print the string values of its arguments. This method is defined as a JavaScript function. Note that its arguments are of the "varargs" form, which allows it to handle an arbitrary number of arguments supplied to the JavaScript function.


setErrorReporter

public void setErrorReporter(ErrorReporter reporter)
Register an error reporter with the engine so that any errors generated by the script code can be reported in a nice, pretty fashion. Setting a value of null will clear the currently set reporter. If one is already set, the new value replaces the old.

Parameters:
reporter - The instance to use or null

Xj3D 2.0 VRML/X3D Code API

Copyright © 2001 - 2006 Web3D Consortium