org.sapia.cocoon.ruby
Class CocoonJRubyScriptEngine

java.lang.Object
  extended by javax.script.AbstractScriptEngine
      extended by org.sapia.cocoon.ruby.CocoonJRubyScriptEngine
All Implemented Interfaces:
javax.script.ScriptEngine

public class CocoonJRubyScriptEngine
extends javax.script.AbstractScriptEngine


Field Summary
 
Fields inherited from class javax.script.AbstractScriptEngine
context
 
Fields inherited from interface javax.script.ScriptEngine
ARGV, ENGINE, ENGINE_VERSION, FILENAME, LANGUAGE, LANGUAGE_VERSION, NAME
 
Constructor Summary
CocoonJRubyScriptEngine(javax.script.ScriptEngineFactory factory, org.jruby.Ruby runtime)
           
 
Method Summary
 javax.script.CompiledScript compile(java.io.Reader reader)
           
 javax.script.CompiledScript compile(java.lang.String script)
           
 javax.script.Bindings createBindings()
           
 java.lang.Object eval(java.io.Reader reader, javax.script.ScriptContext ctx)
           
 java.lang.Object eval(java.lang.String str, javax.script.ScriptContext ctx)
           
 javax.script.ScriptEngineFactory getFactory()
           
<T> T
getInterface(java.lang.Class<T> clazz)
           
<T> T
getInterface(java.lang.Object obj, java.lang.Class<T> clazz)
           
 java.lang.Object invokeFunction(java.lang.String name, java.lang.Object... args)
           
 java.lang.Object invokeMethod(java.lang.Object obj, java.lang.String name, java.lang.Object... args)
           
 
Methods inherited from class javax.script.AbstractScriptEngine
eval, eval, eval, eval, get, getBindings, getContext, getScriptContext, put, setBindings, setContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CocoonJRubyScriptEngine

public CocoonJRubyScriptEngine(javax.script.ScriptEngineFactory factory,
                               org.jruby.Ruby runtime)
Method Detail

compile

public javax.script.CompiledScript compile(java.lang.String script)
                                    throws javax.script.ScriptException
Throws:
javax.script.ScriptException

compile

public javax.script.CompiledScript compile(java.io.Reader reader)
                                    throws javax.script.ScriptException
Throws:
javax.script.ScriptException

invokeFunction

public java.lang.Object invokeFunction(java.lang.String name,
                                       java.lang.Object... args)
                                throws javax.script.ScriptException,
                                       java.lang.NoSuchMethodException
Throws:
javax.script.ScriptException
java.lang.NoSuchMethodException

invokeMethod

public java.lang.Object invokeMethod(java.lang.Object obj,
                                     java.lang.String name,
                                     java.lang.Object... args)
                              throws javax.script.ScriptException,
                                     java.lang.NoSuchMethodException
Throws:
javax.script.ScriptException
java.lang.NoSuchMethodException

getInterface

public <T> T getInterface(java.lang.Object obj,
                          java.lang.Class<T> clazz)

getInterface

public <T> T getInterface(java.lang.Class<T> clazz)

eval

public java.lang.Object eval(java.lang.String str,
                             javax.script.ScriptContext ctx)
                      throws javax.script.ScriptException
Throws:
javax.script.ScriptException

eval

public java.lang.Object eval(java.io.Reader reader,
                             javax.script.ScriptContext ctx)
                      throws javax.script.ScriptException
Throws:
javax.script.ScriptException

getFactory

public javax.script.ScriptEngineFactory getFactory()

createBindings

public javax.script.Bindings createBindings()


Copyright © 2008. All Rights Reserved.