Documenting ClassFactory usage

This commit is contained in:
igor%mir2.org 2004-08-14 15:17:40 +00:00
parent 82fc688a4b
commit e1db421213
3 changed files with 23 additions and 18 deletions

View File

@ -3,10 +3,10 @@ apiClasses=\
src/org/mozilla/javascript/ClassCache.java,\ src/org/mozilla/javascript/ClassCache.java,\
src/org/mozilla/javascript/ClassDefinitionException.java,\ src/org/mozilla/javascript/ClassDefinitionException.java,\
src/org/mozilla/javascript/ClassShutter.java,\ src/org/mozilla/javascript/ClassShutter.java,\
src/org/mozilla/javascript/CompilerEnvirons.java,\
src/org/mozilla/javascript/Context.java,\ src/org/mozilla/javascript/Context.java,\
src/org/mozilla/javascript/ContextAction.java,\ src/org/mozilla/javascript/ContextAction.java,\
src/org/mozilla/javascript/ContextFactory.java,\ src/org/mozilla/javascript/ContextFactory.java,\
src/org/mozilla/javascript/ContextListener.java,\
src/org/mozilla/javascript/EcmaError.java,\ src/org/mozilla/javascript/EcmaError.java,\
src/org/mozilla/javascript/ErrorReporter.java,\ src/org/mozilla/javascript/ErrorReporter.java,\
src/org/mozilla/javascript/EvaluatorException.java,\ src/org/mozilla/javascript/EvaluatorException.java,\

View File

@ -24,9 +24,8 @@ JavaScript evaluation engine with a Java thread, set attributes of the
engine, and compile and evaluate scripts.</li> engine, and compile and evaluate scripts.</li>
<li> <li>
<a href="org/mozilla/javascript/ContextListener.html">ContextListener</a> <a href="org/mozilla/javascript/ContextFactory.html">ContextFactory</a>
- Allows embeddings to be notified of the creation, entering, exiting, - Allows embeddings to customize creation of Context instances and monitor entering and releasing of Contexts. </li>
and releasing of Contexts. </li>
<li> <li>
<a href="org/mozilla/javascript/Script.html">Script</a> - The result of <a href="org/mozilla/javascript/Script.html">Script</a> - The result of
@ -74,7 +73,7 @@ for use by JavaScript.</li>
The Host Object API</h4> The Host Object API</h4>
These APIs provide support for adding objects specific to a particular These APIs provide support for adding objects specific to a particular
embedding of JavaScript in a host environment. Note that if you just want embedding of JavaScript in a host environment. Note that if you just want
to script existing Java classes, you should just use <a href="http://developer.netscape.com/library/documentation/communicator/jsguide4/livecon.htm">LiveConnect</a>. 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>.
It is also helpful to understand some of the implementation of the <a href="runtime.html">runtime</a>. It is also helpful to understand some of the implementation of the <a href="runtime.html">runtime</a>.
<ul> <ul>
<li> <li>
@ -101,7 +100,7 @@ to be used as JavaScript function objects.</li>
<li> <li>
<a href="org/mozilla/javascript/ImporterTopLevel.html">ImporterTopLevel</a> <a href="org/mozilla/javascript/ImporterTopLevel.html">ImporterTopLevel</a>
- Allows embeddings to use the importClass and importPackage functions.</li> - Allows embeddings to use the JavaImporter constructor.</li>
</ul> </ul>
<h4> <h4>
@ -109,23 +108,23 @@ Exceptions</h4>
These exceptions are thrown by JavaScript. These exceptions are thrown by JavaScript.
<ul> <ul>
<li> <li>
<a href="org/mozilla/javascript/RhinoException.html">RhinoException</a>
- Common root for all exception explicitly thrown by Rhino engine.</li>
<a href="org/mozilla/javascript/JavaScriptException.html">JavaScriptException</a> <a href="org/mozilla/javascript/JavaScriptException.html">JavaScriptException</a>
- Thrown from within JavaScript by the JavaScript 'throw' statement, or - Thrown from within JavaScript by the JavaScript 'throw' statement. It wrapps the JavaScript value from 'throw' statement.</li>
by LiveConnect calls from JavaScript into Java. Wraps a JavaScript value.</li>
<li> <li>
<a href="org/mozilla/javascript/ClassDefinitionException.html">ClassDefinitionException</a> <a href="org/mozilla/javascript/WrappedException.html">EcmaError</a>
- Thrown if errors are detected while attempting to define a host object - 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>
from a Java class.</li>
<li> <li>
<a href="org/mozilla/javascript/PropertyException.html">PropertyException</a> <a href="org/mozilla/javascript/WrappedException.html">WrappedException</a>
- Thrown if errors are detected while attempting to define a property of - Thrown by LiveConnect implementation from JavaScript when called Java method exits with an exception. It wraps the original Java exception.</li>
a host object from a Java class or method, or if a property is not found.</li>
<li> <li>
<a href="org/mozilla/javascript/EvaluatorException.html">EvaluatorException</a> <a href="org/mozilla/javascript/EvaluatorException.html">EvaluatorException</a>
- An exception thrown when an error is detected during the execution of - An exception thrown when an error is detected during the compilation or execution of
a script. The default error reporter will throw EvaluatorExceptions when a script. The default error reporter will throw EvaluatorExceptions when
an error is encountered.</li> an error is encountered.</li>
</ul> </ul>

View File

@ -48,7 +48,7 @@ The class gives the uniform way to access information about the script origin of
See <a href="http://bugzilla.mozilla.org/show_bug.cgi?id=244492">Bugzilla 244492</a> for details. See <a href="http://bugzilla.mozilla.org/show_bug.cgi?id=244492">Bugzilla 244492</a> for details.
</p> </p>
<h4>Removal of code complexity limits in the interpretr</tt></h4> <h4>Removal of code complexity limits in the interpretr</h4>
<p> <p>
The interpreter mode in Rhino does not limit any longer the script size or code complexity. It should be possible to execute any script as long as JVM resources allow so. The interpreter mode in Rhino does not limit any longer the script size or code complexity. It should be possible to execute any script as long as JVM resources allow so.
</p> </p>
@ -57,7 +57,7 @@ See <a href="http://bugzilla.mozilla.org/show_bug.cgi?id=244014">Bugzilla 244014
</p> </p>
<h4><tt>JavaImporter</tt> constructor</h4> <h4>JavaImporter constructor</h4>
<p> <p>
<tt>JavaImporter</tt> is a new global constructor that allows to omit explicit package names when scripting Java: <tt>JavaImporter</tt> is a new global constructor that allows to omit explicit package names when scripting Java:
</p> </p>
@ -85,8 +85,14 @@ Previously such functionality was available only to embeddings that used <a href
See <a href="http://bugzilla.mozilla.org/show_bug.cgi?id=245882">Bugzilla 245882</a> for details. See <a href="http://bugzilla.mozilla.org/show_bug.cgi?id=245882">Bugzilla 245882</a> for details.
</p> </p>
<h4>Context customization API</h4>
<a href="apidocs/org/mozilla/javascript/ContextFactory.html"><tt>org.mozilla.javascript.ContextFactory</tt></a> provides new API for customization of <tt>org.mozilla.javascript.Context</tt> and ensures that application-specific Context subclasses will always be used with when Rhino runtime needs to create Context instances.
</p>
<p>
See <a href="http://bugzilla.mozilla.org/show_bug.cgi?id=255595">Bugzilla 245882</a> for details.
</p>
<h4>Support for <tt>Date.now()</tt></h4> <h4>Support for Date.now()</h4>
<p> <p>
<tt>Date.now()</tt> function which is a SpiderMonkey extension to ECMAScript standard is available now in Rhino. The function returns number of milliseconds passed since 1970-01-01 00:00:00 UTC. <tt>Date.now()</tt> function which is a SpiderMonkey extension to ECMAScript standard is available now in Rhino. The function returns number of milliseconds passed since 1970-01-01 00:00:00 UTC.
</p> </p>