websphinx.workbench
Class Netscape
java.lang.Object
|
+--websphinx.workbench.Browser
|
+--websphinx.workbench.Netscape
- All Implemented Interfaces:
- LinkViewListener, ScriptInterpreter
- public class Netscape
- extends Browser
- implements ScriptInterpreter
Field Summary |
(package private) java.util.BitSet |
applies
|
(package private) static java.lang.String |
BACKSLASH
|
(package private) static java.lang.String |
DBLQUOTE
|
(package private) netscape.javascript.JSObject |
jsobject
|
(package private) static java.lang.String |
LINEFEED
|
Constructor Summary |
Netscape(java.applet.AppletContext context)
|
Netscape(java.applet.AppletContext context,
java.lang.String frameName)
|
Method Summary |
java.lang.Object |
apply(java.lang.Object func,
java.lang.Object[] args)
Call a procedure or function. |
java.lang.Object |
eval(java.lang.String expression)
Evaluate an expression in the script language. |
java.lang.Object |
get(java.lang.String name)
Get a variable defined in the interpreter's global
namespace |
java.lang.String |
getLanguage()
Return name of language this interpreter handles. |
ScriptInterpreter |
getScriptInterpreter()
|
private void |
init()
|
java.lang.Object |
lambda(java.lang.String[] args,
java.lang.String body)
Construct a procedure or function. |
(package private) void |
makeApply(int n)
|
void |
set(java.lang.String name,
java.lang.Object object)
Set a variable in the interpreter's global namespace |
void |
show(java.net.URL url)
|
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
jsobject
netscape.javascript.JSObject jsobject
applies
java.util.BitSet applies
DBLQUOTE
static java.lang.String DBLQUOTE
LINEFEED
static java.lang.String LINEFEED
BACKSLASH
static java.lang.String BACKSLASH
Netscape
public Netscape(java.applet.AppletContext context)
Netscape
public Netscape(java.applet.AppletContext context,
java.lang.String frameName)
init
private void init()
getScriptInterpreter
public ScriptInterpreter getScriptInterpreter()
getLanguage
public java.lang.String getLanguage()
- Description copied from interface:
ScriptInterpreter
- Return name of language this interpreter handles.
- Specified by:
getLanguage
in interface ScriptInterpreter
- Following copied from interface:
websphinx.workbench.ScriptInterpreter
- Returns:
- Language name, such as "Javascript" or "TCL"
eval
public java.lang.Object eval(java.lang.String expression)
throws ScriptException
- Description copied from interface:
ScriptInterpreter
- Evaluate an expression in the script language.
- Specified by:
eval
in interface ScriptInterpreter
- Following copied from interface:
websphinx.workbench.ScriptInterpreter
- Parameters:
expression
- Expression to evaluate- Throws:
ScriptException
- if execution encounters an error
lambda
public java.lang.Object lambda(java.lang.String[] args,
java.lang.String body)
throws ScriptException
- Description copied from interface:
ScriptInterpreter
- Construct a procedure or function.
- Specified by:
lambda
in interface ScriptInterpreter
- Following copied from interface:
websphinx.workbench.ScriptInterpreter
- Parameters:
args
- Argument namesbody
- Function body- Returns:
- Function object suitable for apply()
- Throws:
ScriptException
- if execution encounters an error
makeApply
void makeApply(int n)
apply
public java.lang.Object apply(java.lang.Object func,
java.lang.Object[] args)
throws ScriptException
- Description copied from interface:
ScriptInterpreter
- Call a procedure or function.
- Specified by:
apply
in interface ScriptInterpreter
- Following copied from interface:
websphinx.workbench.ScriptInterpreter
- Parameters:
func
- Function object (previously returned by lambda()args
- Arguments for the function- Throws:
ScriptException
- if execution encounters an error
set
public void set(java.lang.String name,
java.lang.Object object)
- Description copied from interface:
ScriptInterpreter
- Set a variable in the interpreter's global namespace
- Specified by:
set
in interface ScriptInterpreter
- Following copied from interface:
websphinx.workbench.ScriptInterpreter
- Parameters:
name
- Name of variableobject
- New value for variable
get
public java.lang.Object get(java.lang.String name)
- Description copied from interface:
ScriptInterpreter
- Get a variable defined in the interpreter's global
namespace
- Specified by:
get
in interface ScriptInterpreter
- Following copied from interface:
websphinx.workbench.ScriptInterpreter
- Parameters:
name
- Name of variable to get- Returns:
- Value of variable, or null if not defined
show
public void show(java.net.URL url)
- Overrides:
show
in class Browser