|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.zkoss.zk.scripting.Interpreters
public class Interpreters
The utilities to access interpreters (Interpreter
).
Application developers and deployers rarely need to access this class directly. Rather, they can declare the interpreter class in either zk/config.xml or WEB-INF/zk.xml.
Method Summary | |
---|---|
static java.lang.String |
add(Element config)
Adds an interpreter based on the XML declaration. |
static java.lang.String |
add(java.lang.String zslang,
java.lang.String ipcls)
Adds an interpreter class. |
static boolean |
exists(java.lang.String zslang)
Tests whether the interpreter for the specified language name exists. |
static java.util.Set<java.lang.String> |
getZScriptLanguages()
Returns a set of names of the scripting languages supported by this installation. |
static boolean |
isLegalName(char cc)
Tests whether a character is legal to be used as part of the scripting language name. |
static Interpreter |
newInterpreter(java.lang.String zslang,
Page owner)
Returns the interpreter for the specified language name. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static final Interpreter newInterpreter(java.lang.String zslang, Page owner)
zslang
- the name of the scripting language, say, Java.
InterpreterNotFoundException
- if not found.public static final boolean exists(java.lang.String zslang)
zslang
- the name of the scripting language, say, Java.public static final java.util.Set<java.lang.String> getZScriptLanguages()
public static final java.lang.String add(java.lang.String zslang, java.lang.String ipcls)
zslang
- the name of the scripting language, say, Java.
It is case insensitive.ipcls
- the class name of interpreter (Interpreter
).
public static boolean isLegalName(char cc)
public static final java.lang.String add(Element config)
<zscript-config>
<language-name>SuperJava</language-name><!-- case insensitive --!>
<interpreter-class>my.MySuperJavaInterpreter</interpreter-class>
</zscript-config>
config
- the XML element called zscript-config
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |