|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.zkoss.zk.scripting.util.GenericInterpreter org.zkoss.zk.scripting.jython.JythonInterpreter
public class JythonInterpreter
The Python interpreter based on jython.
Ludovic Drolez implemented the first Jython interpreter for ZK on May 2007: http://zkforge.svn.sourceforge.net/viewvc/zkforge/trunk/scripting/jython/src/org/zkforge/scripting/jython/
Inspired by Drolez's job, Grace Lin wrote this class on March 2008
Field Summary |
---|
Fields inherited from class org.zkoss.zk.scripting.util.GenericInterpreter |
---|
UNDEFINED |
Constructor Summary | |
---|---|
JythonInterpreter()
|
Method Summary | |
---|---|
void |
destroy()
Reset the owner ( GenericInterpreter.getOwner() ) to null. |
protected void |
exec(java.lang.String script)
Executes the specified script. |
protected java.lang.Object |
get(java.lang.String name)
Gets the variable from the interpreter. |
java.lang.Object |
getNativeInterpreter()
Returns the native interpreter, or null if not available. |
void |
init(Page owner,
java.lang.String zslang)
Initializes the interpreter. |
protected void |
set(java.lang.String name,
java.lang.Object value)
Sets the variable to the interpreter. |
protected void |
unset(java.lang.String name)
Removes the variable from the interpreter. |
Methods inherited from class org.zkoss.zk.scripting.util.GenericInterpreter |
---|
afterExec, afterInterpret, beforeExec, beforeInterpret, contains, contains, containsVariable, containsVariable, get, getClass, getCurrent, getFromNamespace, getFromNamespace, getFunction, getFunction, getImplicit, getLanguage, getOwner, getVariable, getVariable, interpret, set, setVariable, setVariable, unset, unsetVariable, unsetVariable |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JythonInterpreter()
Method Detail |
---|
public void init(Page owner, java.lang.String zslang)
Interpreter
init
in interface Interpreter
init
in class GenericInterpreter
zslang
- the language this interpreter is associated withprotected void exec(java.lang.String script)
GenericInterpreter
GenericInterpreter.interpret(java.lang.String, org.zkoss.zk.ui.ext.Scope)
.
exec
in class GenericInterpreter
public void destroy()
GenericInterpreter
GenericInterpreter.getOwner()
) to null.
destroy
in interface Interpreter
destroy
in class GenericInterpreter
protected java.lang.Object get(java.lang.String name)
GenericInterpreter
GenericInterpreter.beforeExec()
is called first, before this method is invoked.
An empty (and fake) scope is pushed so GenericInterpreter.getFromNamespace(java.lang.String)
always returns null.
get
in class GenericInterpreter
protected void set(java.lang.String name, java.lang.Object value)
GenericInterpreter
GenericInterpreter.beforeExec()
is called first, before this method is invoked.
set
in class GenericInterpreter
protected void unset(java.lang.String name)
GenericInterpreter
GenericInterpreter.beforeExec()
is called first, before this method is invoked.
unset
in class GenericInterpreter
public java.lang.Object getNativeInterpreter()
Interpreter
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |