|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjep.JepScriptEngine
public class JepScriptEngine
JepScriptEngine.java - implements javax.script.ScriptEngine Copyright (c) 2004, 2005 Mike Johnson. This file is licenced under the the zlib/libpng License. This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. Created: Tue Sep 5 18:35:03 2006
Field Summary |
---|
Fields inherited from interface javax.script.ScriptEngine |
---|
ARGV, ENGINE, ENGINE_VERSION, FILENAME, LANGUAGE, LANGUAGE_VERSION, NAME |
Constructor Summary | |
---|---|
JepScriptEngine()
Make a new JepScriptEngine |
Method Summary | |
---|---|
void |
close()
You *must* close this |
javax.script.Bindings |
createBindings()
Describe createBindings method here. |
java.lang.Object |
eval(java.io.Reader reader)
Run script from reader. |
java.lang.Object |
eval(java.io.Reader reader,
javax.script.Bindings bindings)
Note: always returns null due to Python limitations. |
java.lang.Object |
eval(java.io.Reader reader,
javax.script.ScriptContext context)
Note: always returns null due to Python limitations. |
java.lang.Object |
eval(java.lang.String line)
Note: always returns null due to Python limitations. |
java.lang.Object |
eval(java.lang.String line,
javax.script.Bindings b)
Describe eval method here. |
java.lang.Object |
eval(java.lang.String line,
javax.script.ScriptContext context)
Describe eval method here. |
java.lang.Object |
get(java.lang.String name)
Describe get method here. |
javax.script.Bindings |
getBindings(int scope)
Describe getBindings method here. |
javax.script.ScriptContext |
getContext()
Describe getContext method here. |
javax.script.ScriptEngineFactory |
getFactory()
Describe getFactory method here. |
void |
put(java.lang.String name,
java.lang.Object val)
Describe put method here. |
void |
setBindings(javax.script.Bindings bindings,
int scope)
Describe setBindings method here. |
void |
setContext(javax.script.ScriptContext c)
Describe setContext method here. |
protected void |
setFactory(javax.script.ScriptEngineFactory fact)
For internal use. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JepScriptEngine() throws javax.script.ScriptException
javax.script.ScriptException
Method Detail |
---|
public javax.script.Bindings createBindings()
createBindings
method here.
createBindings
in interface javax.script.ScriptEngine
Bindings
valueScriptEngine.createBindings()
public java.lang.Object eval(java.io.Reader reader) throws javax.script.ScriptException
Run script from reader. Performance of this method will suck compared to using Jep.runScript(). Use the compiled interface or something.
eval
in interface javax.script.ScriptEngine
reader
- a Reader
value
Object
value
javax.script.ScriptException
- if an error occurspublic java.lang.Object eval(java.io.Reader reader, javax.script.ScriptContext context) throws javax.script.ScriptException
eval
in interface javax.script.ScriptEngine
reader
- a Reader
valuecontext
- a ScriptContext
value
Object
value
javax.script.ScriptException
ScriptEngine.eval(java.io.Reader, javax.script.ScriptContext)
public java.lang.Object eval(java.io.Reader reader, javax.script.Bindings bindings) throws javax.script.ScriptException
eval
in interface javax.script.ScriptEngine
reader
- a Reader
valuebindings
- a Bindings
value
Object
value
javax.script.ScriptException
ScriptEngine.eval(java.io.Reader, javax.script.Bindings)
public java.lang.Object eval(java.lang.String line) throws javax.script.ScriptException
eval
in interface javax.script.ScriptEngine
line
- a String
value
Object
value
javax.script.ScriptException
ScriptEngine.eval(java.lang.String)
public java.lang.Object eval(java.lang.String line, javax.script.ScriptContext context) throws javax.script.ScriptException
eval
method here.
eval
in interface javax.script.ScriptEngine
line
- a String
valuecontext
- a ScriptContext
value
Object
value
javax.script.ScriptException
- if an error occurspublic java.lang.Object eval(java.lang.String line, javax.script.Bindings b) throws javax.script.ScriptException
eval
method here.
eval
in interface javax.script.ScriptEngine
line
- a String
valueb
- a Bindings
value
Object
value
javax.script.ScriptException
- if an error occurspublic javax.script.ScriptEngineFactory getFactory()
getFactory
method here.
getFactory
in interface javax.script.ScriptEngine
ScriptEngineFactory
valueprotected void setFactory(javax.script.ScriptEngineFactory fact)
fact
- a ScriptEngineFactory
valuepublic java.lang.Object get(java.lang.String name)
get
method here.
get
in interface javax.script.ScriptEngine
name
- a String
value
Object
valuepublic void put(java.lang.String name, java.lang.Object val) throws java.lang.IllegalArgumentException
put
method here.
put
in interface javax.script.ScriptEngine
name
- a String
valueval
- an Object
value
java.lang.IllegalArgumentException
- if an error occurspublic javax.script.Bindings getBindings(int scope)
getBindings
method here.
getBindings
in interface javax.script.ScriptEngine
scope
- an int
value
Bindings
valuepublic void setBindings(javax.script.Bindings bindings, int scope)
setBindings
method here.
setBindings
in interface javax.script.ScriptEngine
bindings
- a Bindings
valuescope
- an int
valuepublic javax.script.ScriptContext getContext()
getContext
method here.
getContext
in interface javax.script.ScriptEngine
ScriptContext
valuepublic void setContext(javax.script.ScriptContext c)
setContext
method here.
setContext
in interface javax.script.ScriptEngine
c
- a ScriptContext
valuepublic void close()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |