Class RhinoEngine
- java.lang.Object
-
- com.adobe.xfa.scripthandler.rhino.RhinoEngine
-
public abstract class RhinoEngine extends java.lang.Object
A class to access instances of the Rhino JavaScript engine.
-
-
Constructor Summary
Constructors Constructor Description RhinoEngine()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
destroy()
Destroys the Rhino engine.static Context
getThreadLocalRuntimeContext()
Creates a Javascript Context which is thread local.static Scriptable
getTopLevelScope()
Gets this engine's top level scope.static void
setTopLevelScope(ScriptableObject scriptableObject)
Sets the top level scope from the given global object.
-
-
-
Method Detail
-
getThreadLocalRuntimeContext
public static Context getThreadLocalRuntimeContext()
Creates a Javascript Context which is thread local. It also:- disables Rhino's LiveConnect feature,
- sets the desired JavaScript language.
-
destroy
public static void destroy()
Destroys the Rhino engine.
-
getTopLevelScope
public static Scriptable getTopLevelScope()
Gets this engine's top level scope.- Returns:
- the Rhino engine's top level scope object.
-
setTopLevelScope
public static void setTopLevelScope(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.
-
-