diff options
Diffstat (limited to 'infrastructure/rhino1_7R1/javadoc/org/mozilla/javascript/Context.html')
-rw-r--r-- | infrastructure/rhino1_7R1/javadoc/org/mozilla/javascript/Context.html | 3581 |
1 files changed, 3581 insertions, 0 deletions
diff --git a/infrastructure/rhino1_7R1/javadoc/org/mozilla/javascript/Context.html b/infrastructure/rhino1_7R1/javadoc/org/mozilla/javascript/Context.html new file mode 100644 index 0000000..64fb637 --- /dev/null +++ b/infrastructure/rhino1_7R1/javadoc/org/mozilla/javascript/Context.html @@ -0,0 +1,3581 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!--NewPage--> +<HTML> +<HEAD> +<!-- Generated by javadoc (build 1.6.0) on Thu Mar 06 17:19:14 EST 2008 --> +<TITLE> +Context (Rhino) +</TITLE> + +<META NAME="date" CONTENT="2008-03-06"> + +<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style"> + +<SCRIPT type="text/javascript"> +function windowTitle() +{ + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="Context (Rhino)"; + } +} +</SCRIPT> +<NOSCRIPT> +</NOSCRIPT> + +</HEAD> + +<BODY BGCOLOR="white" onload="windowTitle();"> +<HR> + + +<!-- ========= START OF TOP NAVBAR ======= --> +<A NAME="navbar_top"><!-- --></A> +<A HREF="#skip-navbar_top" title="Skip navigation links"></A> +<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> +<TR> +<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> +<A NAME="navbar_top_firstrow"><!-- --></A> +<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> + <TR ALIGN="center" VALIGN="top"> + <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> + <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> + <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> + <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> + <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> + <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> + <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> + </TR> +</TABLE> +</TD> +<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> +</EM> +</TD> +</TR> + +<TR> +<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> + <A HREF="../../../org/mozilla/javascript/CompilerEnvirons.html" title="class in org.mozilla.javascript"><B>PREV CLASS</B></A> + <A HREF="../../../org/mozilla/javascript/ContextAction.html" title="interface in org.mozilla.javascript"><B>NEXT CLASS</B></A></FONT></TD> +<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> + <A HREF="../../../index.html?org/mozilla/javascript/Context.html" target="_top"><B>FRAMES</B></A> + <A HREF="Context.html" target="_top"><B>NO FRAMES</B></A> + <SCRIPT type="text/javascript"> + <!-- + if(window==top) { + document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); + } + //--> +</SCRIPT> +<NOSCRIPT> + <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A> +</NOSCRIPT> + + +</FONT></TD> +</TR> +<TR> +<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> + SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> +<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> +DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> +</TR> +</TABLE> +<A NAME="skip-navbar_top"></A> +<!-- ========= END OF TOP NAVBAR ========= --> + +<HR> +<!-- ======== START OF CLASS DATA ======== --> +<H2> +<FONT SIZE="-1"> +org.mozilla.javascript</FONT> +<BR> +Class Context</H2> +<PRE> +java.lang.Object + <IMG SRC="../../../resources/inherit.gif" ALT="extended by "><B>org.mozilla.javascript.Context</B> +</PRE> +<HR> +<DL> +<DT><PRE>public class <B>Context</B><DT>extends java.lang.Object</DL> +</PRE> + +<P> +This class represents the runtime context of an executing script. + + Before executing a script, an instance of Context must be created + and associated with the thread that will be executing the script. + The Context will be used to store information about the executing + of the script such as the call stack. Contexts are associated with + the current thread using the <A HREF="../../../org/mozilla/javascript/Context.html#call(org.mozilla.javascript.ContextAction)"><CODE>call(ContextAction)</CODE></A> + or <A HREF="../../../org/mozilla/javascript/Context.html#enter()"><CODE>enter()</CODE></A> methods.<p> + + Different forms of script execution are supported. Scripts may be + evaluated from the source directly, or first compiled and then later + executed. Interactive execution is also supported.<p> + + Some aspects of script execution, such as type conversions and + object creation, may be accessed directly through methods of + Context. +<P> + +<P> +<DL> +<DT><B>Author:</B></DT> + <DD>Norris Boyd, Brendan Eich</DD> +<DT><B>See Also:</B><DD><A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript"><CODE>Scriptable</CODE></A></DL> +<HR> + +<P> +<!-- =========== FIELD SUMMARY =========== --> + +<A NAME="field_summary"><!-- --></A> +<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> +<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> +<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> +<B>Field Summary</B></FONT></TH> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE>static java.lang.Object[]</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/mozilla/javascript/Context.html#emptyArgs">emptyArgs</A></B></CODE> + +<BR> + Convenient value to use as zero-length array of objects.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE>static java.lang.String</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/mozilla/javascript/Context.html#errorReporterProperty">errorReporterProperty</A></B></CODE> + +<BR> + </TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE>static int</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/mozilla/javascript/Context.html#FEATURE_DYNAMIC_SCOPE">FEATURE_DYNAMIC_SCOPE</A></B></CODE> + +<BR> + Control if dynamic scope should be used for name access.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE>static int</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/mozilla/javascript/Context.html#FEATURE_E4X">FEATURE_E4X</A></B></CODE> + +<BR> + Control if support for E4X(ECMAScript for XML) extension is available.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE>static int</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/mozilla/javascript/Context.html#FEATURE_ENHANCED_JAVA_ACCESS">FEATURE_ENHANCED_JAVA_ACCESS</A></B></CODE> + +<BR> + Enables enhanced access to Java.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE>static int</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/mozilla/javascript/Context.html#FEATURE_LOCATION_INFORMATION_IN_ERROR">FEATURE_LOCATION_INFORMATION_IN_ERROR</A></B></CODE> + +<BR> + When the feature is on Rhino will add a "fileName" and "lineNumber" + properties to Error objects automatically.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE>static int</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/mozilla/javascript/Context.html#FEATURE_MEMBER_EXPR_AS_FUNCTION_NAME">FEATURE_MEMBER_EXPR_AS_FUNCTION_NAME</A></B></CODE> + +<BR> + Control if member expression as function name extension is available.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE>static int</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/mozilla/javascript/Context.html#FEATURE_NON_ECMA_GET_YEAR">FEATURE_NON_ECMA_GET_YEAR</A></B></CODE> + +<BR> + Controls behaviour of <tt>Date.prototype.getYear()</tt>.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE>static int</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/mozilla/javascript/Context.html#FEATURE_PARENT_PROTO_PROPERTIES">FEATURE_PARENT_PROTO_PROPERTIES</A></B></CODE> + +<BR> + Control if properties <tt>__proto__</tt> and <tt>__parent__</tt> + are treated specially.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE>static int</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/mozilla/javascript/Context.html#FEATURE_PARENT_PROTO_PROPRTIES">FEATURE_PARENT_PROTO_PROPRTIES</A></B></CODE> + +<BR> + <B>Deprecated.</B> <I>In previous releases, this name was given to + FEATURE_PARENT_PROTO_PROPERTIES.</I></TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE>static int</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/mozilla/javascript/Context.html#FEATURE_RESERVED_KEYWORD_AS_IDENTIFIER">FEATURE_RESERVED_KEYWORD_AS_IDENTIFIER</A></B></CODE> + +<BR> + Control if reserved keywords are treated as identifiers.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE>static int</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/mozilla/javascript/Context.html#FEATURE_STRICT_EVAL">FEATURE_STRICT_EVAL</A></B></CODE> + +<BR> + Control if strict eval mode is enabled.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE>static int</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/mozilla/javascript/Context.html#FEATURE_STRICT_MODE">FEATURE_STRICT_MODE</A></B></CODE> + +<BR> + Controls whether JS 1.5 'strict mode' is enabled.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE>static int</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/mozilla/javascript/Context.html#FEATURE_STRICT_VARS">FEATURE_STRICT_VARS</A></B></CODE> + +<BR> + Control if strict variable mode is enabled.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE>static int</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/mozilla/javascript/Context.html#FEATURE_TO_STRING_AS_SOURCE">FEATURE_TO_STRING_AS_SOURCE</A></B></CODE> + +<BR> + Control if <tt>toString()</tt> should returns the same result + as <tt>toSource()</tt> when applied to objects and arrays.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE>static int</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/mozilla/javascript/Context.html#FEATURE_WARNING_AS_ERROR">FEATURE_WARNING_AS_ERROR</A></B></CODE> + +<BR> + Controls whether a warning should be treated as an error.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE> boolean</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/mozilla/javascript/Context.html#generateObserverCount">generateObserverCount</A></B></CODE> + +<BR> + </TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE>static java.lang.String</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/mozilla/javascript/Context.html#languageVersionProperty">languageVersionProperty</A></B></CODE> + +<BR> + </TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE>static int</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/mozilla/javascript/Context.html#VERSION_1_0">VERSION_1_0</A></B></CODE> + +<BR> + JavaScript 1.0</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE>static int</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/mozilla/javascript/Context.html#VERSION_1_1">VERSION_1_1</A></B></CODE> + +<BR> + JavaScript 1.1</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE>static int</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/mozilla/javascript/Context.html#VERSION_1_2">VERSION_1_2</A></B></CODE> + +<BR> + JavaScript 1.2</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE>static int</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/mozilla/javascript/Context.html#VERSION_1_3">VERSION_1_3</A></B></CODE> + +<BR> + JavaScript 1.3</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE>static int</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/mozilla/javascript/Context.html#VERSION_1_4">VERSION_1_4</A></B></CODE> + +<BR> + JavaScript 1.4</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE>static int</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/mozilla/javascript/Context.html#VERSION_1_5">VERSION_1_5</A></B></CODE> + +<BR> + JavaScript 1.5</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE>static int</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/mozilla/javascript/Context.html#VERSION_1_6">VERSION_1_6</A></B></CODE> + +<BR> + JavaScript 1.6</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE>static int</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/mozilla/javascript/Context.html#VERSION_1_7">VERSION_1_7</A></B></CODE> + +<BR> + JavaScript 1.7</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE>static int</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/mozilla/javascript/Context.html#VERSION_DEFAULT">VERSION_DEFAULT</A></B></CODE> + +<BR> + The default version.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE>static int</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/mozilla/javascript/Context.html#VERSION_UNKNOWN">VERSION_UNKNOWN</A></B></CODE> + +<BR> + The unknown version.</TD> +</TR> +</TABLE> + +<!-- ======== CONSTRUCTOR SUMMARY ======== --> + +<A NAME="constructor_summary"><!-- --></A> +<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> +<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> +<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> +<B>Constructor Summary</B></FONT></TH> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD><CODE><B><A HREF="../../../org/mozilla/javascript/Context.html#Context()">Context</A></B>()</CODE> + +<BR> + <B>Deprecated.</B> <I>use <A HREF="../../../org/mozilla/javascript/ContextFactory.html#enter()"><CODE>ContextFactory.enter()</CODE></A> or + <A HREF="../../../org/mozilla/javascript/ContextFactory.html#call(org.mozilla.javascript.ContextAction)"><CODE>ContextFactory.call(ContextAction)</CODE></A> instead.</I></TD> +</TR> +</TABLE> + +<!-- ========== METHOD SUMMARY =========== --> + +<A NAME="method_summary"><!-- --></A> +<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> +<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> +<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> +<B>Method Summary</B></FONT></TH> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE> void</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/mozilla/javascript/Context.html#addActivationName(java.lang.String)">addActivationName</A></B>(java.lang.String name)</CODE> + +<BR> + Add a name to the list of names forcing the creation of real + activation objects for functions.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE>static void</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/mozilla/javascript/Context.html#addContextListener(org.mozilla.javascript.ContextListener)">addContextListener</A></B>(org.mozilla.javascript.ContextListener listener)</CODE> + +<BR> + <B>Deprecated.</B> <I></I> </TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE> void</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/mozilla/javascript/Context.html#addPropertyChangeListener(java.beans.PropertyChangeListener)">addPropertyChangeListener</A></B>(java.beans.PropertyChangeListener l)</CODE> + +<BR> + Register an object to receive notifications when a bound property + has changed</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE>static java.lang.Object</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/mozilla/javascript/Context.html#call(org.mozilla.javascript.ContextAction)">call</A></B>(<A HREF="../../../org/mozilla/javascript/ContextAction.html" title="interface in org.mozilla.javascript">ContextAction</A> action)</CODE> + +<BR> + <B>Deprecated.</B> <I>use <A HREF="../../../org/mozilla/javascript/ContextFactory.html#call(org.mozilla.javascript.ContextAction)"><CODE>ContextFactory.call(ContextAction)</CODE></A> instead as + this method relies on usage of a static singleton "global" + ContextFactory.</I></TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE>static java.lang.Object</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/mozilla/javascript/Context.html#call(org.mozilla.javascript.ContextFactory, org.mozilla.javascript.Callable, org.mozilla.javascript.Scriptable, org.mozilla.javascript.Scriptable, java.lang.Object[])">call</A></B>(<A HREF="../../../org/mozilla/javascript/ContextFactory.html" title="class in org.mozilla.javascript">ContextFactory</A> factory, + <A HREF="../../../org/mozilla/javascript/Callable.html" title="interface in org.mozilla.javascript">Callable</A> callable, + <A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> scope, + <A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> thisObj, + java.lang.Object[] args)</CODE> + +<BR> + Call <A HREF="../../../org/mozilla/javascript/Callable.html#call(org.mozilla.javascript.Context, org.mozilla.javascript.Scriptable, org.mozilla.javascript.Scriptable, java.lang.Object[])"><CODE>Callable.call(Context cx, Scriptable scope, Scriptable thisObj, + Object[] args)</CODE></A> + using the Context instance associated with the current thread.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE>static void</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/mozilla/javascript/Context.html#checkLanguageVersion(int)">checkLanguageVersion</A></B>(int version)</CODE> + +<BR> + </TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE>static void</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/mozilla/javascript/Context.html#checkOptimizationLevel(int)">checkOptimizationLevel</A></B>(int optimizationLevel)</CODE> + +<BR> + </TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE> <A HREF="../../../org/mozilla/javascript/Function.html" title="interface in org.mozilla.javascript">Function</A></CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/mozilla/javascript/Context.html#compileFunction(org.mozilla.javascript.Scriptable, java.lang.String, java.lang.String, int, java.lang.Object)">compileFunction</A></B>(<A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> scope, + java.lang.String source, + java.lang.String sourceName, + int lineno, + java.lang.Object securityDomain)</CODE> + +<BR> + Compile a JavaScript function.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE> <A HREF="../../../org/mozilla/javascript/Script.html" title="interface in org.mozilla.javascript">Script</A></CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/mozilla/javascript/Context.html#compileReader(java.io.Reader, java.lang.String, int, java.lang.Object)">compileReader</A></B>(java.io.Reader in, + java.lang.String sourceName, + int lineno, + java.lang.Object securityDomain)</CODE> + +<BR> + Compiles the source in the given reader.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE> <A HREF="../../../org/mozilla/javascript/Script.html" title="interface in org.mozilla.javascript">Script</A></CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/mozilla/javascript/Context.html#compileReader(org.mozilla.javascript.Scriptable, java.io.Reader, java.lang.String, int, java.lang.Object)">compileReader</A></B>(<A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> scope, + java.io.Reader in, + java.lang.String sourceName, + int lineno, + java.lang.Object securityDomain)</CODE> + +<BR> + <B>Deprecated.</B> <I></I> </TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE> <A HREF="../../../org/mozilla/javascript/Script.html" title="interface in org.mozilla.javascript">Script</A></CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/mozilla/javascript/Context.html#compileString(java.lang.String, java.lang.String, int, java.lang.Object)">compileString</A></B>(java.lang.String source, + java.lang.String sourceName, + int lineno, + java.lang.Object securityDomain)</CODE> + +<BR> + Compiles the source in the given string.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE> <A HREF="../../../org/mozilla/javascript/GeneratedClassLoader.html" title="interface in org.mozilla.javascript">GeneratedClassLoader</A></CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/mozilla/javascript/Context.html#createClassLoader(java.lang.ClassLoader)">createClassLoader</A></B>(java.lang.ClassLoader parent)</CODE> + +<BR> + Create class loader for generated classes.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE> java.lang.String</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/mozilla/javascript/Context.html#decompileFunction(org.mozilla.javascript.Function, int)">decompileFunction</A></B>(<A HREF="../../../org/mozilla/javascript/Function.html" title="interface in org.mozilla.javascript">Function</A> fun, + int indent)</CODE> + +<BR> + Decompile a JavaScript Function.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE> java.lang.String</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/mozilla/javascript/Context.html#decompileFunctionBody(org.mozilla.javascript.Function, int)">decompileFunctionBody</A></B>(<A HREF="../../../org/mozilla/javascript/Function.html" title="interface in org.mozilla.javascript">Function</A> fun, + int indent)</CODE> + +<BR> + Decompile the body of a JavaScript Function.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE> java.lang.String</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/mozilla/javascript/Context.html#decompileScript(org.mozilla.javascript.Script, int)">decompileScript</A></B>(<A HREF="../../../org/mozilla/javascript/Script.html" title="interface in org.mozilla.javascript">Script</A> script, + int indent)</CODE> + +<BR> + Decompile the script.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE>static <A HREF="../../../org/mozilla/javascript/Context.html" title="class in org.mozilla.javascript">Context</A></CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/mozilla/javascript/Context.html#enter()">enter</A></B>()</CODE> + +<BR> + <B>Deprecated.</B> <I>use <A HREF="../../../org/mozilla/javascript/ContextFactory.html#enter()"><CODE>ContextFactory.enter()</CODE></A> or + <A HREF="../../../org/mozilla/javascript/ContextFactory.html#call(org.mozilla.javascript.ContextAction)"><CODE>ContextFactory.call(ContextAction)</CODE></A> instead as this method relies + on usage of a static singleton "global" ContextFactory.</I></TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE>static <A HREF="../../../org/mozilla/javascript/Context.html" title="class in org.mozilla.javascript">Context</A></CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/mozilla/javascript/Context.html#enter(org.mozilla.javascript.Context)">enter</A></B>(<A HREF="../../../org/mozilla/javascript/Context.html" title="class in org.mozilla.javascript">Context</A> cx)</CODE> + +<BR> + <B>Deprecated.</B> <I>use <A HREF="../../../org/mozilla/javascript/ContextFactory.html#enterContext(org.mozilla.javascript.Context)"><CODE>ContextFactory.enterContext(Context)</CODE></A> instead as + this method relies on usage of a static singleton "global" ContextFactory.</I></TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE> java.lang.Object</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/mozilla/javascript/Context.html#evaluateReader(org.mozilla.javascript.Scriptable, java.io.Reader, java.lang.String, int, java.lang.Object)">evaluateReader</A></B>(<A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> scope, + java.io.Reader in, + java.lang.String sourceName, + int lineno, + java.lang.Object securityDomain)</CODE> + +<BR> + Evaluate a reader as JavaScript source.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE> java.lang.Object</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/mozilla/javascript/Context.html#evaluateString(org.mozilla.javascript.Scriptable, java.lang.String, java.lang.String, int, java.lang.Object)">evaluateString</A></B>(<A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> scope, + java.lang.String source, + java.lang.String sourceName, + int lineno, + java.lang.Object securityDomain)</CODE> + +<BR> + Evaluate a JavaScript source string.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE>static void</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/mozilla/javascript/Context.html#exit()">exit</A></B>()</CODE> + +<BR> + Exit a block of code requiring a Context.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE> java.lang.ClassLoader</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/mozilla/javascript/Context.html#getApplicationClassLoader()">getApplicationClassLoader</A></B>()</CODE> + +<BR> + </TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE>static <A HREF="../../../org/mozilla/javascript/Context.html" title="class in org.mozilla.javascript">Context</A></CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/mozilla/javascript/Context.html#getCurrentContext()">getCurrentContext</A></B>()</CODE> + +<BR> + Get the current Context.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE>static <A HREF="../../../org/mozilla/javascript/debug/DebuggableScript.html" title="interface in org.mozilla.javascript.debug">DebuggableScript</A></CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/mozilla/javascript/Context.html#getDebuggableView(org.mozilla.javascript.Script)">getDebuggableView</A></B>(<A HREF="../../../org/mozilla/javascript/Script.html" title="interface in org.mozilla.javascript">Script</A> script)</CODE> + +<BR> + Return DebuggableScript instance if any associated with the script.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE> org.mozilla.javascript.debug.Debugger</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/mozilla/javascript/Context.html#getDebugger()">getDebugger</A></B>()</CODE> + +<BR> + Return the current debugger.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE> java.lang.Object</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/mozilla/javascript/Context.html#getDebuggerContextData()">getDebuggerContextData</A></B>()</CODE> + +<BR> + Return the debugger context data associated with current context.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE> org.mozilla.javascript.xml.XMLLib.Factory</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/mozilla/javascript/Context.html#getE4xImplementationFactory()">getE4xImplementationFactory</A></B>()</CODE> + +<BR> + Returns an object which specifies an E4X implementation to use within + this <code>Context</code>.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE> java.lang.Object[]</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/mozilla/javascript/Context.html#getElements(org.mozilla.javascript.Scriptable)">getElements</A></B>(<A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> object)</CODE> + +<BR> + Get the elements of a JavaScript array.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE> <A HREF="../../../org/mozilla/javascript/ErrorReporter.html" title="interface in org.mozilla.javascript">ErrorReporter</A></CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/mozilla/javascript/Context.html#getErrorReporter()">getErrorReporter</A></B>()</CODE> + +<BR> + Get the current error reporter.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE> <A HREF="../../../org/mozilla/javascript/ContextFactory.html" title="class in org.mozilla.javascript">ContextFactory</A></CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/mozilla/javascript/Context.html#getFactory()">getFactory</A></B>()</CODE> + +<BR> + Return <A HREF="../../../org/mozilla/javascript/ContextFactory.html" title="class in org.mozilla.javascript"><CODE>ContextFactory</CODE></A> instance used to create this Context.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE> java.lang.String</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/mozilla/javascript/Context.html#getImplementationVersion()">getImplementationVersion</A></B>()</CODE> + +<BR> + Get the implementation version.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE> int</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/mozilla/javascript/Context.html#getInstructionObserverThreshold()">getInstructionObserverThreshold</A></B>()</CODE> + +<BR> + Get threshold of executed instructions counter that triggers call to + <code>observeInstructionCount()</code>.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE> int</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/mozilla/javascript/Context.html#getLanguageVersion()">getLanguageVersion</A></B>()</CODE> + +<BR> + Get the current language version.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE> java.util.Locale</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/mozilla/javascript/Context.html#getLocale()">getLocale</A></B>()</CODE> + +<BR> + Get the current locale.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE> int</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/mozilla/javascript/Context.html#getMaximumInterpreterStackDepth()">getMaximumInterpreterStackDepth</A></B>()</CODE> + +<BR> + Returns the maximum stack depth (in terms of number of call frames) + allowed in a single invocation of interpreter.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE> int</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/mozilla/javascript/Context.html#getOptimizationLevel()">getOptimizationLevel</A></B>()</CODE> + +<BR> + Get the current optimization level.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE> java.lang.Object</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/mozilla/javascript/Context.html#getThreadLocal(java.lang.Object)">getThreadLocal</A></B>(java.lang.Object key)</CODE> + +<BR> + Get a value corresponding to a key.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE>static java.lang.Object</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/mozilla/javascript/Context.html#getUndefinedValue()">getUndefinedValue</A></B>()</CODE> + +<BR> + Get the singleton object that represents the JavaScript Undefined value.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE> <A HREF="../../../org/mozilla/javascript/WrapFactory.html" title="class in org.mozilla.javascript">WrapFactory</A></CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/mozilla/javascript/Context.html#getWrapFactory()">getWrapFactory</A></B>()</CODE> + +<BR> + Return the current WrapFactory, or null if none is defined.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE> boolean</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/mozilla/javascript/Context.html#hasCompileFunctionsWithDynamicScope()">hasCompileFunctionsWithDynamicScope</A></B>()</CODE> + +<BR> + <B>Deprecated.</B> <I></I> </TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE> boolean</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/mozilla/javascript/Context.html#hasFeature(int)">hasFeature</A></B>(int featureIndex)</CODE> + +<BR> + Controls certain aspects of script semantics.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE> <A HREF="../../../org/mozilla/javascript/ScriptableObject.html" title="class in org.mozilla.javascript">ScriptableObject</A></CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/mozilla/javascript/Context.html#initStandardObjects()">initStandardObjects</A></B>()</CODE> + +<BR> + Initialize the standard objects.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE> <A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A></CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/mozilla/javascript/Context.html#initStandardObjects(org.mozilla.javascript.ScriptableObject)">initStandardObjects</A></B>(<A HREF="../../../org/mozilla/javascript/ScriptableObject.html" title="class in org.mozilla.javascript">ScriptableObject</A> scope)</CODE> + +<BR> + Initialize the standard objects.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE> <A HREF="../../../org/mozilla/javascript/ScriptableObject.html" title="class in org.mozilla.javascript">ScriptableObject</A></CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/mozilla/javascript/Context.html#initStandardObjects(org.mozilla.javascript.ScriptableObject, boolean)">initStandardObjects</A></B>(<A HREF="../../../org/mozilla/javascript/ScriptableObject.html" title="class in org.mozilla.javascript">ScriptableObject</A> scope, + boolean sealed)</CODE> + +<BR> + Initialize the standard objects.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE> boolean</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/mozilla/javascript/Context.html#isActivationNeeded(java.lang.String)">isActivationNeeded</A></B>(java.lang.String name)</CODE> + +<BR> + Check whether the name is in the list of names of objects + forcing the creation of activation objects.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE> boolean</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/mozilla/javascript/Context.html#isGeneratingDebug()">isGeneratingDebug</A></B>()</CODE> + +<BR> + Tell whether debug information is being generated.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE> boolean</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/mozilla/javascript/Context.html#isGeneratingDebugChanged()">isGeneratingDebugChanged</A></B>()</CODE> + +<BR> + </TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE> boolean</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/mozilla/javascript/Context.html#isGeneratingSource()">isGeneratingSource</A></B>()</CODE> + +<BR> + Tell whether source information is being generated.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE> boolean</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/mozilla/javascript/Context.html#isSealed()">isSealed</A></B>()</CODE> + +<BR> + Checks if this is a sealed Context.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE>static boolean</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/mozilla/javascript/Context.html#isValidLanguageVersion(int)">isValidLanguageVersion</A></B>(int version)</CODE> + +<BR> + </TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE>static boolean</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/mozilla/javascript/Context.html#isValidOptimizationLevel(int)">isValidOptimizationLevel</A></B>(int optimizationLevel)</CODE> + +<BR> + </TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE>static java.lang.Object</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/mozilla/javascript/Context.html#javaToJS(java.lang.Object, org.mozilla.javascript.Scriptable)">javaToJS</A></B>(java.lang.Object value, + <A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> scope)</CODE> + +<BR> + Convenient method to convert java value to its closest representation + in JavaScript.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE>static java.lang.Object</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/mozilla/javascript/Context.html#jsToJava(java.lang.Object, java.lang.Class)">jsToJava</A></B>(java.lang.Object value, + java.lang.Class desiredType)</CODE> + +<BR> + Convert a JavaScript value into the desired type.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE> <A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A></CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/mozilla/javascript/Context.html#newArray(org.mozilla.javascript.Scriptable, int)">newArray</A></B>(<A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> scope, + int length)</CODE> + +<BR> + Create an array with a specified initial length.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE> <A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A></CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/mozilla/javascript/Context.html#newArray(org.mozilla.javascript.Scriptable, java.lang.Object[])">newArray</A></B>(<A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> scope, + java.lang.Object[] elements)</CODE> + +<BR> + Create an array with a set of initial elements.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE> <A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A></CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/mozilla/javascript/Context.html#newObject(org.mozilla.javascript.Scriptable)">newObject</A></B>(<A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> scope)</CODE> + +<BR> + Create a new JavaScript object.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE> <A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A></CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/mozilla/javascript/Context.html#newObject(org.mozilla.javascript.Scriptable, java.lang.String)">newObject</A></B>(<A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> scope, + java.lang.String constructorName)</CODE> + +<BR> + Create a new JavaScript object by executing the named constructor.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE> <A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A></CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/mozilla/javascript/Context.html#newObject(org.mozilla.javascript.Scriptable, java.lang.String, java.lang.Object[])">newObject</A></B>(<A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> scope, + java.lang.String constructorName, + java.lang.Object[] args)</CODE> + +<BR> + Creates a new JavaScript object by executing the named constructor.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE>protected void</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/mozilla/javascript/Context.html#observeInstructionCount(int)">observeInstructionCount</A></B>(int instructionCount)</CODE> + +<BR> + Allow application to monitor counter of executed script instructions + in Context subclasses.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE> void</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/mozilla/javascript/Context.html#putThreadLocal(java.lang.Object, java.lang.Object)">putThreadLocal</A></B>(java.lang.Object key, + java.lang.Object value)</CODE> + +<BR> + Put a value that can later be retrieved using a given key.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE> void</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/mozilla/javascript/Context.html#removeActivationName(java.lang.String)">removeActivationName</A></B>(java.lang.String name)</CODE> + +<BR> + Remove a name from the list of names forcing the creation of real + activation objects for functions.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE>static void</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/mozilla/javascript/Context.html#removeContextListener(org.mozilla.javascript.ContextListener)">removeContextListener</A></B>(org.mozilla.javascript.ContextListener listener)</CODE> + +<BR> + <B>Deprecated.</B> <I></I> </TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE> void</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/mozilla/javascript/Context.html#removePropertyChangeListener(java.beans.PropertyChangeListener)">removePropertyChangeListener</A></B>(java.beans.PropertyChangeListener l)</CODE> + +<BR> + Remove an object from the list of objects registered to receive + notification of changes to a bounded property</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE> void</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/mozilla/javascript/Context.html#removeThreadLocal(java.lang.Object)">removeThreadLocal</A></B>(java.lang.Object key)</CODE> + +<BR> + Remove values from thread-local storage.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE>static void</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/mozilla/javascript/Context.html#reportError(java.lang.String)">reportError</A></B>(java.lang.String message)</CODE> + +<BR> + Report an error using the error reporter for the current thread.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE>static void</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/mozilla/javascript/Context.html#reportError(java.lang.String, java.lang.String, int, java.lang.String, int)">reportError</A></B>(java.lang.String message, + java.lang.String sourceName, + int lineno, + java.lang.String lineSource, + int lineOffset)</CODE> + +<BR> + Report an error using the error reporter for the current thread.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE>static <A HREF="../../../org/mozilla/javascript/EvaluatorException.html" title="class in org.mozilla.javascript">EvaluatorException</A></CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/mozilla/javascript/Context.html#reportRuntimeError(java.lang.String)">reportRuntimeError</A></B>(java.lang.String message)</CODE> + +<BR> + Report a runtime error using the error reporter for the current thread.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE>static <A HREF="../../../org/mozilla/javascript/EvaluatorException.html" title="class in org.mozilla.javascript">EvaluatorException</A></CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/mozilla/javascript/Context.html#reportRuntimeError(java.lang.String, java.lang.String, int, java.lang.String, int)">reportRuntimeError</A></B>(java.lang.String message, + java.lang.String sourceName, + int lineno, + java.lang.String lineSource, + int lineOffset)</CODE> + +<BR> + Report a runtime error using the error reporter for the current thread.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE>static void</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/mozilla/javascript/Context.html#reportWarning(java.lang.String)">reportWarning</A></B>(java.lang.String message)</CODE> + +<BR> + Report a warning using the error reporter for the current thread.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE>static void</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/mozilla/javascript/Context.html#reportWarning(java.lang.String, java.lang.String, int, java.lang.String, int)">reportWarning</A></B>(java.lang.String message, + java.lang.String sourceName, + int lineno, + java.lang.String lineSource, + int lineOffset)</CODE> + +<BR> + Report a warning using the error reporter for the current thread.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE>static void</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/mozilla/javascript/Context.html#reportWarning(java.lang.String, java.lang.Throwable)">reportWarning</A></B>(java.lang.String message, + java.lang.Throwable t)</CODE> + +<BR> + </TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE> void</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/mozilla/javascript/Context.html#seal(java.lang.Object)">seal</A></B>(java.lang.Object sealKey)</CODE> + +<BR> + Seal this Context object so any attempt to modify any of its properties + including calling <A HREF="../../../org/mozilla/javascript/Context.html#enter()"><CODE>enter()</CODE></A> and <A HREF="../../../org/mozilla/javascript/Context.html#exit()"><CODE>exit()</CODE></A> methods will + throw an exception.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE> void</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/mozilla/javascript/Context.html#setApplicationClassLoader(java.lang.ClassLoader)">setApplicationClassLoader</A></B>(java.lang.ClassLoader loader)</CODE> + +<BR> + </TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE>static void</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/mozilla/javascript/Context.html#setCachingEnabled(boolean)">setCachingEnabled</A></B>(boolean cachingEnabled)</CODE> + +<BR> + <B>Deprecated.</B> <I></I> </TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE> void</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/mozilla/javascript/Context.html#setClassShutter(org.mozilla.javascript.ClassShutter)">setClassShutter</A></B>(<A HREF="../../../org/mozilla/javascript/ClassShutter.html" title="interface in org.mozilla.javascript">ClassShutter</A> shutter)</CODE> + +<BR> + Set the LiveConnect access filter for this context.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE> void</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/mozilla/javascript/Context.html#setCompileFunctionsWithDynamicScope(boolean)">setCompileFunctionsWithDynamicScope</A></B>(boolean flag)</CODE> + +<BR> + <B>Deprecated.</B> <I></I> </TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE> void</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/mozilla/javascript/Context.html#setDebugger(org.mozilla.javascript.debug.Debugger, java.lang.Object)">setDebugger</A></B>(org.mozilla.javascript.debug.Debugger debugger, + java.lang.Object contextData)</CODE> + +<BR> + Set the associated debugger.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE> <A HREF="../../../org/mozilla/javascript/ErrorReporter.html" title="interface in org.mozilla.javascript">ErrorReporter</A></CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/mozilla/javascript/Context.html#setErrorReporter(org.mozilla.javascript.ErrorReporter)">setErrorReporter</A></B>(<A HREF="../../../org/mozilla/javascript/ErrorReporter.html" title="interface in org.mozilla.javascript">ErrorReporter</A> reporter)</CODE> + +<BR> + Change the current error reporter.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE> void</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/mozilla/javascript/Context.html#setGenerateObserverCount(boolean)">setGenerateObserverCount</A></B>(boolean generateObserverCount)</CODE> + +<BR> + Turn on or off generation of code with callbacks to + track the count of executed instructions.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE> void</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/mozilla/javascript/Context.html#setGeneratingDebug(boolean)">setGeneratingDebug</A></B>(boolean generatingDebug)</CODE> + +<BR> + Specify whether or not debug information should be generated.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE> void</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/mozilla/javascript/Context.html#setGeneratingSource(boolean)">setGeneratingSource</A></B>(boolean generatingSource)</CODE> + +<BR> + Specify whether or not source information should be generated.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE> void</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/mozilla/javascript/Context.html#setInstructionObserverThreshold(int)">setInstructionObserverThreshold</A></B>(int threshold)</CODE> + +<BR> + Set threshold of executed instructions counter that triggers call to + <code>observeInstructionCount()</code>.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE> void</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/mozilla/javascript/Context.html#setLanguageVersion(int)">setLanguageVersion</A></B>(int version)</CODE> + +<BR> + Set the language version.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE> java.util.Locale</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/mozilla/javascript/Context.html#setLocale(java.util.Locale)">setLocale</A></B>(java.util.Locale loc)</CODE> + +<BR> + Set the current locale.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE> void</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/mozilla/javascript/Context.html#setMaximumInterpreterStackDepth(int)">setMaximumInterpreterStackDepth</A></B>(int max)</CODE> + +<BR> + Sets the maximum stack depth (in terms of number of call frames) + allowed in a single invocation of interpreter.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE> void</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/mozilla/javascript/Context.html#setOptimizationLevel(int)">setOptimizationLevel</A></B>(int optimizationLevel)</CODE> + +<BR> + Set the current optimization level.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE> void</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/mozilla/javascript/Context.html#setSecurityController(org.mozilla.javascript.SecurityController)">setSecurityController</A></B>(<A HREF="../../../org/mozilla/javascript/SecurityController.html" title="class in org.mozilla.javascript">SecurityController</A> controller)</CODE> + +<BR> + Set the security controller for this context.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE> void</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/mozilla/javascript/Context.html#setWrapFactory(org.mozilla.javascript.WrapFactory)">setWrapFactory</A></B>(<A HREF="../../../org/mozilla/javascript/WrapFactory.html" title="class in org.mozilla.javascript">WrapFactory</A> wrapFactory)</CODE> + +<BR> + Set a WrapFactory for this Context.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE> boolean</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/mozilla/javascript/Context.html#stringIsCompilableUnit(java.lang.String)">stringIsCompilableUnit</A></B>(java.lang.String source)</CODE> + +<BR> + Check whether a string is ready to be compiled.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE>static java.lang.RuntimeException</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/mozilla/javascript/Context.html#throwAsScriptRuntimeEx(java.lang.Throwable)">throwAsScriptRuntimeEx</A></B>(java.lang.Throwable e)</CODE> + +<BR> + Rethrow the exception wrapping it as the script runtime exception.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE>static boolean</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/mozilla/javascript/Context.html#toBoolean(java.lang.Object)">toBoolean</A></B>(java.lang.Object value)</CODE> + +<BR> + Convert the value to a JavaScript boolean value.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE>static double</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/mozilla/javascript/Context.html#toNumber(java.lang.Object)">toNumber</A></B>(java.lang.Object value)</CODE> + +<BR> + Convert the value to a JavaScript Number value.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE>static <A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A></CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/mozilla/javascript/Context.html#toObject(java.lang.Object, org.mozilla.javascript.Scriptable)">toObject</A></B>(java.lang.Object value, + <A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> scope)</CODE> + +<BR> + Convert the value to an JavaScript object value.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE>static <A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A></CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/mozilla/javascript/Context.html#toObject(java.lang.Object, org.mozilla.javascript.Scriptable, java.lang.Class)">toObject</A></B>(java.lang.Object value, + <A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> scope, + java.lang.Class staticType)</CODE> + +<BR> + <B>Deprecated.</B> <I></I> </TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE>static java.lang.String</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/mozilla/javascript/Context.html#toString(java.lang.Object)">toString</A></B>(java.lang.Object value)</CODE> + +<BR> + Convert the value to a JavaScript String value.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE>static java.lang.Object</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/mozilla/javascript/Context.html#toType(java.lang.Object, java.lang.Class)">toType</A></B>(java.lang.Object value, + java.lang.Class desiredType)</CODE> + +<BR> + <B>Deprecated.</B> <I></I> </TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE> void</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../org/mozilla/javascript/Context.html#unseal(java.lang.Object)">unseal</A></B>(java.lang.Object sealKey)</CODE> + +<BR> + Unseal previously sealed Context object.</TD> +</TR> +</TABLE> + <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> +<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> +<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> +<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD> +</TR> +</TABLE> + +<P> + +<!-- ============ FIELD DETAIL =========== --> + +<A NAME="field_detail"><!-- --></A> +<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> +<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> +<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> +<B>Field Detail</B></FONT></TH> +</TR> +</TABLE> + +<A NAME="VERSION_UNKNOWN"><!-- --></A><H3> +VERSION_UNKNOWN</H3> +<PRE> +public static final int <B>VERSION_UNKNOWN</B></PRE> +<DL> +<DD>The unknown version. +<P> +<DL> +<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#org.mozilla.javascript.Context.VERSION_UNKNOWN">Constant Field Values</A></DL> +</DL> +<HR> + +<A NAME="VERSION_DEFAULT"><!-- --></A><H3> +VERSION_DEFAULT</H3> +<PRE> +public static final int <B>VERSION_DEFAULT</B></PRE> +<DL> +<DD>The default version. +<P> +<DL> +<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#org.mozilla.javascript.Context.VERSION_DEFAULT">Constant Field Values</A></DL> +</DL> +<HR> + +<A NAME="VERSION_1_0"><!-- --></A><H3> +VERSION_1_0</H3> +<PRE> +public static final int <B>VERSION_1_0</B></PRE> +<DL> +<DD>JavaScript 1.0 +<P> +<DL> +<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#org.mozilla.javascript.Context.VERSION_1_0">Constant Field Values</A></DL> +</DL> +<HR> + +<A NAME="VERSION_1_1"><!-- --></A><H3> +VERSION_1_1</H3> +<PRE> +public static final int <B>VERSION_1_1</B></PRE> +<DL> +<DD>JavaScript 1.1 +<P> +<DL> +<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#org.mozilla.javascript.Context.VERSION_1_1">Constant Field Values</A></DL> +</DL> +<HR> + +<A NAME="VERSION_1_2"><!-- --></A><H3> +VERSION_1_2</H3> +<PRE> +public static final int <B>VERSION_1_2</B></PRE> +<DL> +<DD>JavaScript 1.2 +<P> +<DL> +<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#org.mozilla.javascript.Context.VERSION_1_2">Constant Field Values</A></DL> +</DL> +<HR> + +<A NAME="VERSION_1_3"><!-- --></A><H3> +VERSION_1_3</H3> +<PRE> +public static final int <B>VERSION_1_3</B></PRE> +<DL> +<DD>JavaScript 1.3 +<P> +<DL> +<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#org.mozilla.javascript.Context.VERSION_1_3">Constant Field Values</A></DL> +</DL> +<HR> + +<A NAME="VERSION_1_4"><!-- --></A><H3> +VERSION_1_4</H3> +<PRE> +public static final int <B>VERSION_1_4</B></PRE> +<DL> +<DD>JavaScript 1.4 +<P> +<DL> +<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#org.mozilla.javascript.Context.VERSION_1_4">Constant Field Values</A></DL> +</DL> +<HR> + +<A NAME="VERSION_1_5"><!-- --></A><H3> +VERSION_1_5</H3> +<PRE> +public static final int <B>VERSION_1_5</B></PRE> +<DL> +<DD>JavaScript 1.5 +<P> +<DL> +<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#org.mozilla.javascript.Context.VERSION_1_5">Constant Field Values</A></DL> +</DL> +<HR> + +<A NAME="VERSION_1_6"><!-- --></A><H3> +VERSION_1_6</H3> +<PRE> +public static final int <B>VERSION_1_6</B></PRE> +<DL> +<DD>JavaScript 1.6 +<P> +<DL> +<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#org.mozilla.javascript.Context.VERSION_1_6">Constant Field Values</A></DL> +</DL> +<HR> + +<A NAME="VERSION_1_7"><!-- --></A><H3> +VERSION_1_7</H3> +<PRE> +public static final int <B>VERSION_1_7</B></PRE> +<DL> +<DD>JavaScript 1.7 +<P> +<DL> +<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#org.mozilla.javascript.Context.VERSION_1_7">Constant Field Values</A></DL> +</DL> +<HR> + +<A NAME="FEATURE_NON_ECMA_GET_YEAR"><!-- --></A><H3> +FEATURE_NON_ECMA_GET_YEAR</H3> +<PRE> +public static final int <B>FEATURE_NON_ECMA_GET_YEAR</B></PRE> +<DL> +<DD>Controls behaviour of <tt>Date.prototype.getYear()</tt>. + If <tt>hasFeature(FEATURE_NON_ECMA_GET_YEAR)</tt> returns true, + Date.prototype.getYear subtructs 1900 only if 1900 <= date < 2000. + The default behavior of <A HREF="../../../org/mozilla/javascript/Context.html#hasFeature(int)"><CODE>hasFeature(int)</CODE></A> is always to subtruct + 1900 as rquired by ECMAScript B.2.4. +<P> +<DL> +<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#org.mozilla.javascript.Context.FEATURE_NON_ECMA_GET_YEAR">Constant Field Values</A></DL> +</DL> +<HR> + +<A NAME="FEATURE_MEMBER_EXPR_AS_FUNCTION_NAME"><!-- --></A><H3> +FEATURE_MEMBER_EXPR_AS_FUNCTION_NAME</H3> +<PRE> +public static final int <B>FEATURE_MEMBER_EXPR_AS_FUNCTION_NAME</B></PRE> +<DL> +<DD>Control if member expression as function name extension is available. + If <tt>hasFeature(FEATURE_MEMBER_EXPR_AS_FUNCTION_NAME)</tt> returns + true, allow <tt>function memberExpression(args) { body }</tt> to be + syntax sugar for <tt>memberExpression = function(args) { body }</tt>, + when memberExpression is not a simple identifier. + See ECMAScript-262, section 11.2 for definition of memberExpression. + By default <A HREF="../../../org/mozilla/javascript/Context.html#hasFeature(int)"><CODE>hasFeature(int)</CODE></A> returns false. +<P> +<DL> +<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#org.mozilla.javascript.Context.FEATURE_MEMBER_EXPR_AS_FUNCTION_NAME">Constant Field Values</A></DL> +</DL> +<HR> + +<A NAME="FEATURE_RESERVED_KEYWORD_AS_IDENTIFIER"><!-- --></A><H3> +FEATURE_RESERVED_KEYWORD_AS_IDENTIFIER</H3> +<PRE> +public static final int <B>FEATURE_RESERVED_KEYWORD_AS_IDENTIFIER</B></PRE> +<DL> +<DD>Control if reserved keywords are treated as identifiers. + If <tt>hasFeature(RESERVED_KEYWORD_AS_IDENTIFIER)</tt> returns true, + treat future reserved keyword (see Ecma-262, section 7.5.3) as ordinary + identifiers but warn about this usage. + + By default <A HREF="../../../org/mozilla/javascript/Context.html#hasFeature(int)"><CODE>hasFeature(int)</CODE></A> returns false. +<P> +<DL> +<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#org.mozilla.javascript.Context.FEATURE_RESERVED_KEYWORD_AS_IDENTIFIER">Constant Field Values</A></DL> +</DL> +<HR> + +<A NAME="FEATURE_TO_STRING_AS_SOURCE"><!-- --></A><H3> +FEATURE_TO_STRING_AS_SOURCE</H3> +<PRE> +public static final int <B>FEATURE_TO_STRING_AS_SOURCE</B></PRE> +<DL> +<DD>Control if <tt>toString()</tt> should returns the same result + as <tt>toSource()</tt> when applied to objects and arrays. + If <tt>hasFeature(FEATURE_TO_STRING_AS_SOURCE)</tt> returns true, + calling <tt>toString()</tt> on JS objects gives the same result as + calling <tt>toSource()</tt>. That is it returns JS source with code + to create an object with all enumeratable fields of the original object + instead of printing <tt>[object <i>result of + <A HREF="../../../org/mozilla/javascript/Scriptable.html#getClassName()"><CODE>Scriptable.getClassName()</CODE></A></i>]</tt>. + <p> + By default <A HREF="../../../org/mozilla/javascript/Context.html#hasFeature(int)"><CODE>hasFeature(int)</CODE></A> returns true only if + the current JS version is set to <A HREF="../../../org/mozilla/javascript/Context.html#VERSION_1_2"><CODE>VERSION_1_2</CODE></A>. +<P> +<DL> +<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#org.mozilla.javascript.Context.FEATURE_TO_STRING_AS_SOURCE">Constant Field Values</A></DL> +</DL> +<HR> + +<A NAME="FEATURE_PARENT_PROTO_PROPERTIES"><!-- --></A><H3> +FEATURE_PARENT_PROTO_PROPERTIES</H3> +<PRE> +public static final int <B>FEATURE_PARENT_PROTO_PROPERTIES</B></PRE> +<DL> +<DD>Control if properties <tt>__proto__</tt> and <tt>__parent__</tt> + are treated specially. + If <tt>hasFeature(FEATURE_PARENT_PROTO_PROPERTIES)</tt> returns true, + treat <tt>__parent__</tt> and <tt>__proto__</tt> as special properties. + <p> + The properties allow to query and set scope and prototype chains for the + objects. The special meaning of the properties is available + only when they are used as the right hand side of the dot operator. + For example, while <tt>x.__proto__ = y</tt> changes the prototype + chain of the object <tt>x</tt> to point to <tt>y</tt>, + <tt>x["__proto__"] = y</tt> simply assigns a new value to the property + <tt>__proto__</tt> in <tt>x</tt> even when the feature is on. + + By default <A HREF="../../../org/mozilla/javascript/Context.html#hasFeature(int)"><CODE>hasFeature(int)</CODE></A> returns true. +<P> +<DL> +<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#org.mozilla.javascript.Context.FEATURE_PARENT_PROTO_PROPERTIES">Constant Field Values</A></DL> +</DL> +<HR> + +<A NAME="FEATURE_PARENT_PROTO_PROPRTIES"><!-- --></A><H3> +FEATURE_PARENT_PROTO_PROPRTIES</H3> +<PRE> +public static final int <B>FEATURE_PARENT_PROTO_PROPRTIES</B></PRE> +<DL> +<DD><B>Deprecated.</B> <I>In previous releases, this name was given to + FEATURE_PARENT_PROTO_PROPERTIES.</I><DL> +<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#org.mozilla.javascript.Context.FEATURE_PARENT_PROTO_PROPRTIES">Constant Field Values</A></DL> +</DL> +<HR> + +<A NAME="FEATURE_E4X"><!-- --></A><H3> +FEATURE_E4X</H3> +<PRE> +public static final int <B>FEATURE_E4X</B></PRE> +<DL> +<DD>Control if support for E4X(ECMAScript for XML) extension is available. + If hasFeature(FEATURE_E4X) returns true, the XML syntax is available. + <p> + By default <A HREF="../../../org/mozilla/javascript/Context.html#hasFeature(int)"><CODE>hasFeature(int)</CODE></A> returns true if + the current JS version is set to <A HREF="../../../org/mozilla/javascript/Context.html#VERSION_DEFAULT"><CODE>VERSION_DEFAULT</CODE></A> + or is at least <A HREF="../../../org/mozilla/javascript/Context.html#VERSION_1_6"><CODE>VERSION_1_6</CODE></A>. +<P> +<DL> +<DT><B>Since:</B></DT> + <DD>1.6 Release 1</DD> +<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#org.mozilla.javascript.Context.FEATURE_E4X">Constant Field Values</A></DL> +</DL> +<HR> + +<A NAME="FEATURE_DYNAMIC_SCOPE"><!-- --></A><H3> +FEATURE_DYNAMIC_SCOPE</H3> +<PRE> +public static final int <B>FEATURE_DYNAMIC_SCOPE</B></PRE> +<DL> +<DD>Control if dynamic scope should be used for name access. + If hasFeature(FEATURE_DYNAMIC_SCOPE) returns true, then the name lookup + during name resolution will use the top scope of the script or function + which is at the top of JS execution stack instead of the top scope of the + script or function from the current stack frame if the top scope of + the top stack frame contains the top scope of the current stack frame + on its prototype chain. + <p> + This is useful to define shared scope containing functions that can + be called from scripts and functions using private scopes. + <p> + By default <A HREF="../../../org/mozilla/javascript/Context.html#hasFeature(int)"><CODE>hasFeature(int)</CODE></A> returns false. +<P> +<DL> +<DT><B>Since:</B></DT> + <DD>1.6 Release 1</DD> +<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#org.mozilla.javascript.Context.FEATURE_DYNAMIC_SCOPE">Constant Field Values</A></DL> +</DL> +<HR> + +<A NAME="FEATURE_STRICT_VARS"><!-- --></A><H3> +FEATURE_STRICT_VARS</H3> +<PRE> +public static final int <B>FEATURE_STRICT_VARS</B></PRE> +<DL> +<DD>Control if strict variable mode is enabled. + When the feature is on Rhino reports runtime errors if assignment + to a global variable that does not exist is executed. When the feature + is off such assignments creates new variable in the global scope as + required by ECMA 262. + <p> + By default <A HREF="../../../org/mozilla/javascript/Context.html#hasFeature(int)"><CODE>hasFeature(int)</CODE></A> returns false. +<P> +<DL> +<DT><B>Since:</B></DT> + <DD>1.6 Release 1</DD> +<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#org.mozilla.javascript.Context.FEATURE_STRICT_VARS">Constant Field Values</A></DL> +</DL> +<HR> + +<A NAME="FEATURE_STRICT_EVAL"><!-- --></A><H3> +FEATURE_STRICT_EVAL</H3> +<PRE> +public static final int <B>FEATURE_STRICT_EVAL</B></PRE> +<DL> +<DD>Control if strict eval mode is enabled. + When the feature is on Rhino reports runtime errors if non-string + argument is passed to the eval function. When the feature is off + eval simply return non-string argument as is without performing any + evaluation as required by ECMA 262. + <p> + By default <A HREF="../../../org/mozilla/javascript/Context.html#hasFeature(int)"><CODE>hasFeature(int)</CODE></A> returns false. +<P> +<DL> +<DT><B>Since:</B></DT> + <DD>1.6 Release 1</DD> +<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#org.mozilla.javascript.Context.FEATURE_STRICT_EVAL">Constant Field Values</A></DL> +</DL> +<HR> + +<A NAME="FEATURE_LOCATION_INFORMATION_IN_ERROR"><!-- --></A><H3> +FEATURE_LOCATION_INFORMATION_IN_ERROR</H3> +<PRE> +public static final int <B>FEATURE_LOCATION_INFORMATION_IN_ERROR</B></PRE> +<DL> +<DD>When the feature is on Rhino will add a "fileName" and "lineNumber" + properties to Error objects automatically. When the feature is off, you + have to explicitly pass them as the second and third argument to the + Error constructor. Note that neither behaviour is fully ECMA 262 + compliant (as 262 doesn't specify a three-arg constructor), but keeping + the feature off results in Error objects that don't have + additional non-ECMA properties when constructed using the ECMA-defined + single-arg constructor and is thus desirable if a stricter ECMA + compliance is desired, specifically adherence to the point 15.11.5. of + the standard. + <p> + By default <A HREF="../../../org/mozilla/javascript/Context.html#hasFeature(int)"><CODE>hasFeature(int)</CODE></A> returns false. +<P> +<DL> +<DT><B>Since:</B></DT> + <DD>1.6 Release 6</DD> +<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#org.mozilla.javascript.Context.FEATURE_LOCATION_INFORMATION_IN_ERROR">Constant Field Values</A></DL> +</DL> +<HR> + +<A NAME="FEATURE_STRICT_MODE"><!-- --></A><H3> +FEATURE_STRICT_MODE</H3> +<PRE> +public static final int <B>FEATURE_STRICT_MODE</B></PRE> +<DL> +<DD>Controls whether JS 1.5 'strict mode' is enabled. + When the feature is on, Rhino reports more than a dozen different + warnings. When the feature is off, these warnings are not generated. + FEATURE_STRICT_MODE implies FEATURE_STRICT_VARS and FEATURE_STRICT_EVAL. + <p> + By default <A HREF="../../../org/mozilla/javascript/Context.html#hasFeature(int)"><CODE>hasFeature(int)</CODE></A> returns false. +<P> +<DL> +<DT><B>Since:</B></DT> + <DD>1.6 Release 6</DD> +<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#org.mozilla.javascript.Context.FEATURE_STRICT_MODE">Constant Field Values</A></DL> +</DL> +<HR> + +<A NAME="FEATURE_WARNING_AS_ERROR"><!-- --></A><H3> +FEATURE_WARNING_AS_ERROR</H3> +<PRE> +public static final int <B>FEATURE_WARNING_AS_ERROR</B></PRE> +<DL> +<DD>Controls whether a warning should be treated as an error. +<P> +<DL> +<DT><B>Since:</B></DT> + <DD>1.6 Release 6</DD> +<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#org.mozilla.javascript.Context.FEATURE_WARNING_AS_ERROR">Constant Field Values</A></DL> +</DL> +<HR> + +<A NAME="FEATURE_ENHANCED_JAVA_ACCESS"><!-- --></A><H3> +FEATURE_ENHANCED_JAVA_ACCESS</H3> +<PRE> +public static final int <B>FEATURE_ENHANCED_JAVA_ACCESS</B></PRE> +<DL> +<DD>Enables enhanced access to Java. + Specifically, controls whether private and protected members can be + accessed, and whether scripts can catch all Java exceptions. + <p> + Note that this feature should only be enabled for trusted scripts. + <p> + By default <A HREF="../../../org/mozilla/javascript/Context.html#hasFeature(int)"><CODE>hasFeature(int)</CODE></A> returns false. +<P> +<DL> +<DT><B>Since:</B></DT> + <DD>1.7 Release 1</DD> +<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#org.mozilla.javascript.Context.FEATURE_ENHANCED_JAVA_ACCESS">Constant Field Values</A></DL> +</DL> +<HR> + +<A NAME="languageVersionProperty"><!-- --></A><H3> +languageVersionProperty</H3> +<PRE> +public static final java.lang.String <B>languageVersionProperty</B></PRE> +<DL> +<DL> +<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#org.mozilla.javascript.Context.languageVersionProperty">Constant Field Values</A></DL> +</DL> +<HR> + +<A NAME="errorReporterProperty"><!-- --></A><H3> +errorReporterProperty</H3> +<PRE> +public static final java.lang.String <B>errorReporterProperty</B></PRE> +<DL> +<DL> +<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#org.mozilla.javascript.Context.errorReporterProperty">Constant Field Values</A></DL> +</DL> +<HR> + +<A NAME="emptyArgs"><!-- --></A><H3> +emptyArgs</H3> +<PRE> +public static final java.lang.Object[] <B>emptyArgs</B></PRE> +<DL> +<DD>Convenient value to use as zero-length array of objects. +<P> +<DL> +</DL> +</DL> +<HR> + +<A NAME="generateObserverCount"><!-- --></A><H3> +generateObserverCount</H3> +<PRE> +public boolean <B>generateObserverCount</B></PRE> +<DL> +<DL> +</DL> +</DL> + +<!-- ========= CONSTRUCTOR DETAIL ======== --> + +<A NAME="constructor_detail"><!-- --></A> +<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> +<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> +<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> +<B>Constructor Detail</B></FONT></TH> +</TR> +</TABLE> + +<A NAME="Context()"><!-- --></A><H3> +Context</H3> +<PRE> +public <B>Context</B>()</PRE> +<DL> +<DD><B>Deprecated.</B> <I>use <A HREF="../../../org/mozilla/javascript/ContextFactory.html#enter()"><CODE>ContextFactory.enter()</CODE></A> or + <A HREF="../../../org/mozilla/javascript/ContextFactory.html#call(org.mozilla.javascript.ContextAction)"><CODE>ContextFactory.call(ContextAction)</CODE></A> instead.</I> +<P> +<DD>Create a new Context. + + Note that the Context must be associated with a thread before + it can be used to execute a script. +<P> +</DL> + +<!-- ============ METHOD DETAIL ========== --> + +<A NAME="method_detail"><!-- --></A> +<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> +<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> +<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> +<B>Method Detail</B></FONT></TH> +</TR> +</TABLE> + +<A NAME="getCurrentContext()"><!-- --></A><H3> +getCurrentContext</H3> +<PRE> +public static <A HREF="../../../org/mozilla/javascript/Context.html" title="class in org.mozilla.javascript">Context</A> <B>getCurrentContext</B>()</PRE> +<DL> +<DD>Get the current Context. + + The current Context is per-thread; this method looks up + the Context associated with the current thread. <p> +<P> +<DD><DL> + +<DT><B>Returns:</B><DD>the Context associated with the current thread, or + null if no context is associated with the current + thread.<DT><B>See Also:</B><DD><A HREF="../../../org/mozilla/javascript/ContextFactory.html#enterContext()"><CODE>ContextFactory.enterContext()</CODE></A>, +<A HREF="../../../org/mozilla/javascript/ContextFactory.html#call(org.mozilla.javascript.ContextAction)"><CODE>ContextFactory.call(ContextAction)</CODE></A></DL> +</DD> +</DL> +<HR> + +<A NAME="enter()"><!-- --></A><H3> +enter</H3> +<PRE> +public static <A HREF="../../../org/mozilla/javascript/Context.html" title="class in org.mozilla.javascript">Context</A> <B>enter</B>()</PRE> +<DL> +<DD><B>Deprecated.</B> <I>use <A HREF="../../../org/mozilla/javascript/ContextFactory.html#enter()"><CODE>ContextFactory.enter()</CODE></A> or + <A HREF="../../../org/mozilla/javascript/ContextFactory.html#call(org.mozilla.javascript.ContextAction)"><CODE>ContextFactory.call(ContextAction)</CODE></A> instead as this method relies + on usage of a static singleton "global" ContextFactory.</I> +<P> +<DD>Same as calling <A HREF="../../../org/mozilla/javascript/ContextFactory.html#enterContext()"><CODE>ContextFactory.enterContext()</CODE></A> on the global + ContextFactory instance. +<P> +<DD><DL> + +<DT><B>Returns:</B><DD>a Context associated with the current thread<DT><B>See Also:</B><DD><A HREF="../../../org/mozilla/javascript/Context.html#getCurrentContext()"><CODE>getCurrentContext()</CODE></A>, +<A HREF="../../../org/mozilla/javascript/Context.html#exit()"><CODE>exit()</CODE></A>, +<A HREF="../../../org/mozilla/javascript/Context.html#call(org.mozilla.javascript.ContextAction)"><CODE>call(ContextAction)</CODE></A></DL> +</DD> +</DL> +<HR> + +<A NAME="enter(org.mozilla.javascript.Context)"><!-- --></A><H3> +enter</H3> +<PRE> +public static <A HREF="../../../org/mozilla/javascript/Context.html" title="class in org.mozilla.javascript">Context</A> <B>enter</B>(<A HREF="../../../org/mozilla/javascript/Context.html" title="class in org.mozilla.javascript">Context</A> cx)</PRE> +<DL> +<DD><B>Deprecated.</B> <I>use <A HREF="../../../org/mozilla/javascript/ContextFactory.html#enterContext(org.mozilla.javascript.Context)"><CODE>ContextFactory.enterContext(Context)</CODE></A> instead as + this method relies on usage of a static singleton "global" ContextFactory.</I> +<P> +<DD>Get a Context associated with the current thread, using + the given Context if need be. + <p> + The same as <code>enter()</code> except that <code>cx</code> + is associated with the current thread and returned if + the current thread has no associated context and <code>cx</code> + is not associated with any other thread. +<P> +<DD><DL> +<DT><B>Parameters:</B><DD><CODE>cx</CODE> - a Context to associate with the thread if possible +<DT><B>Returns:</B><DD>a Context associated with the current thread<DT><B>See Also:</B><DD><A HREF="../../../org/mozilla/javascript/ContextFactory.html#enterContext(org.mozilla.javascript.Context)"><CODE>ContextFactory.enterContext(Context)</CODE></A>, +<A HREF="../../../org/mozilla/javascript/ContextFactory.html#call(org.mozilla.javascript.ContextAction)"><CODE>ContextFactory.call(ContextAction)</CODE></A></DL> +</DD> +</DL> +<HR> + +<A NAME="exit()"><!-- --></A><H3> +exit</H3> +<PRE> +public static void <B>exit</B>()</PRE> +<DL> +<DD>Exit a block of code requiring a Context. + + Calling <code>exit()</code> will remove the association between + the current thread and a Context if the prior call to + <A HREF="../../../org/mozilla/javascript/ContextFactory.html#enterContext()"><CODE>ContextFactory.enterContext()</CODE></A> on this thread newly associated a + Context with this thread. Once the current thread no longer has an + associated Context, it cannot be used to execute JavaScript until it is + again associated with a Context. +<P> +<DD><DL> +<DT><B>See Also:</B><DD><A HREF="../../../org/mozilla/javascript/ContextFactory.html#enterContext()"><CODE>ContextFactory.enterContext()</CODE></A></DL> +</DD> +</DL> +<HR> + +<A NAME="call(org.mozilla.javascript.ContextAction)"><!-- --></A><H3> +call</H3> +<PRE> +public static java.lang.Object <B>call</B>(<A HREF="../../../org/mozilla/javascript/ContextAction.html" title="interface in org.mozilla.javascript">ContextAction</A> action)</PRE> +<DL> +<DD><B>Deprecated.</B> <I>use <A HREF="../../../org/mozilla/javascript/ContextFactory.html#call(org.mozilla.javascript.ContextAction)"><CODE>ContextFactory.call(ContextAction)</CODE></A> instead as + this method relies on usage of a static singleton "global" + ContextFactory.</I> +<P> +<DD>Call <A HREF="../../../org/mozilla/javascript/ContextAction.html#run(org.mozilla.javascript.Context)"><CODE>ContextAction.run(Context cx)</CODE></A> + using the Context instance associated with the current thread. + If no Context is associated with the thread, then + <tt>ContextFactory.getGlobal().makeContext()</tt> will be called to + construct new Context instance. The instance will be temporary + associated with the thread during call to + <A HREF="../../../org/mozilla/javascript/ContextAction.html#run(org.mozilla.javascript.Context)"><CODE>ContextAction.run(Context)</CODE></A>. +<P> +<DD><DL> + +<DT><B>Returns:</B><DD>The result of <A HREF="../../../org/mozilla/javascript/ContextAction.html#run(org.mozilla.javascript.Context)"><CODE>ContextAction.run(Context)</CODE></A>.</DL> +</DD> +</DL> +<HR> + +<A NAME="call(org.mozilla.javascript.ContextFactory, org.mozilla.javascript.Callable, org.mozilla.javascript.Scriptable, org.mozilla.javascript.Scriptable, java.lang.Object[])"><!-- --></A><H3> +call</H3> +<PRE> +public static java.lang.Object <B>call</B>(<A HREF="../../../org/mozilla/javascript/ContextFactory.html" title="class in org.mozilla.javascript">ContextFactory</A> factory, + <A HREF="../../../org/mozilla/javascript/Callable.html" title="interface in org.mozilla.javascript">Callable</A> callable, + <A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> scope, + <A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> thisObj, + java.lang.Object[] args)</PRE> +<DL> +<DD>Call <A HREF="../../../org/mozilla/javascript/Callable.html#call(org.mozilla.javascript.Context, org.mozilla.javascript.Scriptable, org.mozilla.javascript.Scriptable, java.lang.Object[])"><CODE>Callable.call(Context cx, Scriptable scope, Scriptable thisObj, + Object[] args)</CODE></A> + using the Context instance associated with the current thread. + If no Context is associated with the thread, then + <A HREF="../../../org/mozilla/javascript/ContextFactory.html#makeContext()"><CODE>ContextFactory.makeContext()</CODE></A> will be called to construct + new Context instance. The instance will be temporary associated + with the thread during call to <A HREF="../../../org/mozilla/javascript/ContextAction.html#run(org.mozilla.javascript.Context)"><CODE>ContextAction.run(Context)</CODE></A>. + <p> + It is allowed but not advisable to use null for <tt>factory</tt> + argument in which case the global static singleton ContextFactory + instance will be used to create new context instances. +<P> +<DD><DL> +<DT><B>See Also:</B><DD><A HREF="../../../org/mozilla/javascript/ContextFactory.html#call(org.mozilla.javascript.ContextAction)"><CODE>ContextFactory.call(ContextAction)</CODE></A></DL> +</DD> +</DL> +<HR> + +<A NAME="addContextListener(org.mozilla.javascript.ContextListener)"><!-- --></A><H3> +addContextListener</H3> +<PRE> +public static void <B>addContextListener</B>(org.mozilla.javascript.ContextListener listener)</PRE> +<DL> +<DD><B>Deprecated.</B> <I></I> +<P> +<DD><DL> +<DT><B>See Also:</B><DD><A HREF="../../../org/mozilla/javascript/ContextFactory.html#addListener(org.mozilla.javascript.ContextFactory.Listener)"><CODE>ContextFactory.addListener(ContextFactory.Listener)</CODE></A>, +<A HREF="../../../org/mozilla/javascript/ContextFactory.html#getGlobal()"><CODE>ContextFactory.getGlobal()</CODE></A></DL> +</DD> +</DL> +<HR> + +<A NAME="removeContextListener(org.mozilla.javascript.ContextListener)"><!-- --></A><H3> +removeContextListener</H3> +<PRE> +public static void <B>removeContextListener</B>(org.mozilla.javascript.ContextListener listener)</PRE> +<DL> +<DD><B>Deprecated.</B> <I></I> +<P> +<DD><DL> +<DT><B>See Also:</B><DD><A HREF="../../../org/mozilla/javascript/ContextFactory.html#removeListener(org.mozilla.javascript.ContextFactory.Listener)"><CODE>ContextFactory.removeListener(ContextFactory.Listener)</CODE></A>, +<A HREF="../../../org/mozilla/javascript/ContextFactory.html#getGlobal()"><CODE>ContextFactory.getGlobal()</CODE></A></DL> +</DD> +</DL> +<HR> + +<A NAME="getFactory()"><!-- --></A><H3> +getFactory</H3> +<PRE> +public final <A HREF="../../../org/mozilla/javascript/ContextFactory.html" title="class in org.mozilla.javascript">ContextFactory</A> <B>getFactory</B>()</PRE> +<DL> +<DD>Return <A HREF="../../../org/mozilla/javascript/ContextFactory.html" title="class in org.mozilla.javascript"><CODE>ContextFactory</CODE></A> instance used to create this Context. +<P> +<DD><DL> +</DL> +</DD> +</DL> +<HR> + +<A NAME="isSealed()"><!-- --></A><H3> +isSealed</H3> +<PRE> +public final boolean <B>isSealed</B>()</PRE> +<DL> +<DD>Checks if this is a sealed Context. A sealed Context instance does not + allow to modify any of its properties and will throw an exception + on any such attempt. +<P> +<DD><DL> +<DT><B>See Also:</B><DD><A HREF="../../../org/mozilla/javascript/Context.html#seal(java.lang.Object)"><CODE>seal(Object sealKey)</CODE></A></DL> +</DD> +</DL> +<HR> + +<A NAME="seal(java.lang.Object)"><!-- --></A><H3> +seal</H3> +<PRE> +public final void <B>seal</B>(java.lang.Object sealKey)</PRE> +<DL> +<DD>Seal this Context object so any attempt to modify any of its properties + including calling <A HREF="../../../org/mozilla/javascript/Context.html#enter()"><CODE>enter()</CODE></A> and <A HREF="../../../org/mozilla/javascript/Context.html#exit()"><CODE>exit()</CODE></A> methods will + throw an exception. + <p> + If <tt>sealKey</tt> is not null, calling + <A HREF="../../../org/mozilla/javascript/Context.html#unseal(java.lang.Object)"><CODE>unseal(Object sealKey)</CODE></A> with the same key unseals + the object. If <tt>sealKey</tt> is null, unsealing is no longer possible. +<P> +<DD><DL> +<DT><B>See Also:</B><DD><A HREF="../../../org/mozilla/javascript/Context.html#isSealed()"><CODE>isSealed()</CODE></A>, +<A HREF="../../../org/mozilla/javascript/Context.html#unseal(java.lang.Object)"><CODE>unseal(Object)</CODE></A></DL> +</DD> +</DL> +<HR> + +<A NAME="unseal(java.lang.Object)"><!-- --></A><H3> +unseal</H3> +<PRE> +public final void <B>unseal</B>(java.lang.Object sealKey)</PRE> +<DL> +<DD>Unseal previously sealed Context object. + The <tt>sealKey</tt> argument should not be null and should match + <tt>sealKey</tt> suplied with the last call to + <A HREF="../../../org/mozilla/javascript/Context.html#seal(java.lang.Object)"><CODE>seal(Object)</CODE></A> or an exception will be thrown. +<P> +<DD><DL> +<DT><B>See Also:</B><DD><A HREF="../../../org/mozilla/javascript/Context.html#isSealed()"><CODE>isSealed()</CODE></A>, +<A HREF="../../../org/mozilla/javascript/Context.html#seal(java.lang.Object)"><CODE>seal(Object sealKey)</CODE></A></DL> +</DD> +</DL> +<HR> + +<A NAME="getLanguageVersion()"><!-- --></A><H3> +getLanguageVersion</H3> +<PRE> +public final int <B>getLanguageVersion</B>()</PRE> +<DL> +<DD>Get the current language version. + <p> + The language version number affects JavaScript semantics as detailed + in the overview documentation. +<P> +<DD><DL> + +<DT><B>Returns:</B><DD>an integer that is one of VERSION_1_0, VERSION_1_1, etc.</DL> +</DD> +</DL> +<HR> + +<A NAME="setLanguageVersion(int)"><!-- --></A><H3> +setLanguageVersion</H3> +<PRE> +public void <B>setLanguageVersion</B>(int version)</PRE> +<DL> +<DD>Set the language version. + + <p> + Setting the language version will affect functions and scripts compiled + subsequently. See the overview documentation for version-specific + behavior. +<P> +<DD><DL> +<DT><B>Parameters:</B><DD><CODE>version</CODE> - the version as specified by VERSION_1_0, VERSION_1_1, etc.</DL> +</DD> +</DL> +<HR> + +<A NAME="isValidLanguageVersion(int)"><!-- --></A><H3> +isValidLanguageVersion</H3> +<PRE> +public static boolean <B>isValidLanguageVersion</B>(int version)</PRE> +<DL> +<DD><DL> +</DL> +</DD> +</DL> +<HR> + +<A NAME="checkLanguageVersion(int)"><!-- --></A><H3> +checkLanguageVersion</H3> +<PRE> +public static void <B>checkLanguageVersion</B>(int version)</PRE> +<DL> +<DD><DL> +</DL> +</DD> +</DL> +<HR> + +<A NAME="getImplementationVersion()"><!-- --></A><H3> +getImplementationVersion</H3> +<PRE> +public final java.lang.String <B>getImplementationVersion</B>()</PRE> +<DL> +<DD>Get the implementation version. + + <p> + The implementation version is of the form + <pre> + "<i>name langVer</i> <code>release</code> <i>relNum date</i>" + </pre> + where <i>name</i> is the name of the product, <i>langVer</i> is + the language version, <i>relNum</i> is the release number, and + <i>date</i> is the release date for that specific + release in the form "yyyy mm dd". +<P> +<DD><DL> + +<DT><B>Returns:</B><DD>a string that encodes the product, language version, release + number, and date.</DL> +</DD> +</DL> +<HR> + +<A NAME="getErrorReporter()"><!-- --></A><H3> +getErrorReporter</H3> +<PRE> +public final <A HREF="../../../org/mozilla/javascript/ErrorReporter.html" title="interface in org.mozilla.javascript">ErrorReporter</A> <B>getErrorReporter</B>()</PRE> +<DL> +<DD>Get the current error reporter. +<P> +<DD><DL> +<DT><B>See Also:</B><DD><A HREF="../../../org/mozilla/javascript/ErrorReporter.html" title="interface in org.mozilla.javascript"><CODE>ErrorReporter</CODE></A></DL> +</DD> +</DL> +<HR> + +<A NAME="setErrorReporter(org.mozilla.javascript.ErrorReporter)"><!-- --></A><H3> +setErrorReporter</H3> +<PRE> +public final <A HREF="../../../org/mozilla/javascript/ErrorReporter.html" title="interface in org.mozilla.javascript">ErrorReporter</A> <B>setErrorReporter</B>(<A HREF="../../../org/mozilla/javascript/ErrorReporter.html" title="interface in org.mozilla.javascript">ErrorReporter</A> reporter)</PRE> +<DL> +<DD>Change the current error reporter. +<P> +<DD><DL> + +<DT><B>Returns:</B><DD>the previous error reporter<DT><B>See Also:</B><DD><A HREF="../../../org/mozilla/javascript/ErrorReporter.html" title="interface in org.mozilla.javascript"><CODE>ErrorReporter</CODE></A></DL> +</DD> +</DL> +<HR> + +<A NAME="getLocale()"><!-- --></A><H3> +getLocale</H3> +<PRE> +public final java.util.Locale <B>getLocale</B>()</PRE> +<DL> +<DD>Get the current locale. Returns the default locale if none has + been set. +<P> +<DD><DL> +<DT><B>See Also:</B><DD><CODE>Locale</CODE></DL> +</DD> +</DL> +<HR> + +<A NAME="setLocale(java.util.Locale)"><!-- --></A><H3> +setLocale</H3> +<PRE> +public final java.util.Locale <B>setLocale</B>(java.util.Locale loc)</PRE> +<DL> +<DD>Set the current locale. +<P> +<DD><DL> +<DT><B>See Also:</B><DD><CODE>Locale</CODE></DL> +</DD> +</DL> +<HR> + +<A NAME="addPropertyChangeListener(java.beans.PropertyChangeListener)"><!-- --></A><H3> +addPropertyChangeListener</H3> +<PRE> +public final void <B>addPropertyChangeListener</B>(java.beans.PropertyChangeListener l)</PRE> +<DL> +<DD>Register an object to receive notifications when a bound property + has changed +<P> +<DD><DL> +<DT><B>Parameters:</B><DD><CODE>l</CODE> - the listener<DT><B>See Also:</B><DD><CODE>PropertyChangeEvent</CODE>, +<A HREF="../../../org/mozilla/javascript/Context.html#removePropertyChangeListener(java.beans.PropertyChangeListener)"><CODE>removePropertyChangeListener(java.beans.PropertyChangeListener)</CODE></A></DL> +</DD> +</DL> +<HR> + +<A NAME="removePropertyChangeListener(java.beans.PropertyChangeListener)"><!-- --></A><H3> +removePropertyChangeListener</H3> +<PRE> +public final void <B>removePropertyChangeListener</B>(java.beans.PropertyChangeListener l)</PRE> +<DL> +<DD>Remove an object from the list of objects registered to receive + notification of changes to a bounded property +<P> +<DD><DL> +<DT><B>Parameters:</B><DD><CODE>l</CODE> - the listener<DT><B>See Also:</B><DD><CODE>PropertyChangeEvent</CODE>, +<A HREF="../../../org/mozilla/javascript/Context.html#addPropertyChangeListener(java.beans.PropertyChangeListener)"><CODE>addPropertyChangeListener(java.beans.PropertyChangeListener)</CODE></A></DL> +</DD> +</DL> +<HR> + +<A NAME="reportWarning(java.lang.String, java.lang.String, int, java.lang.String, int)"><!-- --></A><H3> +reportWarning</H3> +<PRE> +public static void <B>reportWarning</B>(java.lang.String message, + java.lang.String sourceName, + int lineno, + java.lang.String lineSource, + int lineOffset)</PRE> +<DL> +<DD>Report a warning using the error reporter for the current thread. +<P> +<DD><DL> +<DT><B>Parameters:</B><DD><CODE>message</CODE> - the warning message to report<DD><CODE>sourceName</CODE> - a string describing the source, such as a filename<DD><CODE>lineno</CODE> - the starting line number<DD><CODE>lineSource</CODE> - the text of the line (may be null)<DD><CODE>lineOffset</CODE> - the offset into lineSource where problem was detected<DT><B>See Also:</B><DD><A HREF="../../../org/mozilla/javascript/ErrorReporter.html" title="interface in org.mozilla.javascript"><CODE>ErrorReporter</CODE></A></DL> +</DD> +</DL> +<HR> + +<A NAME="reportWarning(java.lang.String)"><!-- --></A><H3> +reportWarning</H3> +<PRE> +public static void <B>reportWarning</B>(java.lang.String message)</PRE> +<DL> +<DD>Report a warning using the error reporter for the current thread. +<P> +<DD><DL> +<DT><B>Parameters:</B><DD><CODE>message</CODE> - the warning message to report<DT><B>See Also:</B><DD><A HREF="../../../org/mozilla/javascript/ErrorReporter.html" title="interface in org.mozilla.javascript"><CODE>ErrorReporter</CODE></A></DL> +</DD> +</DL> +<HR> + +<A NAME="reportWarning(java.lang.String, java.lang.Throwable)"><!-- --></A><H3> +reportWarning</H3> +<PRE> +public static void <B>reportWarning</B>(java.lang.String message, + java.lang.Throwable t)</PRE> +<DL> +<DD><DL> +</DL> +</DD> +</DL> +<HR> + +<A NAME="reportError(java.lang.String, java.lang.String, int, java.lang.String, int)"><!-- --></A><H3> +reportError</H3> +<PRE> +public static void <B>reportError</B>(java.lang.String message, + java.lang.String sourceName, + int lineno, + java.lang.String lineSource, + int lineOffset)</PRE> +<DL> +<DD>Report an error using the error reporter for the current thread. +<P> +<DD><DL> +<DT><B>Parameters:</B><DD><CODE>message</CODE> - the error message to report<DD><CODE>sourceName</CODE> - a string describing the source, such as a filename<DD><CODE>lineno</CODE> - the starting line number<DD><CODE>lineSource</CODE> - the text of the line (may be null)<DD><CODE>lineOffset</CODE> - the offset into lineSource where problem was detected<DT><B>See Also:</B><DD><A HREF="../../../org/mozilla/javascript/ErrorReporter.html" title="interface in org.mozilla.javascript"><CODE>ErrorReporter</CODE></A></DL> +</DD> +</DL> +<HR> + +<A NAME="reportError(java.lang.String)"><!-- --></A><H3> +reportError</H3> +<PRE> +public static void <B>reportError</B>(java.lang.String message)</PRE> +<DL> +<DD>Report an error using the error reporter for the current thread. +<P> +<DD><DL> +<DT><B>Parameters:</B><DD><CODE>message</CODE> - the error message to report<DT><B>See Also:</B><DD><A HREF="../../../org/mozilla/javascript/ErrorReporter.html" title="interface in org.mozilla.javascript"><CODE>ErrorReporter</CODE></A></DL> +</DD> +</DL> +<HR> + +<A NAME="reportRuntimeError(java.lang.String, java.lang.String, int, java.lang.String, int)"><!-- --></A><H3> +reportRuntimeError</H3> +<PRE> +public static <A HREF="../../../org/mozilla/javascript/EvaluatorException.html" title="class in org.mozilla.javascript">EvaluatorException</A> <B>reportRuntimeError</B>(java.lang.String message, + java.lang.String sourceName, + int lineno, + java.lang.String lineSource, + int lineOffset)</PRE> +<DL> +<DD>Report a runtime error using the error reporter for the current thread. +<P> +<DD><DL> +<DT><B>Parameters:</B><DD><CODE>message</CODE> - the error message to report<DD><CODE>sourceName</CODE> - a string describing the source, such as a filename<DD><CODE>lineno</CODE> - the starting line number<DD><CODE>lineSource</CODE> - the text of the line (may be null)<DD><CODE>lineOffset</CODE> - the offset into lineSource where problem was detected +<DT><B>Returns:</B><DD>a runtime exception that will be thrown to terminate the + execution of the script<DT><B>See Also:</B><DD><A HREF="../../../org/mozilla/javascript/ErrorReporter.html" title="interface in org.mozilla.javascript"><CODE>ErrorReporter</CODE></A></DL> +</DD> +</DL> +<HR> + +<A NAME="reportRuntimeError(java.lang.String)"><!-- --></A><H3> +reportRuntimeError</H3> +<PRE> +public static <A HREF="../../../org/mozilla/javascript/EvaluatorException.html" title="class in org.mozilla.javascript">EvaluatorException</A> <B>reportRuntimeError</B>(java.lang.String message)</PRE> +<DL> +<DD>Report a runtime error using the error reporter for the current thread. +<P> +<DD><DL> +<DT><B>Parameters:</B><DD><CODE>message</CODE> - the error message to report<DT><B>See Also:</B><DD><A HREF="../../../org/mozilla/javascript/ErrorReporter.html" title="interface in org.mozilla.javascript"><CODE>ErrorReporter</CODE></A></DL> +</DD> +</DL> +<HR> + +<A NAME="initStandardObjects()"><!-- --></A><H3> +initStandardObjects</H3> +<PRE> +public final <A HREF="../../../org/mozilla/javascript/ScriptableObject.html" title="class in org.mozilla.javascript">ScriptableObject</A> <B>initStandardObjects</B>()</PRE> +<DL> +<DD>Initialize the standard objects. + + Creates instances of the standard objects and their constructors + (Object, String, Number, Date, etc.), setting up 'scope' to act + as a global object as in ECMA 15.1.<p> + + This method must be called to initialize a scope before scripts + can be evaluated in that scope.<p> + + This method does not affect the Context it is called upon. +<P> +<DD><DL> + +<DT><B>Returns:</B><DD>the initialized scope</DL> +</DD> +</DL> +<HR> + +<A NAME="initStandardObjects(org.mozilla.javascript.ScriptableObject)"><!-- --></A><H3> +initStandardObjects</H3> +<PRE> +public final <A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> <B>initStandardObjects</B>(<A HREF="../../../org/mozilla/javascript/ScriptableObject.html" title="class in org.mozilla.javascript">ScriptableObject</A> scope)</PRE> +<DL> +<DD>Initialize the standard objects. + + Creates instances of the standard objects and their constructors + (Object, String, Number, Date, etc.), setting up 'scope' to act + as a global object as in ECMA 15.1.<p> + + This method must be called to initialize a scope before scripts + can be evaluated in that scope.<p> + + This method does not affect the Context it is called upon. +<P> +<DD><DL> +<DT><B>Parameters:</B><DD><CODE>scope</CODE> - the scope to initialize, or null, in which case a new + object will be created to serve as the scope +<DT><B>Returns:</B><DD>the initialized scope. The method returns the value of the scope + argument if it is not null or newly allocated scope object which + is an instance <A HREF="../../../org/mozilla/javascript/ScriptableObject.html" title="class in org.mozilla.javascript"><CODE>ScriptableObject</CODE></A>.</DL> +</DD> +</DL> +<HR> + +<A NAME="initStandardObjects(org.mozilla.javascript.ScriptableObject, boolean)"><!-- --></A><H3> +initStandardObjects</H3> +<PRE> +public <A HREF="../../../org/mozilla/javascript/ScriptableObject.html" title="class in org.mozilla.javascript">ScriptableObject</A> <B>initStandardObjects</B>(<A HREF="../../../org/mozilla/javascript/ScriptableObject.html" title="class in org.mozilla.javascript">ScriptableObject</A> scope, + boolean sealed)</PRE> +<DL> +<DD>Initialize the standard objects. + + Creates instances of the standard objects and their constructors + (Object, String, Number, Date, etc.), setting up 'scope' to act + as a global object as in ECMA 15.1.<p> + + This method must be called to initialize a scope before scripts + can be evaluated in that scope.<p> + + This method does not affect the Context it is called upon.<p> + + This form of the method also allows for creating "sealed" standard + objects. An object that is sealed cannot have properties added, changed, + or removed. This is useful to create a "superglobal" that can be shared + among several top-level objects. Note that sealing is not allowed in + the current ECMA/ISO language specification, but is likely for + the next version. +<P> +<DD><DL> +<DT><B>Parameters:</B><DD><CODE>scope</CODE> - the scope to initialize, or null, in which case a new + object will be created to serve as the scope<DD><CODE>sealed</CODE> - whether or not to create sealed standard objects that + cannot be modified. +<DT><B>Returns:</B><DD>the initialized scope. The method returns the value of the scope + argument if it is not null or newly allocated scope object.<DT><B>Since:</B></DT> + <DD>1.4R3</DD> +</DL> +</DD> +</DL> +<HR> + +<A NAME="getUndefinedValue()"><!-- --></A><H3> +getUndefinedValue</H3> +<PRE> +public static java.lang.Object <B>getUndefinedValue</B>()</PRE> +<DL> +<DD>Get the singleton object that represents the JavaScript Undefined value. +<P> +<DD><DL> +</DL> +</DD> +</DL> +<HR> + +<A NAME="evaluateString(org.mozilla.javascript.Scriptable, java.lang.String, java.lang.String, int, java.lang.Object)"><!-- --></A><H3> +evaluateString</H3> +<PRE> +public final java.lang.Object <B>evaluateString</B>(<A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> scope, + java.lang.String source, + java.lang.String sourceName, + int lineno, + java.lang.Object securityDomain)</PRE> +<DL> +<DD>Evaluate a JavaScript source string. + + The provided source name and line number are used for error messages + and for producing debug information. +<P> +<DD><DL> +<DT><B>Parameters:</B><DD><CODE>scope</CODE> - the scope to execute in<DD><CODE>source</CODE> - the JavaScript source<DD><CODE>sourceName</CODE> - a string describing the source, such as a filename<DD><CODE>lineno</CODE> - the starting line number<DD><CODE>securityDomain</CODE> - an arbitrary object that specifies security + information about the origin or owner of the script. For + implementations that don't care about security, this value + may be null. +<DT><B>Returns:</B><DD>the result of evaluating the string<DT><B>See Also:</B><DD><A HREF="../../../org/mozilla/javascript/SecurityController.html" title="class in org.mozilla.javascript"><CODE>SecurityController</CODE></A></DL> +</DD> +</DL> +<HR> + +<A NAME="evaluateReader(org.mozilla.javascript.Scriptable, java.io.Reader, java.lang.String, int, java.lang.Object)"><!-- --></A><H3> +evaluateReader</H3> +<PRE> +public final java.lang.Object <B>evaluateReader</B>(<A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> scope, + java.io.Reader in, + java.lang.String sourceName, + int lineno, + java.lang.Object securityDomain) + throws java.io.IOException</PRE> +<DL> +<DD>Evaluate a reader as JavaScript source. + + All characters of the reader are consumed. +<P> +<DD><DL> +<DT><B>Parameters:</B><DD><CODE>scope</CODE> - the scope to execute in<DD><CODE>in</CODE> - the Reader to get JavaScript source from<DD><CODE>sourceName</CODE> - a string describing the source, such as a filename<DD><CODE>lineno</CODE> - the starting line number<DD><CODE>securityDomain</CODE> - an arbitrary object that specifies security + information about the origin or owner of the script. For + implementations that don't care about security, this value + may be null. +<DT><B>Returns:</B><DD>the result of evaluating the source +<DT><B>Throws:</B> +<DD><CODE>java.io.IOException</CODE> - if an IOException was generated by the Reader</DL> +</DD> +</DL> +<HR> + +<A NAME="stringIsCompilableUnit(java.lang.String)"><!-- --></A><H3> +stringIsCompilableUnit</H3> +<PRE> +public final boolean <B>stringIsCompilableUnit</B>(java.lang.String source)</PRE> +<DL> +<DD>Check whether a string is ready to be compiled. + <p> + stringIsCompilableUnit is intended to support interactive compilation of + javascript. If compiling the string would result in an error + that might be fixed by appending more source, this method + returns false. In every other case, it returns true. + <p> + Interactive shells may accumulate source lines, using this + method after each new line is appended to check whether the + statement being entered is complete. +<P> +<DD><DL> +<DT><B>Parameters:</B><DD><CODE>source</CODE> - the source buffer to check +<DT><B>Returns:</B><DD>whether the source is ready for compilation<DT><B>Since:</B></DT> + <DD>1.4 Release 2</DD> +</DL> +</DD> +</DL> +<HR> + +<A NAME="compileReader(org.mozilla.javascript.Scriptable, java.io.Reader, java.lang.String, int, java.lang.Object)"><!-- --></A><H3> +compileReader</H3> +<PRE> +public final <A HREF="../../../org/mozilla/javascript/Script.html" title="interface in org.mozilla.javascript">Script</A> <B>compileReader</B>(<A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> scope, + java.io.Reader in, + java.lang.String sourceName, + int lineno, + java.lang.Object securityDomain) + throws java.io.IOException</PRE> +<DL> +<DD><B>Deprecated.</B> <I></I> +<P> +<DD><DL> + +<DT><B>Throws:</B> +<DD><CODE>java.io.IOException</CODE><DT><B>See Also:</B><DD><A HREF="../../../org/mozilla/javascript/Context.html#compileReader(java.io.Reader, java.lang.String, int, java.lang.Object)"><CODE>compileReader(Reader in, String sourceName, int lineno, + Object securityDomain)</CODE></A></DL> +</DD> +</DL> +<HR> + +<A NAME="compileReader(java.io.Reader, java.lang.String, int, java.lang.Object)"><!-- --></A><H3> +compileReader</H3> +<PRE> +public final <A HREF="../../../org/mozilla/javascript/Script.html" title="interface in org.mozilla.javascript">Script</A> <B>compileReader</B>(java.io.Reader in, + java.lang.String sourceName, + int lineno, + java.lang.Object securityDomain) + throws java.io.IOException</PRE> +<DL> +<DD>Compiles the source in the given reader. + <p> + Returns a script that may later be executed. + Will consume all the source in the reader. +<P> +<DD><DL> +<DT><B>Parameters:</B><DD><CODE>in</CODE> - the input reader<DD><CODE>sourceName</CODE> - a string describing the source, such as a filename<DD><CODE>lineno</CODE> - the starting line number for reporting errors<DD><CODE>securityDomain</CODE> - an arbitrary object that specifies security + information about the origin or owner of the script. For + implementations that don't care about security, this value + may be null. +<DT><B>Returns:</B><DD>a script that may later be executed +<DT><B>Throws:</B> +<DD><CODE>java.io.IOException</CODE> - if an IOException was generated by the Reader<DT><B>See Also:</B><DD><A HREF="../../../org/mozilla/javascript/Script.html" title="interface in org.mozilla.javascript"><CODE>Script</CODE></A></DL> +</DD> +</DL> +<HR> + +<A NAME="compileString(java.lang.String, java.lang.String, int, java.lang.Object)"><!-- --></A><H3> +compileString</H3> +<PRE> +public final <A HREF="../../../org/mozilla/javascript/Script.html" title="interface in org.mozilla.javascript">Script</A> <B>compileString</B>(java.lang.String source, + java.lang.String sourceName, + int lineno, + java.lang.Object securityDomain)</PRE> +<DL> +<DD>Compiles the source in the given string. + <p> + Returns a script that may later be executed. +<P> +<DD><DL> +<DT><B>Parameters:</B><DD><CODE>source</CODE> - the source string<DD><CODE>sourceName</CODE> - a string describing the source, such as a filename<DD><CODE>lineno</CODE> - the starting line number for reporting errors<DD><CODE>securityDomain</CODE> - an arbitrary object that specifies security + information about the origin or owner of the script. For + implementations that don't care about security, this value + may be null. +<DT><B>Returns:</B><DD>a script that may later be executed<DT><B>See Also:</B><DD><A HREF="../../../org/mozilla/javascript/Script.html" title="interface in org.mozilla.javascript"><CODE>Script</CODE></A></DL> +</DD> +</DL> +<HR> + +<A NAME="compileFunction(org.mozilla.javascript.Scriptable, java.lang.String, java.lang.String, int, java.lang.Object)"><!-- --></A><H3> +compileFunction</H3> +<PRE> +public final <A HREF="../../../org/mozilla/javascript/Function.html" title="interface in org.mozilla.javascript">Function</A> <B>compileFunction</B>(<A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> scope, + java.lang.String source, + java.lang.String sourceName, + int lineno, + java.lang.Object securityDomain)</PRE> +<DL> +<DD>Compile a JavaScript function. + <p> + The function source must be a function definition as defined by + ECMA (e.g., "function f(a) { return a; }"). +<P> +<DD><DL> +<DT><B>Parameters:</B><DD><CODE>scope</CODE> - the scope to compile relative to<DD><CODE>source</CODE> - the function definition source<DD><CODE>sourceName</CODE> - a string describing the source, such as a filename<DD><CODE>lineno</CODE> - the starting line number<DD><CODE>securityDomain</CODE> - an arbitrary object that specifies security + information about the origin or owner of the script. For + implementations that don't care about security, this value + may be null. +<DT><B>Returns:</B><DD>a Function that may later be called<DT><B>See Also:</B><DD><A HREF="../../../org/mozilla/javascript/Function.html" title="interface in org.mozilla.javascript"><CODE>Function</CODE></A></DL> +</DD> +</DL> +<HR> + +<A NAME="decompileScript(org.mozilla.javascript.Script, int)"><!-- --></A><H3> +decompileScript</H3> +<PRE> +public final java.lang.String <B>decompileScript</B>(<A HREF="../../../org/mozilla/javascript/Script.html" title="interface in org.mozilla.javascript">Script</A> script, + int indent)</PRE> +<DL> +<DD>Decompile the script. + <p> + The canonical source of the script is returned. +<P> +<DD><DL> +<DT><B>Parameters:</B><DD><CODE>script</CODE> - the script to decompile<DD><CODE>indent</CODE> - the number of spaces to indent the result +<DT><B>Returns:</B><DD>a string representing the script source</DL> +</DD> +</DL> +<HR> + +<A NAME="decompileFunction(org.mozilla.javascript.Function, int)"><!-- --></A><H3> +decompileFunction</H3> +<PRE> +public final java.lang.String <B>decompileFunction</B>(<A HREF="../../../org/mozilla/javascript/Function.html" title="interface in org.mozilla.javascript">Function</A> fun, + int indent)</PRE> +<DL> +<DD>Decompile a JavaScript Function. + <p> + Decompiles a previously compiled JavaScript function object to + canonical source. + <p> + Returns function body of '[native code]' if no decompilation + information is available. +<P> +<DD><DL> +<DT><B>Parameters:</B><DD><CODE>fun</CODE> - the JavaScript function to decompile<DD><CODE>indent</CODE> - the number of spaces to indent the result +<DT><B>Returns:</B><DD>a string representing the function source</DL> +</DD> +</DL> +<HR> + +<A NAME="decompileFunctionBody(org.mozilla.javascript.Function, int)"><!-- --></A><H3> +decompileFunctionBody</H3> +<PRE> +public final java.lang.String <B>decompileFunctionBody</B>(<A HREF="../../../org/mozilla/javascript/Function.html" title="interface in org.mozilla.javascript">Function</A> fun, + int indent)</PRE> +<DL> +<DD>Decompile the body of a JavaScript Function. + <p> + Decompiles the body a previously compiled JavaScript Function + object to canonical source, omitting the function header and + trailing brace. + + Returns '[native code]' if no decompilation information is available. +<P> +<DD><DL> +<DT><B>Parameters:</B><DD><CODE>fun</CODE> - the JavaScript function to decompile<DD><CODE>indent</CODE> - the number of spaces to indent the result +<DT><B>Returns:</B><DD>a string representing the function body source.</DL> +</DD> +</DL> +<HR> + +<A NAME="newObject(org.mozilla.javascript.Scriptable)"><!-- --></A><H3> +newObject</H3> +<PRE> +public final <A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> <B>newObject</B>(<A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> scope)</PRE> +<DL> +<DD>Create a new JavaScript object. + + Equivalent to evaluating "new Object()". +<P> +<DD><DL> +<DT><B>Parameters:</B><DD><CODE>scope</CODE> - the scope to search for the constructor and to evaluate + against +<DT><B>Returns:</B><DD>the new object</DL> +</DD> +</DL> +<HR> + +<A NAME="newObject(org.mozilla.javascript.Scriptable, java.lang.String)"><!-- --></A><H3> +newObject</H3> +<PRE> +public final <A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> <B>newObject</B>(<A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> scope, + java.lang.String constructorName)</PRE> +<DL> +<DD>Create a new JavaScript object by executing the named constructor. + + The call <code>newObject(scope, "Foo")</code> is equivalent to + evaluating "new Foo()". +<P> +<DD><DL> +<DT><B>Parameters:</B><DD><CODE>scope</CODE> - the scope to search for the constructor and to evaluate against<DD><CODE>constructorName</CODE> - the name of the constructor to call +<DT><B>Returns:</B><DD>the new object</DL> +</DD> +</DL> +<HR> + +<A NAME="newObject(org.mozilla.javascript.Scriptable, java.lang.String, java.lang.Object[])"><!-- --></A><H3> +newObject</H3> +<PRE> +public final <A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> <B>newObject</B>(<A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> scope, + java.lang.String constructorName, + java.lang.Object[] args)</PRE> +<DL> +<DD>Creates a new JavaScript object by executing the named constructor. + + Searches <code>scope</code> for the named constructor, calls it with + the given arguments, and returns the result.<p> + + The code + <pre> + Object[] args = { "a", "b" }; + newObject(scope, "Foo", args)</pre> + is equivalent to evaluating "new Foo('a', 'b')", assuming that the Foo + constructor has been defined in <code>scope</code>. +<P> +<DD><DL> +<DT><B>Parameters:</B><DD><CODE>scope</CODE> - The scope to search for the constructor and to evaluate + against<DD><CODE>constructorName</CODE> - the name of the constructor to call<DD><CODE>args</CODE> - the array of arguments for the constructor +<DT><B>Returns:</B><DD>the new object</DL> +</DD> +</DL> +<HR> + +<A NAME="newArray(org.mozilla.javascript.Scriptable, int)"><!-- --></A><H3> +newArray</H3> +<PRE> +public final <A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> <B>newArray</B>(<A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> scope, + int length)</PRE> +<DL> +<DD>Create an array with a specified initial length. + <p> +<P> +<DD><DL> +<DT><B>Parameters:</B><DD><CODE>scope</CODE> - the scope to create the object in<DD><CODE>length</CODE> - the initial length (JavaScript arrays may have + additional properties added dynamically). +<DT><B>Returns:</B><DD>the new array object</DL> +</DD> +</DL> +<HR> + +<A NAME="newArray(org.mozilla.javascript.Scriptable, java.lang.Object[])"><!-- --></A><H3> +newArray</H3> +<PRE> +public final <A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> <B>newArray</B>(<A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> scope, + java.lang.Object[] elements)</PRE> +<DL> +<DD>Create an array with a set of initial elements. +<P> +<DD><DL> +<DT><B>Parameters:</B><DD><CODE>scope</CODE> - the scope to create the object in.<DD><CODE>elements</CODE> - the initial elements. Each object in this array + must be an acceptable JavaScript type and type + of array should be exactly Object[], not + SomeObjectSubclass[]. +<DT><B>Returns:</B><DD>the new array object.</DL> +</DD> +</DL> +<HR> + +<A NAME="getElements(org.mozilla.javascript.Scriptable)"><!-- --></A><H3> +getElements</H3> +<PRE> +public final java.lang.Object[] <B>getElements</B>(<A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> object)</PRE> +<DL> +<DD>Get the elements of a JavaScript array. + <p> + If the object defines a length property convertible to double number, + then the number is converted Uint32 value as defined in Ecma 9.6 + and Java array of that size is allocated. + The array is initialized with the values obtained by + calling get() on object for each value of i in [0,length-1]. If + there is not a defined value for a property the Undefined value + is used to initialize the corresponding element in the array. The + Java array is then returned. + If the object doesn't define a length property or it is not a number, + empty array is returned. +<P> +<DD><DL> +<DT><B>Parameters:</B><DD><CODE>object</CODE> - the JavaScript array or array-like object +<DT><B>Returns:</B><DD>a Java array of objects<DT><B>Since:</B></DT> + <DD>1.4 release 2</DD> +</DL> +</DD> +</DL> +<HR> + +<A NAME="toBoolean(java.lang.Object)"><!-- --></A><H3> +toBoolean</H3> +<PRE> +public static boolean <B>toBoolean</B>(java.lang.Object value)</PRE> +<DL> +<DD>Convert the value to a JavaScript boolean value. + <p> + See ECMA 9.2. +<P> +<DD><DL> +<DT><B>Parameters:</B><DD><CODE>value</CODE> - a JavaScript value +<DT><B>Returns:</B><DD>the corresponding boolean value converted using + the ECMA rules</DL> +</DD> +</DL> +<HR> + +<A NAME="toNumber(java.lang.Object)"><!-- --></A><H3> +toNumber</H3> +<PRE> +public static double <B>toNumber</B>(java.lang.Object value)</PRE> +<DL> +<DD>Convert the value to a JavaScript Number value. + <p> + Returns a Java double for the JavaScript Number. + <p> + See ECMA 9.3. +<P> +<DD><DL> +<DT><B>Parameters:</B><DD><CODE>value</CODE> - a JavaScript value +<DT><B>Returns:</B><DD>the corresponding double value converted using + the ECMA rules</DL> +</DD> +</DL> +<HR> + +<A NAME="toString(java.lang.Object)"><!-- --></A><H3> +toString</H3> +<PRE> +public static java.lang.String <B>toString</B>(java.lang.Object value)</PRE> +<DL> +<DD>Convert the value to a JavaScript String value. + <p> + See ECMA 9.8. + <p> +<P> +<DD><DL> +<DT><B>Parameters:</B><DD><CODE>value</CODE> - a JavaScript value +<DT><B>Returns:</B><DD>the corresponding String value converted using + the ECMA rules</DL> +</DD> +</DL> +<HR> + +<A NAME="toObject(java.lang.Object, org.mozilla.javascript.Scriptable)"><!-- --></A><H3> +toObject</H3> +<PRE> +public static <A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> <B>toObject</B>(java.lang.Object value, + <A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> scope)</PRE> +<DL> +<DD>Convert the value to an JavaScript object value. + <p> + Note that a scope must be provided to look up the constructors + for Number, Boolean, and String. + <p> + See ECMA 9.9. + <p> + Additionally, arbitrary Java objects and classes will be + wrapped in a Scriptable object with its Java fields and methods + reflected as JavaScript properties of the object. +<P> +<DD><DL> +<DT><B>Parameters:</B><DD><CODE>value</CODE> - any Java object<DD><CODE>scope</CODE> - global scope containing constructors for Number, + Boolean, and String +<DT><B>Returns:</B><DD>new JavaScript object</DL> +</DD> +</DL> +<HR> + +<A NAME="toObject(java.lang.Object, org.mozilla.javascript.Scriptable, java.lang.Class)"><!-- --></A><H3> +toObject</H3> +<PRE> +public static <A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> <B>toObject</B>(java.lang.Object value, + <A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> scope, + java.lang.Class staticType)</PRE> +<DL> +<DD><B>Deprecated.</B> <I></I> +<P> +<DD><DL> +<DT><B>See Also:</B><DD><A HREF="../../../org/mozilla/javascript/Context.html#toObject(java.lang.Object, org.mozilla.javascript.Scriptable)"><CODE>toObject(Object, Scriptable)</CODE></A></DL> +</DD> +</DL> +<HR> + +<A NAME="javaToJS(java.lang.Object, org.mozilla.javascript.Scriptable)"><!-- --></A><H3> +javaToJS</H3> +<PRE> +public static java.lang.Object <B>javaToJS</B>(java.lang.Object value, + <A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> scope)</PRE> +<DL> +<DD>Convenient method to convert java value to its closest representation + in JavaScript. + <p> + If value is an instance of String, Number, Boolean, Function or + Scriptable, it is returned as it and will be treated as the corresponding + JavaScript type of string, number, boolean, function and object. + <p> + Note that for Number instances during any arithmetic operation in + JavaScript the engine will always use the result of + <tt>Number.doubleValue()</tt> resulting in a precision loss if + the number can not fit into double. + <p> + If value is an instance of Character, it will be converted to string of + length 1 and its JavaScript type will be string. + <p> + The rest of values will be wrapped as LiveConnect objects + by calling <A HREF="../../../org/mozilla/javascript/WrapFactory.html#wrap(org.mozilla.javascript.Context, org.mozilla.javascript.Scriptable, java.lang.Object, java.lang.Class)"><CODE>WrapFactory.wrap(Context cx, Scriptable scope, + Object obj, Class staticType)</CODE></A> as in: + <pre> + Context cx = Context.getCurrentContext(); + return cx.getWrapFactory().wrap(cx, scope, value, null); + </pre> +<P> +<DD><DL> +<DT><B>Parameters:</B><DD><CODE>value</CODE> - any Java object<DD><CODE>scope</CODE> - top scope object +<DT><B>Returns:</B><DD>value suitable to pass to any API that takes JavaScript values.</DL> +</DD> +</DL> +<HR> + +<A NAME="jsToJava(java.lang.Object, java.lang.Class)"><!-- --></A><H3> +jsToJava</H3> +<PRE> +public static java.lang.Object <B>jsToJava</B>(java.lang.Object value, + java.lang.Class desiredType) + throws <A HREF="../../../org/mozilla/javascript/EvaluatorException.html" title="class in org.mozilla.javascript">EvaluatorException</A></PRE> +<DL> +<DD>Convert a JavaScript value into the desired type. + Uses the semantics defined with LiveConnect3 and throws an + Illegal argument exception if the conversion cannot be performed. +<P> +<DD><DL> +<DT><B>Parameters:</B><DD><CODE>value</CODE> - the JavaScript value to convert<DD><CODE>desiredType</CODE> - the Java type to convert to. Primitive Java + types are represented using the TYPE fields in the corresponding + wrapper class in java.lang. +<DT><B>Returns:</B><DD>the converted value +<DT><B>Throws:</B> +<DD><CODE><A HREF="../../../org/mozilla/javascript/EvaluatorException.html" title="class in org.mozilla.javascript">EvaluatorException</A></CODE> - if the conversion cannot be performed</DL> +</DD> +</DL> +<HR> + +<A NAME="toType(java.lang.Object, java.lang.Class)"><!-- --></A><H3> +toType</H3> +<PRE> +public static java.lang.Object <B>toType</B>(java.lang.Object value, + java.lang.Class desiredType) + throws java.lang.IllegalArgumentException</PRE> +<DL> +<DD><B>Deprecated.</B> <I></I> +<P> +<DD><DL> + +<DT><B>Throws:</B> +<DD><CODE>java.lang.IllegalArgumentException</CODE> - if the conversion cannot be performed. + Note that <A HREF="../../../org/mozilla/javascript/Context.html#jsToJava(java.lang.Object, java.lang.Class)"><CODE>jsToJava(Object, Class)</CODE></A> throws + <A HREF="../../../org/mozilla/javascript/EvaluatorException.html" title="class in org.mozilla.javascript"><CODE>EvaluatorException</CODE></A> instead.<DT><B>See Also:</B><DD><A HREF="../../../org/mozilla/javascript/Context.html#jsToJava(java.lang.Object, java.lang.Class)"><CODE>jsToJava(Object, Class)</CODE></A></DL> +</DD> +</DL> +<HR> + +<A NAME="throwAsScriptRuntimeEx(java.lang.Throwable)"><!-- --></A><H3> +throwAsScriptRuntimeEx</H3> +<PRE> +public static java.lang.RuntimeException <B>throwAsScriptRuntimeEx</B>(java.lang.Throwable e)</PRE> +<DL> +<DD>Rethrow the exception wrapping it as the script runtime exception. + Unless the exception is instance of <A HREF="../../../org/mozilla/javascript/EcmaError.html" title="class in org.mozilla.javascript"><CODE>EcmaError</CODE></A> or + <A HREF="../../../org/mozilla/javascript/EvaluatorException.html" title="class in org.mozilla.javascript"><CODE>EvaluatorException</CODE></A> it will be wrapped as + <A HREF="../../../org/mozilla/javascript/WrappedException.html" title="class in org.mozilla.javascript"><CODE>WrappedException</CODE></A>, a subclass of <A HREF="../../../org/mozilla/javascript/EvaluatorException.html" title="class in org.mozilla.javascript"><CODE>EvaluatorException</CODE></A>. + The resulting exception object always contains + source name and line number of script that triggered exception. + <p> + This method always throws an exception, its return value is provided + only for convenience to allow a usage like: + <pre> + throw Context.throwAsScriptRuntimeEx(ex); + </pre> + to indicate that code after the method is unreachable. +<P> +<DD><DL> + +<DT><B>Throws:</B> +<DD><CODE><A HREF="../../../org/mozilla/javascript/EvaluatorException.html" title="class in org.mozilla.javascript">EvaluatorException</A></CODE> +<DD><CODE><A HREF="../../../org/mozilla/javascript/EcmaError.html" title="class in org.mozilla.javascript">EcmaError</A></CODE></DL> +</DD> +</DL> +<HR> + +<A NAME="isGeneratingDebug()"><!-- --></A><H3> +isGeneratingDebug</H3> +<PRE> +public final boolean <B>isGeneratingDebug</B>()</PRE> +<DL> +<DD>Tell whether debug information is being generated. +<P> +<DD><DL> +<DT><B>Since:</B></DT> + <DD>1.3</DD> +</DL> +</DD> +</DL> +<HR> + +<A NAME="setGeneratingDebug(boolean)"><!-- --></A><H3> +setGeneratingDebug</H3> +<PRE> +public final void <B>setGeneratingDebug</B>(boolean generatingDebug)</PRE> +<DL> +<DD>Specify whether or not debug information should be generated. + <p> + Setting the generation of debug information on will set the + optimization level to zero. +<P> +<DD><DL> +<DT><B>Since:</B></DT> + <DD>1.3</DD> +</DL> +</DD> +</DL> +<HR> + +<A NAME="isGeneratingSource()"><!-- --></A><H3> +isGeneratingSource</H3> +<PRE> +public final boolean <B>isGeneratingSource</B>()</PRE> +<DL> +<DD>Tell whether source information is being generated. +<P> +<DD><DL> +<DT><B>Since:</B></DT> + <DD>1.3</DD> +</DL> +</DD> +</DL> +<HR> + +<A NAME="setGeneratingSource(boolean)"><!-- --></A><H3> +setGeneratingSource</H3> +<PRE> +public final void <B>setGeneratingSource</B>(boolean generatingSource)</PRE> +<DL> +<DD>Specify whether or not source information should be generated. + <p> + Without source information, evaluating the "toString" method + on JavaScript functions produces only "[native code]" for + the body of the function. + Note that code generated without source is not fully ECMA + conformant. +<P> +<DD><DL> +<DT><B>Since:</B></DT> + <DD>1.3</DD> +</DL> +</DD> +</DL> +<HR> + +<A NAME="getOptimizationLevel()"><!-- --></A><H3> +getOptimizationLevel</H3> +<PRE> +public final int <B>getOptimizationLevel</B>()</PRE> +<DL> +<DD>Get the current optimization level. + <p> + The optimization level is expressed as an integer between -1 and + 9. +<P> +<DD><DL> +<DT><B>Since:</B></DT> + <DD>1.3</DD> +</DL> +</DD> +</DL> +<HR> + +<A NAME="setOptimizationLevel(int)"><!-- --></A><H3> +setOptimizationLevel</H3> +<PRE> +public final void <B>setOptimizationLevel</B>(int optimizationLevel)</PRE> +<DL> +<DD>Set the current optimization level. + <p> + The optimization level is expected to be an integer between -1 and + 9. Any negative values will be interpreted as -1, and any values + greater than 9 will be interpreted as 9. + An optimization level of -1 indicates that interpretive mode will + always be used. Levels 0 through 9 indicate that class files may + be generated. Higher optimization levels trade off compile time + performance for runtime performance. + The optimizer level can't be set greater than -1 if the optimizer + package doesn't exist at run time. +<P> +<DD><DL> +<DT><B>Parameters:</B><DD><CODE>optimizationLevel</CODE> - an integer indicating the level of + optimization to perform<DT><B>Since:</B></DT> + <DD>1.3</DD> +</DL> +</DD> +</DL> +<HR> + +<A NAME="isValidOptimizationLevel(int)"><!-- --></A><H3> +isValidOptimizationLevel</H3> +<PRE> +public static boolean <B>isValidOptimizationLevel</B>(int optimizationLevel)</PRE> +<DL> +<DD><DL> +</DL> +</DD> +</DL> +<HR> + +<A NAME="checkOptimizationLevel(int)"><!-- --></A><H3> +checkOptimizationLevel</H3> +<PRE> +public static void <B>checkOptimizationLevel</B>(int optimizationLevel)</PRE> +<DL> +<DD><DL> +</DL> +</DD> +</DL> +<HR> + +<A NAME="getMaximumInterpreterStackDepth()"><!-- --></A><H3> +getMaximumInterpreterStackDepth</H3> +<PRE> +public final int <B>getMaximumInterpreterStackDepth</B>()</PRE> +<DL> +<DD>Returns the maximum stack depth (in terms of number of call frames) + allowed in a single invocation of interpreter. If the set depth would be + exceeded, the interpreter will throw an EvaluatorException in the script. + Defaults to Integer.MAX_VALUE. The setting only has effect for + interpreted functions (those compiled with optimization level set to -1). + As the interpreter doesn't use the Java stack but rather manages its own + stack in the heap memory, a runaway recursion in interpreted code would + eventually consume all available memory and cause OutOfMemoryError + instead of a StackOverflowError limited to only a single thread. This + setting helps prevent such situations. +<P> +<DD><DL> + +<DT><B>Returns:</B><DD>The current maximum interpreter stack depth.</DL> +</DD> +</DL> +<HR> + +<A NAME="setMaximumInterpreterStackDepth(int)"><!-- --></A><H3> +setMaximumInterpreterStackDepth</H3> +<PRE> +public final void <B>setMaximumInterpreterStackDepth</B>(int max)</PRE> +<DL> +<DD>Sets the maximum stack depth (in terms of number of call frames) + allowed in a single invocation of interpreter. If the set depth would be + exceeded, the interpreter will throw an EvaluatorException in the script. + Defaults to Integer.MAX_VALUE. The setting only has effect for + interpreted functions (those compiled with optimization level set to -1). + As the interpreter doesn't use the Java stack but rather manages its own + stack in the heap memory, a runaway recursion in interpreted code would + eventually consume all available memory and cause OutOfMemoryError + instead of a StackOverflowError limited to only a single thread. This + setting helps prevent such situations. +<P> +<DD><DL> +<DT><B>Parameters:</B><DD><CODE>max</CODE> - the new maximum interpreter stack depth +<DT><B>Throws:</B> +<DD><CODE>java.lang.IllegalStateException</CODE> - if this context's optimization level is not + -1 +<DD><CODE>java.lang.IllegalArgumentException</CODE> - if the new depth is not at least 1</DL> +</DD> +</DL> +<HR> + +<A NAME="setSecurityController(org.mozilla.javascript.SecurityController)"><!-- --></A><H3> +setSecurityController</H3> +<PRE> +public final void <B>setSecurityController</B>(<A HREF="../../../org/mozilla/javascript/SecurityController.html" title="class in org.mozilla.javascript">SecurityController</A> controller)</PRE> +<DL> +<DD>Set the security controller for this context. + <p> SecurityController may only be set if it is currently null + and <A HREF="../../../org/mozilla/javascript/SecurityController.html#hasGlobal()"><CODE>SecurityController.hasGlobal()</CODE></A> is <tt>false</tt>. + Otherwise a SecurityException is thrown. +<P> +<DD><DL> +<DT><B>Parameters:</B><DD><CODE>controller</CODE> - a SecurityController object +<DT><B>Throws:</B> +<DD><CODE>java.lang.SecurityException</CODE> - if there is already a SecurityController + object for this Context or globally installed.<DT><B>See Also:</B><DD><A HREF="../../../org/mozilla/javascript/SecurityController.html#initGlobal(org.mozilla.javascript.SecurityController)"><CODE>SecurityController.initGlobal(SecurityController controller)</CODE></A>, +<A HREF="../../../org/mozilla/javascript/SecurityController.html#hasGlobal()"><CODE>SecurityController.hasGlobal()</CODE></A></DL> +</DD> +</DL> +<HR> + +<A NAME="setClassShutter(org.mozilla.javascript.ClassShutter)"><!-- --></A><H3> +setClassShutter</H3> +<PRE> +public final void <B>setClassShutter</B>(<A HREF="../../../org/mozilla/javascript/ClassShutter.html" title="interface in org.mozilla.javascript">ClassShutter</A> shutter)</PRE> +<DL> +<DD>Set the LiveConnect access filter for this context. + <p> <A HREF="../../../org/mozilla/javascript/ClassShutter.html" title="interface in org.mozilla.javascript"><CODE>ClassShutter</CODE></A> may only be set if it is currently null. + Otherwise a SecurityException is thrown. +<P> +<DD><DL> +<DT><B>Parameters:</B><DD><CODE>shutter</CODE> - a ClassShutter object +<DT><B>Throws:</B> +<DD><CODE>java.lang.SecurityException</CODE> - if there is already a ClassShutter + object for this Context</DL> +</DD> +</DL> +<HR> + +<A NAME="getThreadLocal(java.lang.Object)"><!-- --></A><H3> +getThreadLocal</H3> +<PRE> +public final java.lang.Object <B>getThreadLocal</B>(java.lang.Object key)</PRE> +<DL> +<DD>Get a value corresponding to a key. + <p> + Since the Context is associated with a thread it can be + used to maintain values that can be later retrieved using + the current thread. + <p> + Note that the values are maintained with the Context, so + if the Context is disassociated from the thread the values + cannot be retrieved. Also, if private data is to be maintained + in this manner the key should be a java.lang.Object + whose reference is not divulged to untrusted code. +<P> +<DD><DL> +<DT><B>Parameters:</B><DD><CODE>key</CODE> - the key used to lookup the value +<DT><B>Returns:</B><DD>a value previously stored using putThreadLocal.</DL> +</DD> +</DL> +<HR> + +<A NAME="putThreadLocal(java.lang.Object, java.lang.Object)"><!-- --></A><H3> +putThreadLocal</H3> +<PRE> +public final void <B>putThreadLocal</B>(java.lang.Object key, + java.lang.Object value)</PRE> +<DL> +<DD>Put a value that can later be retrieved using a given key. + <p> +<P> +<DD><DL> +<DT><B>Parameters:</B><DD><CODE>key</CODE> - the key used to index the value<DD><CODE>value</CODE> - the value to save</DL> +</DD> +</DL> +<HR> + +<A NAME="removeThreadLocal(java.lang.Object)"><!-- --></A><H3> +removeThreadLocal</H3> +<PRE> +public final void <B>removeThreadLocal</B>(java.lang.Object key)</PRE> +<DL> +<DD>Remove values from thread-local storage. +<P> +<DD><DL> +<DT><B>Parameters:</B><DD><CODE>key</CODE> - the key for the entry to remove.<DT><B>Since:</B></DT> + <DD>1.5 release 2</DD> +</DL> +</DD> +</DL> +<HR> + +<A NAME="hasCompileFunctionsWithDynamicScope()"><!-- --></A><H3> +hasCompileFunctionsWithDynamicScope</H3> +<PRE> +public final boolean <B>hasCompileFunctionsWithDynamicScope</B>()</PRE> +<DL> +<DD><B>Deprecated.</B> <I></I> +<P> +<DD><DL> +<DT><B>See Also:</B><DD><A HREF="../../../org/mozilla/javascript/Context.html#FEATURE_DYNAMIC_SCOPE"><CODE>FEATURE_DYNAMIC_SCOPE</CODE></A>, +<A HREF="../../../org/mozilla/javascript/Context.html#hasFeature(int)"><CODE>hasFeature(int)</CODE></A></DL> +</DD> +</DL> +<HR> + +<A NAME="setCompileFunctionsWithDynamicScope(boolean)"><!-- --></A><H3> +setCompileFunctionsWithDynamicScope</H3> +<PRE> +public final void <B>setCompileFunctionsWithDynamicScope</B>(boolean flag)</PRE> +<DL> +<DD><B>Deprecated.</B> <I></I> +<P> +<DD><DL> +<DT><B>See Also:</B><DD><A HREF="../../../org/mozilla/javascript/Context.html#FEATURE_DYNAMIC_SCOPE"><CODE>FEATURE_DYNAMIC_SCOPE</CODE></A>, +<A HREF="../../../org/mozilla/javascript/Context.html#hasFeature(int)"><CODE>hasFeature(int)</CODE></A></DL> +</DD> +</DL> +<HR> + +<A NAME="setCachingEnabled(boolean)"><!-- --></A><H3> +setCachingEnabled</H3> +<PRE> +public static void <B>setCachingEnabled</B>(boolean cachingEnabled)</PRE> +<DL> +<DD><B>Deprecated.</B> <I></I> +<P> +<DD><DL> +<DT><B>See Also:</B><DD><A HREF="../../../org/mozilla/javascript/ClassCache.html#get(org.mozilla.javascript.Scriptable)"><CODE>ClassCache.get(Scriptable)</CODE></A>, +<A HREF="../../../org/mozilla/javascript/ClassCache.html#setCachingEnabled(boolean)"><CODE>ClassCache.setCachingEnabled(boolean)</CODE></A></DL> +</DD> +</DL> +<HR> + +<A NAME="setWrapFactory(org.mozilla.javascript.WrapFactory)"><!-- --></A><H3> +setWrapFactory</H3> +<PRE> +public final void <B>setWrapFactory</B>(<A HREF="../../../org/mozilla/javascript/WrapFactory.html" title="class in org.mozilla.javascript">WrapFactory</A> wrapFactory)</PRE> +<DL> +<DD>Set a WrapFactory for this Context. + <p> + The WrapFactory allows custom object wrapping behavior for + Java object manipulated with JavaScript. +<P> +<DD><DL> +<DT><B>Since:</B></DT> + <DD>1.5 Release 4</DD> +<DT><B>See Also:</B><DD><A HREF="../../../org/mozilla/javascript/WrapFactory.html" title="class in org.mozilla.javascript"><CODE>WrapFactory</CODE></A></DL> +</DD> +</DL> +<HR> + +<A NAME="getWrapFactory()"><!-- --></A><H3> +getWrapFactory</H3> +<PRE> +public final <A HREF="../../../org/mozilla/javascript/WrapFactory.html" title="class in org.mozilla.javascript">WrapFactory</A> <B>getWrapFactory</B>()</PRE> +<DL> +<DD>Return the current WrapFactory, or null if none is defined. +<P> +<DD><DL> +<DT><B>Since:</B></DT> + <DD>1.5 Release 4</DD> +<DT><B>See Also:</B><DD><A HREF="../../../org/mozilla/javascript/WrapFactory.html" title="class in org.mozilla.javascript"><CODE>WrapFactory</CODE></A></DL> +</DD> +</DL> +<HR> + +<A NAME="getDebugger()"><!-- --></A><H3> +getDebugger</H3> +<PRE> +public final org.mozilla.javascript.debug.Debugger <B>getDebugger</B>()</PRE> +<DL> +<DD>Return the current debugger. +<P> +<DD><DL> + +<DT><B>Returns:</B><DD>the debugger, or null if none is attached.</DL> +</DD> +</DL> +<HR> + +<A NAME="getDebuggerContextData()"><!-- --></A><H3> +getDebuggerContextData</H3> +<PRE> +public final java.lang.Object <B>getDebuggerContextData</B>()</PRE> +<DL> +<DD>Return the debugger context data associated with current context. +<P> +<DD><DL> + +<DT><B>Returns:</B><DD>the debugger data, or null if debugger is not attached</DL> +</DD> +</DL> +<HR> + +<A NAME="setDebugger(org.mozilla.javascript.debug.Debugger, java.lang.Object)"><!-- --></A><H3> +setDebugger</H3> +<PRE> +public final void <B>setDebugger</B>(org.mozilla.javascript.debug.Debugger debugger, + java.lang.Object contextData)</PRE> +<DL> +<DD>Set the associated debugger. +<P> +<DD><DL> +<DT><B>Parameters:</B><DD><CODE>debugger</CODE> - the debugger to be used on callbacks from + the engine.<DD><CODE>contextData</CODE> - arbitrary object that debugger can use to store + per Context data.</DL> +</DD> +</DL> +<HR> + +<A NAME="getDebuggableView(org.mozilla.javascript.Script)"><!-- --></A><H3> +getDebuggableView</H3> +<PRE> +public static <A HREF="../../../org/mozilla/javascript/debug/DebuggableScript.html" title="interface in org.mozilla.javascript.debug">DebuggableScript</A> <B>getDebuggableView</B>(<A HREF="../../../org/mozilla/javascript/Script.html" title="interface in org.mozilla.javascript">Script</A> script)</PRE> +<DL> +<DD>Return DebuggableScript instance if any associated with the script. + If callable supports DebuggableScript implementation, the method + returns it. Otherwise null is returned. +<P> +<DD><DL> +</DL> +</DD> +</DL> +<HR> + +<A NAME="hasFeature(int)"><!-- --></A><H3> +hasFeature</H3> +<PRE> +public boolean <B>hasFeature</B>(int featureIndex)</PRE> +<DL> +<DD>Controls certain aspects of script semantics. + Should be overwritten to alter default behavior. + <p> + The default implementation calls + <A HREF="../../../org/mozilla/javascript/ContextFactory.html#hasFeature(org.mozilla.javascript.Context, int)"><CODE>ContextFactory.hasFeature(Context cx, int featureIndex)</CODE></A> + that allows to customize Context behavior without introducing + Context subclasses. <A HREF="../../../org/mozilla/javascript/ContextFactory.html" title="class in org.mozilla.javascript"><CODE>ContextFactory</CODE></A> documentation gives + an example of hasFeature implementation. +<P> +<DD><DL> +<DT><B>Parameters:</B><DD><CODE>featureIndex</CODE> - feature index to check +<DT><B>Returns:</B><DD>true if the <code>featureIndex</code> feature is turned on<DT><B>See Also:</B><DD><A HREF="../../../org/mozilla/javascript/Context.html#FEATURE_NON_ECMA_GET_YEAR"><CODE>FEATURE_NON_ECMA_GET_YEAR</CODE></A>, +<A HREF="../../../org/mozilla/javascript/Context.html#FEATURE_MEMBER_EXPR_AS_FUNCTION_NAME"><CODE>FEATURE_MEMBER_EXPR_AS_FUNCTION_NAME</CODE></A>, +<A HREF="../../../org/mozilla/javascript/Context.html#FEATURE_RESERVED_KEYWORD_AS_IDENTIFIER"><CODE>FEATURE_RESERVED_KEYWORD_AS_IDENTIFIER</CODE></A>, +<A HREF="../../../org/mozilla/javascript/Context.html#FEATURE_TO_STRING_AS_SOURCE"><CODE>FEATURE_TO_STRING_AS_SOURCE</CODE></A>, +<A HREF="../../../org/mozilla/javascript/Context.html#FEATURE_PARENT_PROTO_PROPRTIES"><CODE>FEATURE_PARENT_PROTO_PROPRTIES</CODE></A>, +<A HREF="../../../org/mozilla/javascript/Context.html#FEATURE_E4X"><CODE>FEATURE_E4X</CODE></A>, +<A HREF="../../../org/mozilla/javascript/Context.html#FEATURE_DYNAMIC_SCOPE"><CODE>FEATURE_DYNAMIC_SCOPE</CODE></A>, +<A HREF="../../../org/mozilla/javascript/Context.html#FEATURE_STRICT_VARS"><CODE>FEATURE_STRICT_VARS</CODE></A>, +<A HREF="../../../org/mozilla/javascript/Context.html#FEATURE_STRICT_EVAL"><CODE>FEATURE_STRICT_EVAL</CODE></A>, +<A HREF="../../../org/mozilla/javascript/Context.html#FEATURE_LOCATION_INFORMATION_IN_ERROR"><CODE>FEATURE_LOCATION_INFORMATION_IN_ERROR</CODE></A>, +<A HREF="../../../org/mozilla/javascript/Context.html#FEATURE_STRICT_MODE"><CODE>FEATURE_STRICT_MODE</CODE></A>, +<A HREF="../../../org/mozilla/javascript/Context.html#FEATURE_WARNING_AS_ERROR"><CODE>FEATURE_WARNING_AS_ERROR</CODE></A>, +<A HREF="../../../org/mozilla/javascript/Context.html#FEATURE_ENHANCED_JAVA_ACCESS"><CODE>FEATURE_ENHANCED_JAVA_ACCESS</CODE></A></DL> +</DD> +</DL> +<HR> + +<A NAME="getE4xImplementationFactory()"><!-- --></A><H3> +getE4xImplementationFactory</H3> +<PRE> +public org.mozilla.javascript.xml.XMLLib.Factory <B>getE4xImplementationFactory</B>()</PRE> +<DL> +<DD>Returns an object which specifies an E4X implementation to use within + this <code>Context</code>. Note + that the XMLLib.Factory interface should be considered experimental. + + The default implementation uses the implementation provided by this + <code>Context</code>'s <A HREF="../../../org/mozilla/javascript/ContextFactory.html" title="class in org.mozilla.javascript"><CODE>ContextFactory</CODE></A>. +<P> +<DD><DL> + +<DT><B>Returns:</B><DD>An XMLLib.Factory. Should not return <code>null</code> if + <A HREF="../../../org/mozilla/javascript/Context.html#FEATURE_E4X"><CODE>FEATURE_E4X</CODE></A> is enabled. See <A HREF="../../../org/mozilla/javascript/Context.html#hasFeature(int)"><CODE>hasFeature(int)</CODE></A>.</DL> +</DD> +</DL> +<HR> + +<A NAME="getInstructionObserverThreshold()"><!-- --></A><H3> +getInstructionObserverThreshold</H3> +<PRE> +public final int <B>getInstructionObserverThreshold</B>()</PRE> +<DL> +<DD>Get threshold of executed instructions counter that triggers call to + <code>observeInstructionCount()</code>. + When the threshold is zero, instruction counting is disabled, + otherwise each time the run-time executes at least the threshold value + of script instructions, <code>observeInstructionCount()</code> will + be called. +<P> +<DD><DL> +</DL> +</DD> +</DL> +<HR> + +<A NAME="setInstructionObserverThreshold(int)"><!-- --></A><H3> +setInstructionObserverThreshold</H3> +<PRE> +public final void <B>setInstructionObserverThreshold</B>(int threshold)</PRE> +<DL> +<DD>Set threshold of executed instructions counter that triggers call to + <code>observeInstructionCount()</code>. + When the threshold is zero, instruction counting is disabled, + otherwise each time the run-time executes at least the threshold value + of script instructions, <code>observeInstructionCount()</code> will + be called.<p/> + Note that the meaning of "instruction" is not guaranteed to be + consistent between compiled and interpretive modes: executing a given + script or function in the different modes will result in different + instruction counts against the threshold. + <A HREF="../../../org/mozilla/javascript/Context.html#setGenerateObserverCount(boolean)"><CODE>setGenerateObserverCount(boolean)</CODE></A> is called with true if + <code>threshold</code> is greater than zero, false otherwise. +<P> +<DD><DL> +<DT><B>Parameters:</B><DD><CODE>threshold</CODE> - The instruction threshold</DL> +</DD> +</DL> +<HR> + +<A NAME="setGenerateObserverCount(boolean)"><!-- --></A><H3> +setGenerateObserverCount</H3> +<PRE> +public void <B>setGenerateObserverCount</B>(boolean generateObserverCount)</PRE> +<DL> +<DD>Turn on or off generation of code with callbacks to + track the count of executed instructions. + Currently only affects JVM byte code generation: this slows down the + generated code, but code generated without the callbacks will not + be counted toward instruction thresholds. Rhino's interpretive + mode does instruction counting without inserting callbacks, so + there is no requirement to compile code differently. +<P> +<DD><DL> +<DT><B>Parameters:</B><DD><CODE>generateObserverCount</CODE> - if true, generated code will contain + calls to accumulate an estimate of the instructions executed.</DL> +</DD> +</DL> +<HR> + +<A NAME="observeInstructionCount(int)"><!-- --></A><H3> +observeInstructionCount</H3> +<PRE> +protected void <B>observeInstructionCount</B>(int instructionCount)</PRE> +<DL> +<DD>Allow application to monitor counter of executed script instructions + in Context subclasses. + Run-time calls this when instruction counting is enabled and the counter + reaches limit set by <code>setInstructionObserverThreshold()</code>. + The method is useful to observe long running scripts and if necessary + to terminate them. + <p> + The instruction counting support is available only for interpreted + scripts generated when the optimization level is set to -1. + <p> + The default implementation calls + <A HREF="../../../org/mozilla/javascript/ContextFactory.html#observeInstructionCount(org.mozilla.javascript.Context, int)"><CODE>ContextFactory.observeInstructionCount(Context cx, + int instructionCount)</CODE></A> + that allows to customize Context behavior without introducing + Context subclasses. +<P> +<DD><DL> +<DT><B>Parameters:</B><DD><CODE>instructionCount</CODE> - amount of script instruction executed since + last call to <code>observeInstructionCount</code> +<DT><B>Throws:</B> +<DD><CODE>java.lang.Error</CODE> - to terminate the script<DT><B>See Also:</B><DD><A HREF="../../../org/mozilla/javascript/Context.html#setOptimizationLevel(int)"><CODE>setOptimizationLevel(int)</CODE></A></DL> +</DD> +</DL> +<HR> + +<A NAME="createClassLoader(java.lang.ClassLoader)"><!-- --></A><H3> +createClassLoader</H3> +<PRE> +public <A HREF="../../../org/mozilla/javascript/GeneratedClassLoader.html" title="interface in org.mozilla.javascript">GeneratedClassLoader</A> <B>createClassLoader</B>(java.lang.ClassLoader parent)</PRE> +<DL> +<DD>Create class loader for generated classes. + The method calls <A HREF="../../../org/mozilla/javascript/ContextFactory.html#createClassLoader(java.lang.ClassLoader)"><CODE>ContextFactory.createClassLoader(ClassLoader)</CODE></A> + using the result of <A HREF="../../../org/mozilla/javascript/Context.html#getFactory()"><CODE>getFactory()</CODE></A>. +<P> +<DD><DL> +</DL> +</DD> +</DL> +<HR> + +<A NAME="getApplicationClassLoader()"><!-- --></A><H3> +getApplicationClassLoader</H3> +<PRE> +public final java.lang.ClassLoader <B>getApplicationClassLoader</B>()</PRE> +<DL> +<DD><DL> +</DL> +</DD> +</DL> +<HR> + +<A NAME="setApplicationClassLoader(java.lang.ClassLoader)"><!-- --></A><H3> +setApplicationClassLoader</H3> +<PRE> +public final void <B>setApplicationClassLoader</B>(java.lang.ClassLoader loader)</PRE> +<DL> +<DD><DL> +</DL> +</DD> +</DL> +<HR> + +<A NAME="isGeneratingDebugChanged()"><!-- --></A><H3> +isGeneratingDebugChanged</H3> +<PRE> +public final boolean <B>isGeneratingDebugChanged</B>()</PRE> +<DL> +<DD><DL> +</DL> +</DD> +</DL> +<HR> + +<A NAME="addActivationName(java.lang.String)"><!-- --></A><H3> +addActivationName</H3> +<PRE> +public void <B>addActivationName</B>(java.lang.String name)</PRE> +<DL> +<DD>Add a name to the list of names forcing the creation of real + activation objects for functions. +<P> +<DD><DL> +<DT><B>Parameters:</B><DD><CODE>name</CODE> - the name of the object to add to the list</DL> +</DD> +</DL> +<HR> + +<A NAME="isActivationNeeded(java.lang.String)"><!-- --></A><H3> +isActivationNeeded</H3> +<PRE> +public final boolean <B>isActivationNeeded</B>(java.lang.String name)</PRE> +<DL> +<DD>Check whether the name is in the list of names of objects + forcing the creation of activation objects. +<P> +<DD><DL> +<DT><B>Parameters:</B><DD><CODE>name</CODE> - the name of the object to test +<DT><B>Returns:</B><DD>true if an function activation object is needed.</DL> +</DD> +</DL> +<HR> + +<A NAME="removeActivationName(java.lang.String)"><!-- --></A><H3> +removeActivationName</H3> +<PRE> +public void <B>removeActivationName</B>(java.lang.String name)</PRE> +<DL> +<DD>Remove a name from the list of names forcing the creation of real + activation objects for functions. +<P> +<DD><DL> +<DT><B>Parameters:</B><DD><CODE>name</CODE> - the name of the object to remove from the list</DL> +</DD> +</DL> +<!-- ========= END OF CLASS DATA ========= --> +<HR> + + +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<A NAME="navbar_bottom"><!-- --></A> +<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> +<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> +<TR> +<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> +<A NAME="navbar_bottom_firstrow"><!-- --></A> +<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> + <TR ALIGN="center" VALIGN="top"> + <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> + <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> + <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> + <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> + <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> + <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> + <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> + </TR> +</TABLE> +</TD> +<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> +</EM> +</TD> +</TR> + +<TR> +<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> + <A HREF="../../../org/mozilla/javascript/CompilerEnvirons.html" title="class in org.mozilla.javascript"><B>PREV CLASS</B></A> + <A HREF="../../../org/mozilla/javascript/ContextAction.html" title="interface in org.mozilla.javascript"><B>NEXT CLASS</B></A></FONT></TD> +<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> + <A HREF="../../../index.html?org/mozilla/javascript/Context.html" target="_top"><B>FRAMES</B></A> + <A HREF="Context.html" target="_top"><B>NO FRAMES</B></A> + <SCRIPT type="text/javascript"> + <!-- + if(window==top) { + document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); + } + //--> +</SCRIPT> +<NOSCRIPT> + <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A> +</NOSCRIPT> + + +</FONT></TD> +</TR> +<TR> +<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> + SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> +<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> +DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> +</TR> +</TABLE> +<A NAME="skip-navbar_bottom"></A> +<!-- ======== END OF BOTTOM NAVBAR ======= --> + +<HR> + +</BODY> +</HTML> |