fi.hut.tml.xsmiles.ecma.rhino
Class RhinoScripter

java.lang.Object
  extended byfi.hut.tml.xsmiles.ecma.Scripter
      extended byfi.hut.tml.xsmiles.ecma.rhino.RhinoScripter
All Implemented Interfaces:
org.mozilla.javascript.ClassShutter, ECMAScripter

public class RhinoScripter
extends Scripter
implements ECMAScripter, org.mozilla.javascript.ClassShutter


Field Summary
static int count
           
protected  XSecurityController securityController
           
protected  XSmilesWrapFactory wrapFactory
           
 
Fields inherited from class fi.hut.tml.xsmiles.ecma.Scripter
browser, browserObject, ecmabroker, initialized, navigatorObject, windowObject
 
Constructor Summary
RhinoScripter()
           
RhinoScripter(BrowserWindow browser)
          Constructor
 
Method Summary
 void createBasicObjects()
           
 java.lang.Class defineClass(java.lang.String name, byte[] data, java.lang.Object securityDomain)
           
 void deleteExposedObject(java.lang.String name, java.lang.Object theObject)
          Remove a previously exposed object
 void eval(java.lang.String scriptText)
           
 void exposeToScriptEngine(java.lang.String name, java.lang.Object theObject)
          Expose a java object to javascript as javascript object
 java.lang.Class[] getClassContext()
           
 org.mozilla.javascript.Scriptable getScope()
           
 java.lang.Object getSecurityDomain(java.lang.Class cl)
           
 void initialize(org.w3c.dom.Document doc)
          Resets the ECMAScript interpreter.
 boolean visibleToScripts(java.lang.String fullClassName)
           
 
Methods inherited from class fi.hut.tml.xsmiles.ecma.Scripter
destroy, getESEventBroker, isInitialized, setBrowserWindow, setDocument
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface fi.hut.tml.xsmiles.ecma.ECMAScripter
destroy, getESEventBroker, isInitialized, setBrowserWindow
 

Field Detail

securityController

protected XSecurityController securityController

wrapFactory

protected XSmilesWrapFactory wrapFactory

count

public static int count
Constructor Detail

RhinoScripter

public RhinoScripter(BrowserWindow browser)
Constructor

Parameters:
browser - The Browser object

RhinoScripter

public RhinoScripter()
Method Detail

initialize

public void initialize(org.w3c.dom.Document doc)
Resets the ECMAScript interpreter. The funtion is called from the class XMLDocument. It creates a new DOMHandler instance, which is not yet given a document. It also creates a new ecma interpreter

Specified by:
initialize in interface ECMAScripter
Overrides:
initialize in class Scripter

createBasicObjects

public void createBasicObjects()
Overrides:
createBasicObjects in class Scripter

exposeToScriptEngine

public void exposeToScriptEngine(java.lang.String name,
                                 java.lang.Object theObject)
Description copied from interface: ECMAScripter
Expose a java object to javascript as javascript object

Specified by:
exposeToScriptEngine in interface ECMAScripter
Overrides:
exposeToScriptEngine in class Scripter

deleteExposedObject

public void deleteExposedObject(java.lang.String name,
                                java.lang.Object theObject)
Description copied from interface: ECMAScripter
Remove a previously exposed object

Specified by:
deleteExposedObject in interface ECMAScripter
Overrides:
deleteExposedObject in class Scripter

getScope

public org.mozilla.javascript.Scriptable getScope()

eval

public void eval(java.lang.String scriptText)
Specified by:
eval in interface ECMAScripter
Overrides:
eval in class Scripter

defineClass

public java.lang.Class defineClass(java.lang.String name,
                                   byte[] data,
                                   java.lang.Object securityDomain)

getClassContext

public java.lang.Class[] getClassContext()

getSecurityDomain

public java.lang.Object getSecurityDomain(java.lang.Class cl)

visibleToScripts

public boolean visibleToScripts(java.lang.String fullClassName)
Specified by:
visibleToScripts in interface org.mozilla.javascript.ClassShutter


X-Smiles 1.2