Google

: Interface JSGlobalObject

FESI.jslib
Interface JSGlobalObject


public abstract interface JSGlobalObject
extends JSObject

Interface used to represent the GlobalObject wrapper of the interpreter. The global object is used for functions which require the evaluator. It is possible to get it from any JSObject.

This interface is exported by FESI objects, it is not intended or useful for user objects to extend this interface.


Method Summary
 java.lang.Object makeBeanWrapper(java.lang.Object object)
          Mark an object as a bean, restricting its access by FESI scripts to the public bean methods and properties.
 JSObject makeJSArrayObject()
          Make a new array object.
 JSObject makeJSObject()
          Make a new object based the object prototype object.
 JSObject makeJSObject(JSObject prototype)
          Make a new object based on a given prototype (which may be null).
 JSObject makeObjectWrapper(java.lang.Object object)
          Package any object as an EcmaScript object, allowing to use it for example with an "eval" function, where it becomes the 'this' object.
 
Methods inherited from interface FESI.jslib.JSObject
call, eval, eval, evalAsFunction, evalAsFunction, getGlobalObject, getMember, getSlot, removeMember, setMember, setSlot
 

Method Detail

makeBeanWrapper


public java.lang.Object makeBeanWrapper(java.lang.Object object)
Mark an object as a bean, restricting its access by FESI scripts to the public bean methods and properties.
Parameters:
object - The object to wrap as a bean.

makeJSObject


public JSObject makeJSObject()
Make a new object based the object prototype object. The object is of class Object and has initially no property.
Returns:
A new object

makeJSObject


public JSObject makeJSObject(JSObject prototype)
Make a new object based on a given prototype (which may be null). The object is of class Object and has initially no property.
Parameters:
prototype - An object to use as prototype for this object
Returns:
A new object

makeObjectWrapper


public JSObject makeObjectWrapper(java.lang.Object object)
Package any object as an EcmaScript object, allowing to use it for example with an "eval" function, where it becomes the 'this' object.
Parameters:
object - The object to wrap.

makeJSArrayObject


public JSObject makeJSArrayObject()
Make a new array object. The object is of class Array and is empty (length 0).
Returns:
A new object