com.caucho.quercus.script
Class QuercusScriptEngine

java.lang.Object
  extended by javax.script.AbstractScriptEngine
      extended by com.caucho.quercus.script.QuercusScriptEngine
All Implemented Interfaces:
javax.script.Compilable, javax.script.ScriptEngine

public class QuercusScriptEngine
extends javax.script.AbstractScriptEngine
implements javax.script.Compilable

Script engine


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
QuercusScriptEngine(QuercusScriptEngineFactory factory, QuercusContext quercus)
           
 
Method Summary
 javax.script.CompiledScript compile(java.io.Reader script)
          compiles based on a reader.
 javax.script.CompiledScript compile(java.lang.String script)
          evaluates based on a script.
 javax.script.Bindings createBindings()
          Creates a bindings.
 java.lang.Object eval(java.io.Reader script, javax.script.ScriptContext cxt)
          evaluates based on a reader.
 java.lang.Object eval(java.lang.String script, javax.script.ScriptContext cxt)
          evaluates based on a script.
 QuercusScriptEngineFactory getFactory()
          Returns the engine's factory.
 QuercusContext getQuercus()
          Returns the Quercus object.
 java.lang.String toString()
           
 
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, wait, wait, wait
 

Constructor Detail

QuercusScriptEngine

public QuercusScriptEngine(QuercusScriptEngineFactory factory,
                           QuercusContext quercus)
Method Detail

getQuercus

public QuercusContext getQuercus()
Returns the Quercus object. php/214h


eval

public java.lang.Object eval(java.io.Reader script,
                             javax.script.ScriptContext cxt)
                      throws javax.script.ScriptException
evaluates based on a reader.

Specified by:
eval in interface javax.script.ScriptEngine
Throws:
javax.script.ScriptException

eval

public java.lang.Object eval(java.lang.String script,
                             javax.script.ScriptContext cxt)
                      throws javax.script.ScriptException
evaluates based on a script.

Specified by:
eval in interface javax.script.ScriptEngine
Throws:
javax.script.ScriptException

compile

public javax.script.CompiledScript compile(java.io.Reader script)
                                    throws javax.script.ScriptException
compiles based on a reader.

Specified by:
compile in interface javax.script.Compilable
Throws:
javax.script.ScriptException

compile

public javax.script.CompiledScript compile(java.lang.String script)
                                    throws javax.script.ScriptException
evaluates based on a script.

Specified by:
compile in interface javax.script.Compilable
Throws:
javax.script.ScriptException

getFactory

public QuercusScriptEngineFactory getFactory()
Returns the engine's factory.

Specified by:
getFactory in interface javax.script.ScriptEngine

createBindings

public javax.script.Bindings createBindings()
Creates a bindings.

Specified by:
createBindings in interface javax.script.ScriptEngine

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object