|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecthelma.scripting.rhino.RhinoCore
public final class RhinoCore
This is the implementation of ScriptingEnvironment for the Mozilla Rhino EcmaScript interpreter.
Field Summary | |
---|---|
Application |
app
|
Constructor Summary | |
---|---|
RhinoCore(Application app)
Create a Rhino evaluator for the given application and request evaluator. |
Method Summary | |
---|---|
Application |
getApplication()
Return the application we're running in |
static RhinoCore |
getCore()
Get the RhinoCore instance associated with the current thread, or null |
org.mozilla.javascript.Scriptable |
getElementWrapper(java.lang.Object e)
Get a Script wrapper for any given object. |
org.mozilla.javascript.Scriptable |
getNodeWrapper(INode n)
Get a script wrapper for an instance of helma.objectmodel.INode |
org.mozilla.javascript.Scriptable |
getPrototype(java.lang.String protoName)
Get the object prototype for a prototype name and initialize/update it if necessary. |
java.util.Map |
getPrototypeProperties(java.lang.String protoName)
Get an array containing the property ids of all properties that were compiled from scripts for the given prototype. |
org.mozilla.javascript.Scriptable |
getScope()
Return the global scope of this RhinoCore. |
org.mozilla.javascript.Scriptable |
getValidPrototype(java.lang.String protoName)
A version of getPrototype() that retrieves a prototype and checks if it is valid, i.e. there were no errors when compiling it. |
boolean |
hasFunction(java.lang.String protoname,
java.lang.String fname)
Check if an object has a function property (public method if it is a java object) with that name. |
protected void |
initialize()
Initialize the evaluator, making sure the minimum type information necessary to bootstrap the rest is parsed. |
void |
injectCodeResource(java.lang.String typename,
Resource code)
Add a code resource to a given prototype by immediately compiling and evaluating it. |
protected java.lang.String |
postProcessHref(java.lang.Object obj,
java.lang.String protoName,
java.lang.String href)
|
java.lang.Object |
processXmlRpcArgument(java.lang.Object arg)
Convert an input argument from Java to the scripting runtime representation. |
java.lang.Object |
processXmlRpcResponse(java.lang.Object arg)
convert a JavaScript Object object to a generic Java object stucture. |
void |
shutdown()
|
protected static java.lang.Object[] |
unwrapSkinpath(java.lang.Object[] skinpath)
|
void |
updatePrototypes()
This method is called before an execution context is entered to let the engine know it should update its prototype information. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public final Application app
Constructor Detail |
---|
public RhinoCore(Application app)
Method Detail |
---|
protected void initialize()
public void shutdown()
public void updatePrototypes() throws java.io.IOException
java.io.IOException
public org.mozilla.javascript.Scriptable getValidPrototype(java.lang.String protoName)
public org.mozilla.javascript.Scriptable getPrototype(java.lang.String protoName)
public java.util.Map getPrototypeProperties(java.lang.String protoName)
protoName
- the name of the prototype
public boolean hasFunction(java.lang.String protoname, java.lang.String fname)
public java.lang.Object processXmlRpcArgument(java.lang.Object arg)
public java.lang.Object processXmlRpcResponse(java.lang.Object arg)
public Application getApplication()
public org.mozilla.javascript.Scriptable getElementWrapper(java.lang.Object e)
public org.mozilla.javascript.Scriptable getNodeWrapper(INode n)
protected java.lang.String postProcessHref(java.lang.Object obj, java.lang.String protoName, java.lang.String href) throws java.io.UnsupportedEncodingException, java.io.IOException
java.io.UnsupportedEncodingException
java.io.IOException
public static RhinoCore getCore()
protected static java.lang.Object[] unwrapSkinpath(java.lang.Object[] skinpath)
public void injectCodeResource(java.lang.String typename, Resource code)
typename
- the type this resource belongs tocode
- a code resourcepublic org.mozilla.javascript.Scriptable getScope()
getScope
in interface org.mozilla.javascript.tools.debugger.ScopeProvider
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |