com.poolik.rhino
Class RhinoContext
java.lang.Object
com.poolik.rhino.RhinoContext
public class RhinoContext
- extends Object
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RhinoContext
public RhinoContext()
RhinoContext
public RhinoContext(org.mozilla.javascript.Scriptable sharedScope)
runAsync
public void runAsync(RhinoRunnable runnable)
evalJS
public Object evalJS(String js)
createClassInJS
public <T extends org.mozilla.javascript.ScriptableObject> T createClassInJS(Class<T> classToExport)
setProperty
public void setProperty(String objectToReceiveProperty,
String property,
Object value)
load
public void load(String path,
String... jsFiles)
load
public void load(String fileName)
loadFromClasspath
public void loadFromClasspath(String resource)
- Loads a resource from the classpath.
- Parameters:
resource - the resource to resolve from the classpath
executeFunction
public Object executeFunction(org.mozilla.javascript.ScriptableObject object,
String fnName,
Object[] arguments)
executeFunction
public Object executeFunction(org.mozilla.javascript.ScriptableObject object,
String fnName)
getJsContext
public org.mozilla.javascript.Context getJsContext()
getJsScope
public org.mozilla.javascript.Scriptable getJsScope()
loadEnv
public void loadEnv(String jsDir)
exit
public void exit()
Copyright © 2013. All Rights Reserved.