1
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
4
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
5
<meta name="Author" content="Norris Boyd">
6
<meta name="GENERATOR" content="Mozilla/4.7 [en] (WinNT; U) [Netscape]">
7
<title>JavaScript API</title>
9
<body bgcolor="#FFFFFF">
13
Rhino API Reference.</h1></center>
17
These APIs provide methods for controlling the actions of JavaScript in
21
<a href="org/mozilla/javascript/Context.html">Context</a> - Represents
22
the runtime context of an executing script. Has methods to associate the
23
JavaScript evaluation engine with a Java thread, set attributes of the
24
engine, and compile and evaluate scripts.</li>
27
<a href="org/mozilla/javascript/ContextListener.html">ContextListener</a>
28
- Allows embeddings to be notified of the creation, entering, exiting,
29
and releasing of Contexts. </li>
32
<a href="org/mozilla/javascript/Script.html">Script</a> - The result of
33
compiling a JavaScript script. Also encapsulates script execution.</li>
36
<a href="org/mozilla/javascript/ErrorReporter.html">ErrorReporter</a> -
37
This interface can be implemented to control the actions the JavaScript
38
engine takes when it encounters errors.</li>
41
<a href="org/mozilla/javascript/SecuritySupport.html">SecuritySupport</a>
42
- Optional support routines that must be provided by embeddings implementing
43
security controls on scripts.</li>
46
<a href="org/mozilla/javascript/Wrapper.html">Wrapper</a> - Interface implemented
47
by objects wrapping other objects. Provides a method for recovering the
51
<a href="org/mozilla/javascript/WrapHandler.html">WrapHandler</a> - Interface
52
embedders can implement in order to control the way Java objects are wrapped
53
for use by JavaScript.</li>
56
<a href="org/mozilla/javascript/ClassOutput.html">ClassOutput</a> - Interface
57
embedders can implement in order to control the placement of generated
62
The Host Object API</h4>
63
These APIs provide support for adding objects specific to a particular
64
embedding of JavaScript in a host environment. Note that if you just want
65
to script existing Java classes, you should just use <a href="http://developer.netscape.com/library/documentation/communicator/jsguide4/livecon.htm">LiveConnect</a>.
66
It is also helpful to understand some of the implementation of the <a href="runtime.html">runtime</a>.
69
<a href="org/mozilla/javascript/Scriptable.html">Scriptable</a> - All JavaScript
70
objects must implement this interface. Provides methods to access properties
71
and attributes of those properties, as well as other services required
72
of JavaScript objects.</li>
75
<a href="org/mozilla/javascript/Function.html">Function</a> - All JavaScript
76
functions must implement this interface. Extends Scriptable, adding methods
77
to support invocation.</li>
80
<a href="org/mozilla/javascript/ScriptableObject.html">ScriptableObject</a>
81
- A default implementation of Scriptable that may be extended. Implements
82
property and attribute storage and lookup and other default JavaScript
86
<a href="org/mozilla/javascript/FunctionObject.html">FunctionObject</a>
87
- An implementation of Function that allows Java methods and constructors
88
to be used as JavaScript function objects.</li>
91
<a href="org/mozilla/javascript/ImporterTopLevel.html">ImporterTopLevel</a>
92
- Allows embeddings to use the importClass and importPackage functions.</li>
97
These exceptions are thrown by JavaScript.
100
<a href="org/mozilla/javascript/JavaScriptException.html">JavaScriptException</a>
101
- Thrown from within JavaScript by the JavaScript 'throw' statement, or
102
by LiveConnect calls from JavaScript into Java. Wraps a JavaScript value.</li>
105
<a href="org/mozilla/javascript/ClassDefinitionException.html">ClassDefinitionException</a>
106
- Thrown if errors are detected while attempting to define a host object
107
from a Java class.</li>
110
<a href="org/mozilla/javascript/PropertyException.html">PropertyException</a>
111
- Thrown if errors are detected while attempting to define a property of
112
a host object from a Java class or method, or if a property is not found.</li>
115
<a href="org/mozilla/javascript/NotAFunctionException.html">NotAFunctionException</a>
116
- Thrown when attempting to call an object that is not a function.</li>
119
<a href="org/mozilla/javascript/EvaluatorException.html">EvaluatorException</a>
120
- An exception thrown when an error is detected during the execution of
121
a script. The default error reporter will throw EvaluatorExceptions when
122
an error is encountered.</li>
126
<br><a href="overview-summary.html">back to top</a>
1
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
4
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
5
<meta name="Author" content="Norris Boyd">
6
<meta name="GENERATOR" content="Mozilla/4.7 [en] (WinNT; U) [Netscape]">
7
<title>JavaScript API</title>
9
<body bgcolor="#FFFFFF">
13
Rhino API Reference.</h1>
17
These APIs provide methods for controlling the actions of JavaScript in
21
<a href="org/mozilla/javascript/Context.html">Context</a> - Represents
22
the runtime context of an executing script. Has methods to associate the
23
JavaScript evaluation engine with a Java thread, set attributes of the
24
engine, and compile and evaluate scripts.</li>
27
<a href="org/mozilla/javascript/ContextFactory.html">ContextFactory</a>
28
- Allows embeddings to customize creation of Context instances and monitor entering and releasing of Contexts. </li>
31
<a href="org/mozilla/javascript/Script.html">Script</a> - The result of
32
compiling a JavaScript script. Also encapsulates script execution.</li>
35
<a href="org/mozilla/javascript/ErrorReporter.html">ErrorReporter</a> -
36
This interface can be implemented to control the actions the JavaScript
37
engine takes when it encounters errors.</li>
40
<a href="org/mozilla/javascript/SecurityController.html">SecurityController</a>
41
- Optional support routines that must be provided by embeddings implementing
42
security controls on scripts.</li>
45
<a href="org/mozilla/javascript/ClassShutter.html">ClassShutter</a>
46
- Embeddings that wish to filter Java classes that are visible to scripts
47
through the LiveConnect, should implement this interface.</li>
50
<a href="org/mozilla/javascript/Wrapper.html">Wrapper</a> - Interface implemented
51
by objects wrapping other objects. Provides a method for recovering the
55
<a href="org/mozilla/javascript/WrapFactory.html">WrapFactory</a> - Class
56
embedders can extend in order to control the way Java objects are wrapped
57
for use by JavaScript.</li>
60
<a href="org/mozilla/javascript/optimizer/ClassCompiler.html">ClassCompiler</a> - Class that provies API for compiling scripts into JVM class files.</li>
63
<a href="org/mozilla/javascript/serialize/ScriptableOutputStream.html">ScriptableOutputStream</a> - This stream can be used to serialize JavaScript objects and functions.
67
<a href="org/mozilla/javascript/serialize/ScriptableInputStream.html">ScriptableInputStream</a> - This stream can be used to deserialize JavaScript objects and functions.
73
The Host Object API</h4>
74
These APIs provide support for adding objects specific to a particular
75
embedding of JavaScript in a host environment. Note that if you just want
76
to script existing Java classes, you should just use <a href="http://devedge.netscape.com/library/manuals/2000/javascript/1.5/guide/lc.html">LiveConnect</a>. See also <a href="http://www.mozilla.org/js/liveconnect/">LiveConnect 3.0 specs</a>.
77
It is also helpful to understand some of the implementation of the <a href="runtime.html">runtime</a>.
80
<a href="org/mozilla/javascript/Scriptable.html">Scriptable</a> - All JavaScript
81
objects must implement this interface. Provides methods to access properties
82
and attributes of those properties, as well as other services required
83
of JavaScript objects.</li>
86
<a href="org/mozilla/javascript/Function.html">Function</a> - All JavaScript
87
functions must implement this interface. Extends Scriptable, adding methods
88
to support invocation.</li>
91
<a href="org/mozilla/javascript/ScriptableObject.html">ScriptableObject</a>
92
- A default implementation of Scriptable that may be extended. Implements
93
property and attribute storage and lookup and other default JavaScript
97
<a href="org/mozilla/javascript/FunctionObject.html">FunctionObject</a>
98
- An implementation of Function that allows Java methods and constructors
99
to be used as JavaScript function objects.</li>
102
<a href="org/mozilla/javascript/ImporterTopLevel.html">ImporterTopLevel</a>
103
- Allows embeddings to use the JavaImporter constructor.</li>
108
These exceptions are thrown by JavaScript.
111
<a href="org/mozilla/javascript/RhinoException.html">RhinoException</a>
112
- Common root for all exception explicitly thrown by Rhino engine.</li>
114
<a href="org/mozilla/javascript/JavaScriptException.html">JavaScriptException</a>
115
- Thrown from within JavaScript by the JavaScript 'throw' statement. It wrapps the JavaScript value from 'throw' statement.</li>
118
<a href="org/mozilla/javascript/WrappedException.html">EcmaError</a>
119
- Thrown by Rhino runtime when particular runtime operation a scripts tries to execute is not allowed. The exception is thrown, for example, when a script attempts to check properties of <tt>undefined</tt>or <tt>null</tt> or refer to a name that can not be found in the current scope chain.</li>
122
<a href="org/mozilla/javascript/WrappedException.html">WrappedException</a>
123
- Thrown by LiveConnect implementation from JavaScript when called Java method exits with an exception. It wraps the original Java exception.</li>
126
<a href="org/mozilla/javascript/EvaluatorException.html">EvaluatorException</a>
127
- An exception thrown when an error is detected during the compilation or execution of
128
a script. The default error reporter will throw EvaluatorExceptions when
129
an error is encountered.</li>
133
<br><a href="overview-summary.html">back to top</a>