XFA4J

com.adobe.xfa.scripthandler.rhino
Class RhinoEngine

java.lang.Object
  extended by com.adobe.xfa.scripthandler.rhino.RhinoEngine

public abstract class RhinoEngine
extends java.lang.Object

A class to access instances of the Rhino JavaScript engine.


Method Summary
static void destroy()
          Destroys the Rhino engine.
static org.mozilla.javascript.Context getThreadLocalRuntimeContext()
          Creates a Javascript Context which is thread local.
static org.mozilla.javascript.Scriptable getTopLevelScope()
          Gets this engine's top level scope.
static void setTopLevelScope(org.mozilla.javascript.ScriptableObject scriptableObject)
          Sets the top level scope from the given global object.
protected static void throwException(java.lang.String sError)
          Throws a runtime RhinoException of the given error.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getThreadLocalRuntimeContext

public static org.mozilla.javascript.Context getThreadLocalRuntimeContext()
Creates a Javascript Context which is thread local. It also:


destroy

public static void destroy()
Destroys the Rhino engine.


getTopLevelScope

public static org.mozilla.javascript.Scriptable getTopLevelScope()
Gets this engine's top level scope.

Returns:
the Rhino engine's top level scope object.

setTopLevelScope

public static void setTopLevelScope(org.mozilla.javascript.ScriptableObject scriptableObject)
Sets the top level scope from the given global object.

Parameters:
scriptableObject - a scriptable object. This object is registered as a global object, with all other JavaScript global objects.

throwException

protected static void throwException(java.lang.String sError)
Throws a runtime RhinoException of the given error.

Parameters:
sError - an error message.
Throws:
org.mozilla.javascript.EvaluatorException - with the given error message.

XFA4J

© 2005 Adobe Systems Incorporated. All Rights Reserved.