public class Interpreters
extends java.lang.Object
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.
| Modifier and Type | Method and Description |
|---|---|
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.
|
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 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-configpublic static boolean isLegalName(char cc)
Copyright © 2005-2022 Potix Corporation. All Rights Reserved.