<!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:15 EST 2008 --> <TITLE> ScriptableObject (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="ScriptableObject (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/Scriptable.html" title="interface in org.mozilla.javascript"><B>PREV CLASS</B></A> <A HREF="../../../org/mozilla/javascript/SecurityController.html" title="class 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/ScriptableObject.html" target="_top"><B>FRAMES</B></A> <A HREF="ScriptableObject.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 ScriptableObject</H2> <PRE> java.lang.Object <IMG SRC="../../../resources/inherit.gif" ALT="extended by "><B>org.mozilla.javascript.ScriptableObject</B> </PRE> <DL> <DT><B>All Implemented Interfaces:</B> <DD>java.io.Serializable, org.mozilla.javascript.ConstProperties, org.mozilla.javascript.debug.DebuggableObject, <A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A></DD> </DL> <DL> <DT><B>Direct Known Subclasses:</B> <DD>org.mozilla.javascript.IdScriptableObject</DD> </DL> <HR> <DL> <DT><PRE>public abstract class <B>ScriptableObject</B><DT>extends java.lang.Object<DT>implements <A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A>, java.io.Serializable, org.mozilla.javascript.debug.DebuggableObject, org.mozilla.javascript.ConstProperties</DL> </PRE> <P> This is the default implementation of the Scriptable interface. This class provides convenient default behavior that makes it easier to define host objects. <p> Various properties and methods of JavaScript objects can be conveniently defined using methods of ScriptableObject. <p> Classes extending ScriptableObject must define the getClassName method. <P> <P> <DL> <DT><B>Author:</B></DT> <DD>Norris Boyd</DD> <DT><B>See Also:</B><DD><A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript"><CODE>Scriptable</CODE></A>, <A HREF="../../../serialized-form.html#org.mozilla.javascript.ScriptableObject">Serialized Form</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 int</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../org/mozilla/javascript/ScriptableObject.html#CONST">CONST</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/ScriptableObject.html#DONTENUM">DONTENUM</A></B></CODE> <BR> Property attribute indicating property is not enumerated.</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/ScriptableObject.html#EMPTY">EMPTY</A></B></CODE> <BR> The empty property attribute.</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/ScriptableObject.html#PERMANENT">PERMANENT</A></B></CODE> <BR> Property attribute indicating property cannot be deleted.</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/ScriptableObject.html#READONLY">READONLY</A></B></CODE> <BR> Property attribute indicating assignment to this property is ignored.</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/ScriptableObject.html#UNINITIALIZED_CONST">UNINITIALIZED_CONST</A></B></CODE> <BR> Property attribute indicating that this is a const property that has not been assigned yet.</TD> </TR> </TABLE> <A NAME="fields_inherited_from_class_org.mozilla.javascript.Scriptable"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> <TH ALIGN="left"><B>Fields inherited from interface org.mozilla.javascript.<A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A></B></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><A HREF="../../../org/mozilla/javascript/Scriptable.html#NOT_FOUND">NOT_FOUND</A></CODE></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/ScriptableObject.html#ScriptableObject()">ScriptableObject</A></B>()</CODE> <BR> </TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../org/mozilla/javascript/ScriptableObject.html#ScriptableObject(org.mozilla.javascript.Scriptable, org.mozilla.javascript.Scriptable)">ScriptableObject</A></B>(<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> prototype)</CODE> <BR> </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> java.lang.Object</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../org/mozilla/javascript/ScriptableObject.html#associateValue(java.lang.Object, java.lang.Object)">associateValue</A></B>(java.lang.Object key, java.lang.Object value)</CODE> <BR> Associate arbitrary application-specific value with this object.</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/ScriptableObject.html#avoidObjectDetection()">avoidObjectDetection</A></B>()</CODE> <BR> Emulate the SpiderMonkey (and Firefox) feature of allowing custom objects to avoid detection by normal "object detection" code patterns.</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/ScriptableObject.html#callMethod(org.mozilla.javascript.Context, org.mozilla.javascript.Scriptable, java.lang.String, java.lang.Object[])">callMethod</A></B>(<A HREF="../../../org/mozilla/javascript/Context.html" title="class in org.mozilla.javascript">Context</A> cx, <A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> obj, java.lang.String methodName, java.lang.Object[] args)</CODE> <BR> Call a method of an object.</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/ScriptableObject.html#callMethod(org.mozilla.javascript.Scriptable, java.lang.String, java.lang.Object[])">callMethod</A></B>(<A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> obj, java.lang.String methodName, java.lang.Object[] args)</CODE> <BR> Call a method of an object.</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/ScriptableObject.html#defineClass(org.mozilla.javascript.Scriptable, java.lang.Class)">defineClass</A></B>(<A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> scope, java.lang.Class clazz)</CODE> <BR> Defines JavaScript objects from a Java class that implements Scriptable.</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/ScriptableObject.html#defineClass(org.mozilla.javascript.Scriptable, java.lang.Class, boolean)">defineClass</A></B>(<A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> scope, java.lang.Class clazz, boolean sealed)</CODE> <BR> Defines JavaScript objects from a Java class, optionally allowing sealing.</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/ScriptableObject.html#defineClass(org.mozilla.javascript.Scriptable, java.lang.Class, boolean, boolean)">defineClass</A></B>(<A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> scope, java.lang.Class clazz, boolean sealed, boolean mapInheritance)</CODE> <BR> Defines JavaScript objects from a Java class, optionally allowing sealing and mapping of Java inheritance to JavaScript prototype-based inheritance.</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/ScriptableObject.html#defineConst(java.lang.String, org.mozilla.javascript.Scriptable)">defineConst</A></B>(java.lang.String name, <A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> start)</CODE> <BR> Reserves a definition spot for a const.</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/ScriptableObject.html#defineConstProperty(org.mozilla.javascript.Scriptable, java.lang.String)">defineConstProperty</A></B>(<A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> destination, java.lang.String propertyName)</CODE> <BR> Utility method to add properties to arbitrary Scriptable object.</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/ScriptableObject.html#defineFunctionProperties(java.lang.String[], java.lang.Class, int)">defineFunctionProperties</A></B>(java.lang.String[] names, java.lang.Class clazz, int attributes)</CODE> <BR> Search for names in a class, adding the resulting methods as properties.</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/ScriptableObject.html#defineProperty(org.mozilla.javascript.Scriptable, java.lang.String, java.lang.Object, int)">defineProperty</A></B>(<A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> destination, java.lang.String propertyName, java.lang.Object value, int attributes)</CODE> <BR> Utility method to add properties to arbitrary Scriptable object.</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/ScriptableObject.html#defineProperty(java.lang.String, java.lang.Class, int)">defineProperty</A></B>(java.lang.String propertyName, java.lang.Class clazz, int attributes)</CODE> <BR> Define a JavaScript property with getter and setter side effects.</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/ScriptableObject.html#defineProperty(java.lang.String, java.lang.Object, int)">defineProperty</A></B>(java.lang.String propertyName, java.lang.Object value, int attributes)</CODE> <BR> Define a JavaScript 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/ScriptableObject.html#defineProperty(java.lang.String, java.lang.Object, java.lang.reflect.Method, java.lang.reflect.Method, int)">defineProperty</A></B>(java.lang.String propertyName, java.lang.Object delegateTo, java.lang.reflect.Method getter, java.lang.reflect.Method setter, int attributes)</CODE> <BR> Define a JavaScript 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/ScriptableObject.html#delete(int)">delete</A></B>(int index)</CODE> <BR> Removes the indexed property from the object.</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/ScriptableObject.html#delete(java.lang.String)">delete</A></B>(java.lang.String name)</CODE> <BR> Removes a named property from the object.</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/ScriptableObject.html#deleteProperty(org.mozilla.javascript.Scriptable, int)">deleteProperty</A></B>(<A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> obj, int index)</CODE> <BR> Removes the property from an object or its prototype chain.</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/ScriptableObject.html#deleteProperty(org.mozilla.javascript.Scriptable, java.lang.String)">deleteProperty</A></B>(<A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> obj, java.lang.String name)</CODE> <BR> Removes the property from an object or its prototype chain.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>protected java.lang.Object</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../org/mozilla/javascript/ScriptableObject.html#equivalentValues(java.lang.Object)">equivalentValues</A></B>(java.lang.Object value)</CODE> <BR> Custom <tt>==</tt> operator.</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/ScriptableObject.html#get(int, org.mozilla.javascript.Scriptable)">get</A></B>(int index, <A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> start)</CODE> <BR> Returns the value of the indexed property or NOT_FOUND.</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/ScriptableObject.html#get(java.lang.String, org.mozilla.javascript.Scriptable)">get</A></B>(java.lang.String name, <A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> start)</CODE> <BR> Returns the value of the named property or NOT_FOUND.</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/ScriptableObject.html#getAllIds()">getAllIds</A></B>()</CODE> <BR> Returns an array of ids for the properties of the object.</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/ScriptableObject.html#getAssociatedValue(java.lang.Object)">getAssociatedValue</A></B>(java.lang.Object key)</CODE> <BR> Get arbitrary application-specific value associated with this object.</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/ScriptableObject.html#getAttributes(int)">getAttributes</A></B>(int index)</CODE> <BR> Get the attributes of an indexed property.</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/ScriptableObject.html#getAttributes(int, org.mozilla.javascript.Scriptable)">getAttributes</A></B>(int index, <A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> start)</CODE> <BR> <B>Deprecated.</B> <I>Use <A HREF="../../../org/mozilla/javascript/ScriptableObject.html#getAttributes(int)"><CODE>getAttributes(int index)</CODE></A>. The engine always ignored the start argument.</I></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/ScriptableObject.html#getAttributes(java.lang.String)">getAttributes</A></B>(java.lang.String name)</CODE> <BR> Get the attributes of a named property.</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/ScriptableObject.html#getAttributes(java.lang.String, org.mozilla.javascript.Scriptable)">getAttributes</A></B>(java.lang.String name, <A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> start)</CODE> <BR> <B>Deprecated.</B> <I>Use <A HREF="../../../org/mozilla/javascript/ScriptableObject.html#getAttributes(java.lang.String)"><CODE>getAttributes(String name)</CODE></A>. The engine always ignored the start argument.</I></TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>abstract java.lang.String</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../org/mozilla/javascript/ScriptableObject.html#getClassName()">getClassName</A></B>()</CODE> <BR> Return the name of the class.</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/ScriptableObject.html#getClassPrototype(org.mozilla.javascript.Scriptable, java.lang.String)">getClassPrototype</A></B>(<A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> scope, java.lang.String className)</CODE> <BR> Get the prototype for the named class.</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/ScriptableObject.html#getDefaultValue(java.lang.Class)">getDefaultValue</A></B>(java.lang.Class typeHint)</CODE> <BR> Implements the [[DefaultValue]] internal method.</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/ScriptableObject.html#getDefaultValue(org.mozilla.javascript.Scriptable, java.lang.Class)">getDefaultValue</A></B>(<A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> object, java.lang.Class typeHint)</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/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../org/mozilla/javascript/ScriptableObject.html#getFunctionPrototype(org.mozilla.javascript.Scriptable)">getFunctionPrototype</A></B>(<A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> scope)</CODE> <BR> Get the Function.prototype property.</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/ScriptableObject.html#getGetterOrSetter(java.lang.String, int, boolean)">getGetterOrSetter</A></B>(java.lang.String name, int index, boolean isSetter)</CODE> <BR> Get the getter or setter for a given property.</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/ScriptableObject.html#getIds()">getIds</A></B>()</CODE> <BR> Returns an array of ids for the properties of the object.</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/ScriptableObject.html#getObjectPrototype(org.mozilla.javascript.Scriptable)">getObjectPrototype</A></B>(<A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> scope)</CODE> <BR> Get the Object.prototype property.</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/ScriptableObject.html#getParentScope()">getParentScope</A></B>()</CODE> <BR> Returns the parent (enclosing) scope of the object.</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/ScriptableObject.html#getProperty(org.mozilla.javascript.Scriptable, int)">getProperty</A></B>(<A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> obj, int index)</CODE> <BR> Gets an indexed property from an object or any object in its prototype chain.</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/ScriptableObject.html#getProperty(org.mozilla.javascript.Scriptable, java.lang.String)">getProperty</A></B>(<A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> obj, java.lang.String name)</CODE> <BR> Gets a named property from an object or any object in its prototype chain.</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/ScriptableObject.html#getPropertyIds(org.mozilla.javascript.Scriptable)">getPropertyIds</A></B>(<A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> obj)</CODE> <BR> Returns an array of all ids from an object and its prototypes.</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/ScriptableObject.html#getPrototype()">getPrototype</A></B>()</CODE> <BR> Returns the prototype of the object.</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/ScriptableObject.html#getTopLevelScope(org.mozilla.javascript.Scriptable)">getTopLevelScope</A></B>(<A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> obj)</CODE> <BR> Get the global scope.</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/ScriptableObject.html#getTopScopeValue(org.mozilla.javascript.Scriptable, java.lang.Object)">getTopScopeValue</A></B>(<A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> scope, java.lang.Object key)</CODE> <BR> Get arbitrary application-specific value associated with the top scope of the given scope.</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/ScriptableObject.html#has(int, org.mozilla.javascript.Scriptable)">has</A></B>(int index, <A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> start)</CODE> <BR> Returns true if the property index 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/ScriptableObject.html#has(java.lang.String, org.mozilla.javascript.Scriptable)">has</A></B>(java.lang.String name, <A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> start)</CODE> <BR> Returns true if the named property 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/ScriptableObject.html#hasInstance(org.mozilla.javascript.Scriptable)">hasInstance</A></B>(<A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> instance)</CODE> <BR> Implements the instanceof operator.</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/ScriptableObject.html#hasProperty(org.mozilla.javascript.Scriptable, int)">hasProperty</A></B>(<A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> obj, int index)</CODE> <BR> Returns whether an indexed property is defined in an object or any object in its prototype chain.</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/ScriptableObject.html#hasProperty(org.mozilla.javascript.Scriptable, java.lang.String)">hasProperty</A></B>(<A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> obj, java.lang.String name)</CODE> <BR> Returns whether a named property is defined in an object or any object in its prototype chain.</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/ScriptableObject.html#isConst(java.lang.String)">isConst</A></B>(java.lang.String name)</CODE> <BR> Returns true if the named property is defined as a const on this object.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>protected boolean</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../org/mozilla/javascript/ScriptableObject.html#isGetterOrSetter(java.lang.String, int, boolean)">isGetterOrSetter</A></B>(java.lang.String name, int index, boolean setter)</CODE> <BR> Returns whether a property is a getter or a setter</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/ScriptableObject.html#isSealed()">isSealed</A></B>()</CODE> <BR> Return true if this object is sealed.</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/ScriptableObject.html#put(int, org.mozilla.javascript.Scriptable, java.lang.Object)">put</A></B>(int index, <A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> start, java.lang.Object value)</CODE> <BR> Sets the value of the indexed property, creating it if need be.</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/ScriptableObject.html#put(java.lang.String, org.mozilla.javascript.Scriptable, java.lang.Object)">put</A></B>(java.lang.String name, <A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> start, java.lang.Object value)</CODE> <BR> Sets the value of the named property, creating it if need be.</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/ScriptableObject.html#putConst(java.lang.String, org.mozilla.javascript.Scriptable, java.lang.Object)">putConst</A></B>(java.lang.String name, <A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> start, java.lang.Object value)</CODE> <BR> Sets the value of the named const property, creating it if need be.</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/ScriptableObject.html#putConstProperty(org.mozilla.javascript.Scriptable, java.lang.String, java.lang.Object)">putConstProperty</A></B>(<A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> obj, java.lang.String name, java.lang.Object value)</CODE> <BR> Puts a named property in an object or in an object in its prototype chain.</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/ScriptableObject.html#putProperty(org.mozilla.javascript.Scriptable, int, java.lang.Object)">putProperty</A></B>(<A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> obj, int index, java.lang.Object value)</CODE> <BR> Puts an indexed property in an object or in an object in its prototype chain.</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/ScriptableObject.html#putProperty(org.mozilla.javascript.Scriptable, java.lang.String, java.lang.Object)">putProperty</A></B>(<A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> obj, java.lang.String name, java.lang.Object value)</CODE> <BR> Puts a named property in an object or in an object in its prototype chain.</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/ScriptableObject.html#redefineProperty(org.mozilla.javascript.Scriptable, java.lang.String, boolean)">redefineProperty</A></B>(<A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> obj, java.lang.String name, boolean isConst)</CODE> <BR> If hasProperty(obj, name) would return true, then if the property that was found is compatible with the new property, this method just returns.</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/ScriptableObject.html#sealObject()">sealObject</A></B>()</CODE> <BR> Seal this object.</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/ScriptableObject.html#setAttributes(int, int)">setAttributes</A></B>(int index, int attributes)</CODE> <BR> Set the attributes of an indexed 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/ScriptableObject.html#setAttributes(int, org.mozilla.javascript.Scriptable, int)">setAttributes</A></B>(int index, <A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> start, int attributes)</CODE> <BR> <B>Deprecated.</B> <I>Use <A HREF="../../../org/mozilla/javascript/ScriptableObject.html#setAttributes(int, int)"><CODE>setAttributes(int index, int attributes)</CODE></A>. The engine always ignored the start argument.</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/ScriptableObject.html#setAttributes(java.lang.String, int)">setAttributes</A></B>(java.lang.String name, int attributes)</CODE> <BR> Set the attributes of a named 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/ScriptableObject.html#setAttributes(java.lang.String, org.mozilla.javascript.Scriptable, int)">setAttributes</A></B>(java.lang.String name, <A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> start, int attributes)</CODE> <BR> <B>Deprecated.</B> <I>Use <A HREF="../../../org/mozilla/javascript/ScriptableObject.html#setAttributes(java.lang.String, int)"><CODE>setAttributes(String name, int attributes)</CODE></A>. The engine always ignored the start argument.</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/ScriptableObject.html#setGetterOrSetter(java.lang.String, int, org.mozilla.javascript.Callable, boolean)">setGetterOrSetter</A></B>(java.lang.String name, int index, <A HREF="../../../org/mozilla/javascript/Callable.html" title="interface in org.mozilla.javascript">Callable</A> getterOrSeter, boolean isSetter)</CODE> <BR> XXX: write docs.</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/ScriptableObject.html#setParentScope(org.mozilla.javascript.Scriptable)">setParentScope</A></B>(<A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> m)</CODE> <BR> Sets the parent (enclosing) scope of the object.</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/ScriptableObject.html#setPrototype(org.mozilla.javascript.Scriptable)">setPrototype</A></B>(<A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> m)</CODE> <BR> Sets the prototype of the 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="EMPTY"><!-- --></A><H3> EMPTY</H3> <PRE> public static final int <B>EMPTY</B></PRE> <DL> <DD>The empty property attribute. Used by getAttributes() and setAttributes(). <P> <DL> <DT><B>See Also:</B><DD><A HREF="../../../org/mozilla/javascript/ScriptableObject.html#getAttributes(java.lang.String)"><CODE>getAttributes(String)</CODE></A>, <A HREF="../../../org/mozilla/javascript/ScriptableObject.html#setAttributes(java.lang.String, int)"><CODE>setAttributes(String, int)</CODE></A>, <A HREF="../../../constant-values.html#org.mozilla.javascript.ScriptableObject.EMPTY">Constant Field Values</A></DL> </DL> <HR> <A NAME="READONLY"><!-- --></A><H3> READONLY</H3> <PRE> public static final int <B>READONLY</B></PRE> <DL> <DD>Property attribute indicating assignment to this property is ignored. <P> <DL> <DT><B>See Also:</B><DD><A HREF="../../../org/mozilla/javascript/ScriptableObject.html" title="class in org.mozilla.javascript"><CODE>#put(String, Scriptable, Object)</CODE></A>, <A HREF="../../../org/mozilla/javascript/ScriptableObject.html#getAttributes(java.lang.String)"><CODE>getAttributes(String)</CODE></A>, <A HREF="../../../org/mozilla/javascript/ScriptableObject.html#setAttributes(java.lang.String, int)"><CODE>setAttributes(String, int)</CODE></A>, <A HREF="../../../constant-values.html#org.mozilla.javascript.ScriptableObject.READONLY">Constant Field Values</A></DL> </DL> <HR> <A NAME="DONTENUM"><!-- --></A><H3> DONTENUM</H3> <PRE> public static final int <B>DONTENUM</B></PRE> <DL> <DD>Property attribute indicating property is not enumerated. Only enumerated properties will be returned by getIds(). <P> <DL> <DT><B>See Also:</B><DD><A HREF="../../../org/mozilla/javascript/ScriptableObject.html#getIds()"><CODE>getIds()</CODE></A>, <A HREF="../../../org/mozilla/javascript/ScriptableObject.html#getAttributes(java.lang.String)"><CODE>getAttributes(String)</CODE></A>, <A HREF="../../../org/mozilla/javascript/ScriptableObject.html#setAttributes(java.lang.String, int)"><CODE>setAttributes(String, int)</CODE></A>, <A HREF="../../../constant-values.html#org.mozilla.javascript.ScriptableObject.DONTENUM">Constant Field Values</A></DL> </DL> <HR> <A NAME="PERMANENT"><!-- --></A><H3> PERMANENT</H3> <PRE> public static final int <B>PERMANENT</B></PRE> <DL> <DD>Property attribute indicating property cannot be deleted. <P> <DL> <DT><B>See Also:</B><DD><A HREF="../../../org/mozilla/javascript/ScriptableObject.html#delete(java.lang.String)"><CODE>delete(String)</CODE></A>, <A HREF="../../../org/mozilla/javascript/ScriptableObject.html#getAttributes(java.lang.String)"><CODE>getAttributes(String)</CODE></A>, <A HREF="../../../org/mozilla/javascript/ScriptableObject.html#setAttributes(java.lang.String, int)"><CODE>setAttributes(String, int)</CODE></A>, <A HREF="../../../constant-values.html#org.mozilla.javascript.ScriptableObject.PERMANENT">Constant Field Values</A></DL> </DL> <HR> <A NAME="UNINITIALIZED_CONST"><!-- --></A><H3> UNINITIALIZED_CONST</H3> <PRE> public static final int <B>UNINITIALIZED_CONST</B></PRE> <DL> <DD>Property attribute indicating that this is a const property that has not been assigned yet. The first 'const' assignment to the property will clear this bit. <P> <DL> <DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#org.mozilla.javascript.ScriptableObject.UNINITIALIZED_CONST">Constant Field Values</A></DL> </DL> <HR> <A NAME="CONST"><!-- --></A><H3> CONST</H3> <PRE> public static final int <B>CONST</B></PRE> <DL> <DL> <DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#org.mozilla.javascript.ScriptableObject.CONST">Constant Field Values</A></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="ScriptableObject()"><!-- --></A><H3> ScriptableObject</H3> <PRE> public <B>ScriptableObject</B>()</PRE> <DL> </DL> <HR> <A NAME="ScriptableObject(org.mozilla.javascript.Scriptable, org.mozilla.javascript.Scriptable)"><!-- --></A><H3> ScriptableObject</H3> <PRE> public <B>ScriptableObject</B>(<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> prototype)</PRE> <DL> </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="getClassName()"><!-- --></A><H3> getClassName</H3> <PRE> public abstract java.lang.String <B>getClassName</B>()</PRE> <DL> <DD>Return the name of the class. This is typically the same name as the constructor. Classes extending ScriptableObject must implement this abstract method. <P> <DD><DL> <DT><B>Specified by:</B><DD><CODE><A HREF="../../../org/mozilla/javascript/Scriptable.html#getClassName()">getClassName</A></CODE> in interface <CODE><A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A></CODE></DL> </DD> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="has(java.lang.String, org.mozilla.javascript.Scriptable)"><!-- --></A><H3> has</H3> <PRE> public boolean <B>has</B>(java.lang.String name, <A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> start)</PRE> <DL> <DD>Returns true if the named property is defined. <P> <DD><DL> <DT><B>Specified by:</B><DD><CODE><A HREF="../../../org/mozilla/javascript/Scriptable.html#has(java.lang.String, org.mozilla.javascript.Scriptable)">has</A></CODE> in interface <CODE><A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A></CODE></DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>name</CODE> - the name of the property<DD><CODE>start</CODE> - the object in which the lookup began <DT><B>Returns:</B><DD>true if and only if the property was found in the object<DT><B>See Also:</B><DD><A HREF="../../../org/mozilla/javascript/Scriptable.html#get(java.lang.String, org.mozilla.javascript.Scriptable)"><CODE>Scriptable.get(String, Scriptable)</CODE></A>, <A HREF="../../../org/mozilla/javascript/ScriptableObject.html#getProperty(org.mozilla.javascript.Scriptable, java.lang.String)"><CODE>getProperty(Scriptable, String)</CODE></A></DL> </DD> </DL> <HR> <A NAME="has(int, org.mozilla.javascript.Scriptable)"><!-- --></A><H3> has</H3> <PRE> public boolean <B>has</B>(int index, <A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> start)</PRE> <DL> <DD>Returns true if the property index is defined. <P> <DD><DL> <DT><B>Specified by:</B><DD><CODE><A HREF="../../../org/mozilla/javascript/Scriptable.html#has(int, org.mozilla.javascript.Scriptable)">has</A></CODE> in interface <CODE><A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A></CODE></DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>index</CODE> - the numeric index for the property<DD><CODE>start</CODE> - the object in which the lookup began <DT><B>Returns:</B><DD>true if and only if the property was found in the object<DT><B>See Also:</B><DD><A HREF="../../../org/mozilla/javascript/Scriptable.html#get(int, org.mozilla.javascript.Scriptable)"><CODE>Scriptable.get(int, Scriptable)</CODE></A>, <A HREF="../../../org/mozilla/javascript/ScriptableObject.html#getProperty(org.mozilla.javascript.Scriptable, int)"><CODE>getProperty(Scriptable, int)</CODE></A></DL> </DD> </DL> <HR> <A NAME="get(java.lang.String, org.mozilla.javascript.Scriptable)"><!-- --></A><H3> get</H3> <PRE> public java.lang.Object <B>get</B>(java.lang.String name, <A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> start)</PRE> <DL> <DD>Returns the value of the named property or NOT_FOUND. If the property was created using defineProperty, the appropriate getter method is called. <P> <DD><DL> <DT><B>Specified by:</B><DD><CODE><A HREF="../../../org/mozilla/javascript/Scriptable.html#get(java.lang.String, org.mozilla.javascript.Scriptable)">get</A></CODE> in interface <CODE><A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A></CODE></DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>name</CODE> - the name of the property<DD><CODE>start</CODE> - the object in which the lookup began <DT><B>Returns:</B><DD>the value of the property (may be null), or NOT_FOUND<DT><B>See Also:</B><DD><A HREF="../../../org/mozilla/javascript/Context.html#getUndefinedValue()"><CODE>Context.getUndefinedValue()</CODE></A></DL> </DD> </DL> <HR> <A NAME="get(int, org.mozilla.javascript.Scriptable)"><!-- --></A><H3> get</H3> <PRE> public java.lang.Object <B>get</B>(int index, <A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> start)</PRE> <DL> <DD>Returns the value of the indexed property or NOT_FOUND. <P> <DD><DL> <DT><B>Specified by:</B><DD><CODE><A HREF="../../../org/mozilla/javascript/Scriptable.html#get(int, org.mozilla.javascript.Scriptable)">get</A></CODE> in interface <CODE><A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A></CODE></DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>index</CODE> - the numeric index for the property<DD><CODE>start</CODE> - the object in which the lookup began <DT><B>Returns:</B><DD>the value of the property (may be null), or NOT_FOUND<DT><B>See Also:</B><DD><A HREF="../../../org/mozilla/javascript/Scriptable.html#get(java.lang.String, org.mozilla.javascript.Scriptable)"><CODE>Scriptable.get(String,Scriptable)</CODE></A></DL> </DD> </DL> <HR> <A NAME="put(java.lang.String, org.mozilla.javascript.Scriptable, java.lang.Object)"><!-- --></A><H3> put</H3> <PRE> public void <B>put</B>(java.lang.String name, <A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> start, java.lang.Object value)</PRE> <DL> <DD>Sets the value of the named property, creating it if need be. If the property was created using defineProperty, the appropriate setter method is called. <p> If the property's attributes include READONLY, no action is taken. This method will actually set the property in the start object. <P> <DD><DL> <DT><B>Specified by:</B><DD><CODE><A HREF="../../../org/mozilla/javascript/Scriptable.html#put(java.lang.String, org.mozilla.javascript.Scriptable, java.lang.Object)">put</A></CODE> in interface <CODE><A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A></CODE></DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>name</CODE> - the name of the property<DD><CODE>start</CODE> - the object whose property is being set<DD><CODE>value</CODE> - value to set the property to<DT><B>See Also:</B><DD><A HREF="../../../org/mozilla/javascript/Scriptable.html#has(java.lang.String, org.mozilla.javascript.Scriptable)"><CODE>Scriptable.has(String, Scriptable)</CODE></A>, <A HREF="../../../org/mozilla/javascript/Scriptable.html#get(java.lang.String, org.mozilla.javascript.Scriptable)"><CODE>Scriptable.get(String, Scriptable)</CODE></A>, <A HREF="../../../org/mozilla/javascript/ScriptableObject.html#putProperty(org.mozilla.javascript.Scriptable, java.lang.String, java.lang.Object)"><CODE>putProperty(Scriptable, String, Object)</CODE></A>, <A HREF="../../../org/mozilla/javascript/Context.html#toObject(java.lang.Object, org.mozilla.javascript.Scriptable)"><CODE>Context.toObject(Object, Scriptable)</CODE></A></DL> </DD> </DL> <HR> <A NAME="put(int, org.mozilla.javascript.Scriptable, java.lang.Object)"><!-- --></A><H3> put</H3> <PRE> public void <B>put</B>(int index, <A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> start, java.lang.Object value)</PRE> <DL> <DD>Sets the value of the indexed property, creating it if need be. <P> <DD><DL> <DT><B>Specified by:</B><DD><CODE><A HREF="../../../org/mozilla/javascript/Scriptable.html#put(int, org.mozilla.javascript.Scriptable, java.lang.Object)">put</A></CODE> in interface <CODE><A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A></CODE></DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>index</CODE> - the numeric index for the property<DD><CODE>start</CODE> - the object whose property is being set<DD><CODE>value</CODE> - value to set the property to<DT><B>See Also:</B><DD><A HREF="../../../org/mozilla/javascript/Scriptable.html#has(int, org.mozilla.javascript.Scriptable)"><CODE>Scriptable.has(int, Scriptable)</CODE></A>, <A HREF="../../../org/mozilla/javascript/Scriptable.html#get(int, org.mozilla.javascript.Scriptable)"><CODE>Scriptable.get(int, Scriptable)</CODE></A>, <A HREF="../../../org/mozilla/javascript/ScriptableObject.html#putProperty(org.mozilla.javascript.Scriptable, int, java.lang.Object)"><CODE>putProperty(Scriptable, int, Object)</CODE></A>, <A HREF="../../../org/mozilla/javascript/Context.html#toObject(java.lang.Object, org.mozilla.javascript.Scriptable)"><CODE>Context.toObject(Object, Scriptable)</CODE></A></DL> </DD> </DL> <HR> <A NAME="delete(java.lang.String)"><!-- --></A><H3> delete</H3> <PRE> public void <B>delete</B>(java.lang.String name)</PRE> <DL> <DD>Removes a named property from the object. If the property is not found, or it has the PERMANENT attribute, no action is taken. <P> <DD><DL> <DT><B>Specified by:</B><DD><CODE><A HREF="../../../org/mozilla/javascript/Scriptable.html#delete(java.lang.String)">delete</A></CODE> in interface <CODE><A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A></CODE></DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>name</CODE> - the name of the property<DT><B>See Also:</B><DD><A HREF="../../../org/mozilla/javascript/Scriptable.html#get(java.lang.String, org.mozilla.javascript.Scriptable)"><CODE>Scriptable.get(String, Scriptable)</CODE></A>, <A HREF="../../../org/mozilla/javascript/ScriptableObject.html#deleteProperty(org.mozilla.javascript.Scriptable, java.lang.String)"><CODE>deleteProperty(Scriptable, String)</CODE></A></DL> </DD> </DL> <HR> <A NAME="delete(int)"><!-- --></A><H3> delete</H3> <PRE> public void <B>delete</B>(int index)</PRE> <DL> <DD>Removes the indexed property from the object. If the property is not found, or it has the PERMANENT attribute, no action is taken. <P> <DD><DL> <DT><B>Specified by:</B><DD><CODE><A HREF="../../../org/mozilla/javascript/Scriptable.html#delete(int)">delete</A></CODE> in interface <CODE><A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A></CODE></DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>index</CODE> - the numeric index for the property<DT><B>See Also:</B><DD><A HREF="../../../org/mozilla/javascript/Scriptable.html#get(int, org.mozilla.javascript.Scriptable)"><CODE>Scriptable.get(int, Scriptable)</CODE></A>, <A HREF="../../../org/mozilla/javascript/ScriptableObject.html#deleteProperty(org.mozilla.javascript.Scriptable, int)"><CODE>deleteProperty(Scriptable, int)</CODE></A></DL> </DD> </DL> <HR> <A NAME="putConst(java.lang.String, org.mozilla.javascript.Scriptable, java.lang.Object)"><!-- --></A><H3> putConst</H3> <PRE> public void <B>putConst</B>(java.lang.String name, <A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> start, java.lang.Object value)</PRE> <DL> <DD>Sets the value of the named const property, creating it if need be. If the property was created using defineProperty, the appropriate setter method is called. <p> If the property's attributes include READONLY, no action is taken. This method will actually set the property in the start object. <P> <DD><DL> <DT><B>Specified by:</B><DD><CODE>putConst</CODE> in interface <CODE>org.mozilla.javascript.ConstProperties</CODE></DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>name</CODE> - the name of the property<DD><CODE>start</CODE> - the object whose property is being set<DD><CODE>value</CODE> - value to set the property to<DT><B>See Also:</B><DD><A HREF="../../../org/mozilla/javascript/Scriptable.html#has(java.lang.String, org.mozilla.javascript.Scriptable)"><CODE>Scriptable.has(String, Scriptable)</CODE></A>, <A HREF="../../../org/mozilla/javascript/Scriptable.html#get(java.lang.String, org.mozilla.javascript.Scriptable)"><CODE>Scriptable.get(String, Scriptable)</CODE></A>, <A HREF="../../../org/mozilla/javascript/ScriptableObject.html#putProperty(org.mozilla.javascript.Scriptable, java.lang.String, java.lang.Object)"><CODE>putProperty(Scriptable, String, Object)</CODE></A>, <A HREF="../../../org/mozilla/javascript/Context.html#toObject(java.lang.Object, org.mozilla.javascript.Scriptable)"><CODE>Context.toObject(Object, Scriptable)</CODE></A></DL> </DD> </DL> <HR> <A NAME="defineConst(java.lang.String, org.mozilla.javascript.Scriptable)"><!-- --></A><H3> defineConst</H3> <PRE> public void <B>defineConst</B>(java.lang.String name, <A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> start)</PRE> <DL> <DD><B>Description copied from interface: <CODE>org.mozilla.javascript.ConstProperties</CODE></B></DD> <DD>Reserves a definition spot for a const. This will set up a definition of the const property, but set its value to undefined. The semantics of the start parameter is the same as for putConst. <P> <DD><DL> <DT><B>Specified by:</B><DD><CODE>defineConst</CODE> in interface <CODE>org.mozilla.javascript.ConstProperties</CODE></DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>name</CODE> - The name of the property.<DD><CODE>start</CODE> - The object whose property is being reserved.</DL> </DD> </DL> <HR> <A NAME="isConst(java.lang.String)"><!-- --></A><H3> isConst</H3> <PRE> public boolean <B>isConst</B>(java.lang.String name)</PRE> <DL> <DD>Returns true if the named property is defined as a const on this object. <P> <DD><DL> <DT><B>Specified by:</B><DD><CODE>isConst</CODE> in interface <CODE>org.mozilla.javascript.ConstProperties</CODE></DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>name</CODE> - <DT><B>Returns:</B><DD>true if the named property is defined as a const, false otherwise.</DL> </DD> </DL> <HR> <A NAME="getAttributes(java.lang.String, org.mozilla.javascript.Scriptable)"><!-- --></A><H3> getAttributes</H3> <PRE> public final int <B>getAttributes</B>(java.lang.String name, <A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> start)</PRE> <DL> <DD><B>Deprecated.</B> <I>Use <A HREF="../../../org/mozilla/javascript/ScriptableObject.html#getAttributes(java.lang.String)"><CODE>getAttributes(String name)</CODE></A>. The engine always ignored the start argument.</I> <P> <DD><DL> </DL> </DD> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="getAttributes(int, org.mozilla.javascript.Scriptable)"><!-- --></A><H3> getAttributes</H3> <PRE> public final int <B>getAttributes</B>(int index, <A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> start)</PRE> <DL> <DD><B>Deprecated.</B> <I>Use <A HREF="../../../org/mozilla/javascript/ScriptableObject.html#getAttributes(int)"><CODE>getAttributes(int index)</CODE></A>. The engine always ignored the start argument.</I> <P> <DD><DL> </DL> </DD> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="setAttributes(java.lang.String, org.mozilla.javascript.Scriptable, int)"><!-- --></A><H3> setAttributes</H3> <PRE> public final void <B>setAttributes</B>(java.lang.String name, <A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> start, int attributes)</PRE> <DL> <DD><B>Deprecated.</B> <I>Use <A HREF="../../../org/mozilla/javascript/ScriptableObject.html#setAttributes(java.lang.String, int)"><CODE>setAttributes(String name, int attributes)</CODE></A>. The engine always ignored the start argument.</I> <P> <DD><DL> </DL> </DD> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="setAttributes(int, org.mozilla.javascript.Scriptable, int)"><!-- --></A><H3> setAttributes</H3> <PRE> public void <B>setAttributes</B>(int index, <A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> start, int attributes)</PRE> <DL> <DD><B>Deprecated.</B> <I>Use <A HREF="../../../org/mozilla/javascript/ScriptableObject.html#setAttributes(int, int)"><CODE>setAttributes(int index, int attributes)</CODE></A>. The engine always ignored the start argument.</I> <P> <DD><DL> </DL> </DD> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="getAttributes(java.lang.String)"><!-- --></A><H3> getAttributes</H3> <PRE> public int <B>getAttributes</B>(java.lang.String name)</PRE> <DL> <DD>Get the attributes of a named property. The property is specified by <code>name</code> as defined for <code>has</code>.<p> <P> <DD><DL> </DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>name</CODE> - the identifier for the property <DT><B>Returns:</B><DD>the bitset of attributes <DT><B>Throws:</B> <DD><CODE><A HREF="../../../org/mozilla/javascript/EvaluatorException.html" title="class in org.mozilla.javascript">EvaluatorException</A></CODE> - if the named property is not found<DT><B>See Also:</B><DD><A HREF="../../../org/mozilla/javascript/ScriptableObject.html#has(java.lang.String, org.mozilla.javascript.Scriptable)"><CODE>has(String, Scriptable)</CODE></A>, <A HREF="../../../org/mozilla/javascript/ScriptableObject.html#READONLY"><CODE>READONLY</CODE></A>, <A HREF="../../../org/mozilla/javascript/ScriptableObject.html#DONTENUM"><CODE>DONTENUM</CODE></A>, <A HREF="../../../org/mozilla/javascript/ScriptableObject.html#PERMANENT"><CODE>PERMANENT</CODE></A>, <A HREF="../../../org/mozilla/javascript/ScriptableObject.html#EMPTY"><CODE>EMPTY</CODE></A></DL> </DD> </DL> <HR> <A NAME="getAttributes(int)"><!-- --></A><H3> getAttributes</H3> <PRE> public int <B>getAttributes</B>(int index)</PRE> <DL> <DD>Get the attributes of an indexed property. <P> <DD><DL> </DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>index</CODE> - the numeric index for the property <DT><B>Returns:</B><DD>the bitset of attributes <DT><B>Throws:</B> <DD><CODE><A HREF="../../../org/mozilla/javascript/EvaluatorException.html" title="class in org.mozilla.javascript">EvaluatorException</A></CODE> - if the named property is not found is not found<DT><B>See Also:</B><DD><A HREF="../../../org/mozilla/javascript/ScriptableObject.html#has(java.lang.String, org.mozilla.javascript.Scriptable)"><CODE>has(String, Scriptable)</CODE></A>, <A HREF="../../../org/mozilla/javascript/ScriptableObject.html#READONLY"><CODE>READONLY</CODE></A>, <A HREF="../../../org/mozilla/javascript/ScriptableObject.html#DONTENUM"><CODE>DONTENUM</CODE></A>, <A HREF="../../../org/mozilla/javascript/ScriptableObject.html#PERMANENT"><CODE>PERMANENT</CODE></A>, <A HREF="../../../org/mozilla/javascript/ScriptableObject.html#EMPTY"><CODE>EMPTY</CODE></A></DL> </DD> </DL> <HR> <A NAME="setAttributes(java.lang.String, int)"><!-- --></A><H3> setAttributes</H3> <PRE> public void <B>setAttributes</B>(java.lang.String name, int attributes)</PRE> <DL> <DD>Set the attributes of a named property. The property is specified by <code>name</code> as defined for <code>has</code>.<p> The possible attributes are READONLY, DONTENUM, and PERMANENT. Combinations of attributes are expressed by the bitwise OR of attributes. EMPTY is the state of no attributes set. Any unused bits are reserved for future use. <P> <DD><DL> </DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>name</CODE> - the name of the property<DD><CODE>attributes</CODE> - the bitset of attributes <DT><B>Throws:</B> <DD><CODE><A HREF="../../../org/mozilla/javascript/EvaluatorException.html" title="class in org.mozilla.javascript">EvaluatorException</A></CODE> - if the named property is not found<DT><B>See Also:</B><DD><A HREF="../../../org/mozilla/javascript/Scriptable.html#has(java.lang.String, org.mozilla.javascript.Scriptable)"><CODE>Scriptable.has(String, Scriptable)</CODE></A>, <A HREF="../../../org/mozilla/javascript/ScriptableObject.html#READONLY"><CODE>READONLY</CODE></A>, <A HREF="../../../org/mozilla/javascript/ScriptableObject.html#DONTENUM"><CODE>DONTENUM</CODE></A>, <A HREF="../../../org/mozilla/javascript/ScriptableObject.html#PERMANENT"><CODE>PERMANENT</CODE></A>, <A HREF="../../../org/mozilla/javascript/ScriptableObject.html#EMPTY"><CODE>EMPTY</CODE></A></DL> </DD> </DL> <HR> <A NAME="setAttributes(int, int)"><!-- --></A><H3> setAttributes</H3> <PRE> public void <B>setAttributes</B>(int index, int attributes)</PRE> <DL> <DD>Set the attributes of an indexed property. <P> <DD><DL> </DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>index</CODE> - the numeric index for the property<DD><CODE>attributes</CODE> - the bitset of attributes <DT><B>Throws:</B> <DD><CODE><A HREF="../../../org/mozilla/javascript/EvaluatorException.html" title="class in org.mozilla.javascript">EvaluatorException</A></CODE> - if the named property is not found<DT><B>See Also:</B><DD><A HREF="../../../org/mozilla/javascript/Scriptable.html#has(java.lang.String, org.mozilla.javascript.Scriptable)"><CODE>Scriptable.has(String, Scriptable)</CODE></A>, <A HREF="../../../org/mozilla/javascript/ScriptableObject.html#READONLY"><CODE>READONLY</CODE></A>, <A HREF="../../../org/mozilla/javascript/ScriptableObject.html#DONTENUM"><CODE>DONTENUM</CODE></A>, <A HREF="../../../org/mozilla/javascript/ScriptableObject.html#PERMANENT"><CODE>PERMANENT</CODE></A>, <A HREF="../../../org/mozilla/javascript/ScriptableObject.html#EMPTY"><CODE>EMPTY</CODE></A></DL> </DD> </DL> <HR> <A NAME="setGetterOrSetter(java.lang.String, int, org.mozilla.javascript.Callable, boolean)"><!-- --></A><H3> setGetterOrSetter</H3> <PRE> public void <B>setGetterOrSetter</B>(java.lang.String name, int index, <A HREF="../../../org/mozilla/javascript/Callable.html" title="interface in org.mozilla.javascript">Callable</A> getterOrSeter, boolean isSetter)</PRE> <DL> <DD>XXX: write docs. <P> <DD><DL> </DL> </DD> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="getGetterOrSetter(java.lang.String, int, boolean)"><!-- --></A><H3> getGetterOrSetter</H3> <PRE> public java.lang.Object <B>getGetterOrSetter</B>(java.lang.String name, int index, boolean isSetter)</PRE> <DL> <DD>Get the getter or setter for a given property. Used by __lookupGetter__ and __lookupSetter__. <P> <DD><DL> </DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>name</CODE> - Name of the object. If nonnull, index must be 0.<DD><CODE>index</CODE> - Index of the object. If nonzero, name must be null.<DD><CODE>isSetter</CODE> - If true, return the setter, otherwise return the getter. <DT><B>Returns:</B><DD>Null if the property does not exist. Otherwise returns either the getter or the setter for the property, depending on the value of isSetter (may be undefined if unset). <DT><B>Throws:</B> <DD><CODE>java.lang.IllegalArgumentException</CODE> - if both name and index are nonnull and nonzero respectively.</DL> </DD> </DL> <HR> <A NAME="isGetterOrSetter(java.lang.String, int, boolean)"><!-- --></A><H3> isGetterOrSetter</H3> <PRE> protected boolean <B>isGetterOrSetter</B>(java.lang.String name, int index, boolean setter)</PRE> <DL> <DD>Returns whether a property is a getter or a setter <P> <DD><DL> </DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>name</CODE> - property name<DD><CODE>index</CODE> - property index<DD><CODE>setter</CODE> - true to check for a setter, false for a getter <DT><B>Returns:</B><DD>whether the property is a getter or a setter</DL> </DD> </DL> <HR> <A NAME="getPrototype()"><!-- --></A><H3> getPrototype</H3> <PRE> public <A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> <B>getPrototype</B>()</PRE> <DL> <DD>Returns the prototype of the object. <P> <DD><DL> <DT><B>Specified by:</B><DD><CODE><A HREF="../../../org/mozilla/javascript/Scriptable.html#getPrototype()">getPrototype</A></CODE> in interface <CODE><A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A></CODE></DL> </DD> <DD><DL> <DT><B>Returns:</B><DD>the prototype</DL> </DD> </DL> <HR> <A NAME="setPrototype(org.mozilla.javascript.Scriptable)"><!-- --></A><H3> setPrototype</H3> <PRE> public void <B>setPrototype</B>(<A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> m)</PRE> <DL> <DD>Sets the prototype of the object. <P> <DD><DL> <DT><B>Specified by:</B><DD><CODE><A HREF="../../../org/mozilla/javascript/Scriptable.html#setPrototype(org.mozilla.javascript.Scriptable)">setPrototype</A></CODE> in interface <CODE><A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A></CODE></DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>m</CODE> - the prototype to set</DL> </DD> </DL> <HR> <A NAME="getParentScope()"><!-- --></A><H3> getParentScope</H3> <PRE> public <A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> <B>getParentScope</B>()</PRE> <DL> <DD>Returns the parent (enclosing) scope of the object. <P> <DD><DL> <DT><B>Specified by:</B><DD><CODE><A HREF="../../../org/mozilla/javascript/Scriptable.html#getParentScope()">getParentScope</A></CODE> in interface <CODE><A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A></CODE></DL> </DD> <DD><DL> <DT><B>Returns:</B><DD>the parent scope</DL> </DD> </DL> <HR> <A NAME="setParentScope(org.mozilla.javascript.Scriptable)"><!-- --></A><H3> setParentScope</H3> <PRE> public void <B>setParentScope</B>(<A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> m)</PRE> <DL> <DD>Sets the parent (enclosing) scope of the object. <P> <DD><DL> <DT><B>Specified by:</B><DD><CODE><A HREF="../../../org/mozilla/javascript/Scriptable.html#setParentScope(org.mozilla.javascript.Scriptable)">setParentScope</A></CODE> in interface <CODE><A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A></CODE></DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>m</CODE> - the parent scope to set</DL> </DD> </DL> <HR> <A NAME="getIds()"><!-- --></A><H3> getIds</H3> <PRE> public java.lang.Object[] <B>getIds</B>()</PRE> <DL> <DD>Returns an array of ids for the properties of the object. <p>Any properties with the attribute DONTENUM are not listed. <p> <P> <DD><DL> <DT><B>Specified by:</B><DD><CODE><A HREF="../../../org/mozilla/javascript/Scriptable.html#getIds()">getIds</A></CODE> in interface <CODE><A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A></CODE></DL> </DD> <DD><DL> <DT><B>Returns:</B><DD>an array of java.lang.Objects with an entry for every listed property. Properties accessed via an integer index will have a corresponding Integer entry in the returned array. Properties accessed by a String will have a String entry in the returned array.</DL> </DD> </DL> <HR> <A NAME="getAllIds()"><!-- --></A><H3> getAllIds</H3> <PRE> public java.lang.Object[] <B>getAllIds</B>()</PRE> <DL> <DD>Returns an array of ids for the properties of the object. <p>All properties, even those with attribute DONTENUM, are listed. <p> <P> <DD><DL> <DT><B>Specified by:</B><DD><CODE>getAllIds</CODE> in interface <CODE>org.mozilla.javascript.debug.DebuggableObject</CODE></DL> </DD> <DD><DL> <DT><B>Returns:</B><DD>an array of java.lang.Objects with an entry for every listed property. Properties accessed via an integer index will have a corresponding Integer entry in the returned array. Properties accessed by a String will have a String entry in the returned array.</DL> </DD> </DL> <HR> <A NAME="getDefaultValue(java.lang.Class)"><!-- --></A><H3> getDefaultValue</H3> <PRE> public java.lang.Object <B>getDefaultValue</B>(java.lang.Class typeHint)</PRE> <DL> <DD>Implements the [[DefaultValue]] internal method. <p>Note that the toPrimitive conversion is a no-op for every type other than Object, for which [[DefaultValue]] is called. See ECMA 9.1.<p> A <code>hint</code> of null means "no hint". <P> <DD><DL> <DT><B>Specified by:</B><DD><CODE><A HREF="../../../org/mozilla/javascript/Scriptable.html#getDefaultValue(java.lang.Class)">getDefaultValue</A></CODE> in interface <CODE><A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A></CODE></DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>typeHint</CODE> - the type hint <DT><B>Returns:</B><DD>the default value for the object See ECMA 8.6.2.6.</DL> </DD> </DL> <HR> <A NAME="getDefaultValue(org.mozilla.javascript.Scriptable, java.lang.Class)"><!-- --></A><H3> getDefaultValue</H3> <PRE> public static java.lang.Object <B>getDefaultValue</B>(<A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> object, java.lang.Class typeHint)</PRE> <DL> <DD><DL> </DL> </DD> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="hasInstance(org.mozilla.javascript.Scriptable)"><!-- --></A><H3> hasInstance</H3> <PRE> public boolean <B>hasInstance</B>(<A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> instance)</PRE> <DL> <DD>Implements the instanceof operator. <p>This operator has been proposed to ECMA. <P> <DD><DL> <DT><B>Specified by:</B><DD><CODE><A HREF="../../../org/mozilla/javascript/Scriptable.html#hasInstance(org.mozilla.javascript.Scriptable)">hasInstance</A></CODE> in interface <CODE><A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A></CODE></DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>instance</CODE> - The value that appeared on the LHS of the instanceof operator <DT><B>Returns:</B><DD>true if "this" appears in value's prototype chain</DL> </DD> </DL> <HR> <A NAME="avoidObjectDetection()"><!-- --></A><H3> avoidObjectDetection</H3> <PRE> public boolean <B>avoidObjectDetection</B>()</PRE> <DL> <DD>Emulate the SpiderMonkey (and Firefox) feature of allowing custom objects to avoid detection by normal "object detection" code patterns. This is used to implement document.all. See https://bugzilla.mozilla.org/show_bug.cgi?id=412247. This is an analog to JOF_DETECTING from SpiderMonkey; see https://bugzilla.mozilla.org/show_bug.cgi?id=248549. Other than this special case, embeddings should return false. <P> <DD><DL> </DL> </DD> <DD><DL> <DT><B>Returns:</B><DD>true if this object should avoid object detection<DT><B>Since:</B></DT> <DD>1.7R1</DD> </DL> </DD> </DL> <HR> <A NAME="equivalentValues(java.lang.Object)"><!-- --></A><H3> equivalentValues</H3> <PRE> protected java.lang.Object <B>equivalentValues</B>(java.lang.Object value)</PRE> <DL> <DD>Custom <tt>==</tt> operator. Must return <A HREF="../../../org/mozilla/javascript/Scriptable.html#NOT_FOUND"><CODE>Scriptable.NOT_FOUND</CODE></A> if this object does not have custom equality operator for the given value, <tt>Boolean.TRUE</tt> if this object is equivalent to <tt>value</tt>, <tt>Boolean.FALSE</tt> if this object is not equivalent to <tt>value</tt>. <p> The default implementation returns Boolean.TRUE if <tt>this == value</tt> or <A HREF="../../../org/mozilla/javascript/Scriptable.html#NOT_FOUND"><CODE>Scriptable.NOT_FOUND</CODE></A> otherwise. It indicates that by default custom equality is available only if <tt>value</tt> is <tt>this</tt> in which case true is returned. <P> <DD><DL> </DL> </DD> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="defineClass(org.mozilla.javascript.Scriptable, java.lang.Class)"><!-- --></A><H3> defineClass</H3> <PRE> public static void <B>defineClass</B>(<A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> scope, java.lang.Class clazz) throws java.lang.IllegalAccessException, java.lang.InstantiationException, java.lang.reflect.InvocationTargetException</PRE> <DL> <DD>Defines JavaScript objects from a Java class that implements Scriptable. If the given class has a method <pre> static void init(Context cx, Scriptable scope, boolean sealed);</pre> or its compatibility form <pre> static void init(Scriptable scope);</pre> then it is invoked and no further initialization is done.<p> However, if no such a method is found, then the class's constructors and methods are used to initialize a class in the following manner.<p> First, the zero-parameter constructor of the class is called to create the prototype. If no such constructor exists, a <A HREF="../../../org/mozilla/javascript/EvaluatorException.html" title="class in org.mozilla.javascript"><CODE>EvaluatorException</CODE></A> is thrown. <p> Next, all methods are scanned for special prefixes that indicate that they have special meaning for defining JavaScript objects. These special prefixes are <ul> <li><code>jsFunction_</code> for a JavaScript function <li><code>jsStaticFunction_</code> for a JavaScript function that is a property of the constructor <li><code>jsGet_</code> for a getter of a JavaScript property <li><code>jsSet_</code> for a setter of a JavaScript property <li><code>jsConstructor</code> for a JavaScript function that is the constructor </ul><p> If the method's name begins with "jsFunction_", a JavaScript function is created with a name formed from the rest of the Java method name following "jsFunction_". So a Java method named "jsFunction_foo" will define a JavaScript method "foo". Calling this JavaScript function will cause the Java method to be called. The parameters of the method must be of number and types as defined by the FunctionObject class. The JavaScript function is then added as a property of the prototype. <p> If the method's name begins with "jsStaticFunction_", it is handled similarly except that the resulting JavaScript function is added as a property of the constructor object. The Java method must be static. If the method's name begins with "jsGet_" or "jsSet_", the method is considered to define a property. Accesses to the defined property will result in calls to these getter and setter methods. If no setter is defined, the property is defined as READONLY.<p> If the method's name is "jsConstructor", the method is considered to define the body of the constructor. Only one method of this name may be defined. If no method is found that can serve as constructor, a Java constructor will be selected to serve as the JavaScript constructor in the following manner. If the class has only one Java constructor, that constructor is used to define the JavaScript constructor. If the the class has two constructors, one must be the zero-argument constructor (otherwise an <A HREF="../../../org/mozilla/javascript/EvaluatorException.html" title="class in org.mozilla.javascript"><CODE>EvaluatorException</CODE></A> would have already been thrown when the prototype was to be created). In this case the Java constructor with one or more parameters will be used to define the JavaScript constructor. If the class has three or more constructors, an <A HREF="../../../org/mozilla/javascript/EvaluatorException.html" title="class in org.mozilla.javascript"><CODE>EvaluatorException</CODE></A> will be thrown.<p> Finally, if there is a method <pre> static void finishInit(Scriptable scope, FunctionObject constructor, Scriptable prototype)</pre> it will be called to finish any initialization. The <code>scope</code> argument will be passed, along with the newly created constructor and the newly created prototype.<p> <P> <DD><DL> </DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>scope</CODE> - The scope in which to define the constructor.<DD><CODE>clazz</CODE> - The Java class to use to define the JavaScript objects and properties. <DT><B>Throws:</B> <DD><CODE>java.lang.IllegalAccessException</CODE> - if access is not available to a reflected class member <DD><CODE>java.lang.InstantiationException</CODE> - if unable to instantiate the named class <DD><CODE>java.lang.reflect.InvocationTargetException</CODE> - if an exception is thrown during execution of methods of the named class<DT><B>See Also:</B><DD><A HREF="../../../org/mozilla/javascript/Function.html" title="interface in org.mozilla.javascript"><CODE>Function</CODE></A>, <A HREF="../../../org/mozilla/javascript/FunctionObject.html" title="class in org.mozilla.javascript"><CODE>FunctionObject</CODE></A>, <A HREF="../../../org/mozilla/javascript/ScriptableObject.html#READONLY"><CODE>READONLY</CODE></A>, <A HREF="../../../org/mozilla/javascript/ScriptableObject.html" title="class in org.mozilla.javascript"><CODE>#defineProperty(String, Class, int)</CODE></A></DL> </DD> </DL> <HR> <A NAME="defineClass(org.mozilla.javascript.Scriptable, java.lang.Class, boolean)"><!-- --></A><H3> defineClass</H3> <PRE> public static void <B>defineClass</B>(<A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> scope, java.lang.Class clazz, boolean sealed) throws java.lang.IllegalAccessException, java.lang.InstantiationException, java.lang.reflect.InvocationTargetException</PRE> <DL> <DD>Defines JavaScript objects from a Java class, optionally allowing sealing. Similar to <code>defineClass(Scriptable scope, Class clazz)</code> except that sealing is allowed. An object that is sealed cannot have properties added or removed. Note that sealing is not allowed in the current ECMA/ISO language specification, but is likely for the next version. <P> <DD><DL> </DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>scope</CODE> - The scope in which to define the constructor.<DD><CODE>clazz</CODE> - The Java class to use to define the JavaScript objects and properties. The class must implement Scriptable.<DD><CODE>sealed</CODE> - Whether or not to create sealed standard objects that cannot be modified. <DT><B>Throws:</B> <DD><CODE>java.lang.IllegalAccessException</CODE> - if access is not available to a reflected class member <DD><CODE>java.lang.InstantiationException</CODE> - if unable to instantiate the named class <DD><CODE>java.lang.reflect.InvocationTargetException</CODE> - if an exception is thrown during execution of methods of the named class<DT><B>Since:</B></DT> <DD>1.4R3</DD> </DL> </DD> </DL> <HR> <A NAME="defineClass(org.mozilla.javascript.Scriptable, java.lang.Class, boolean, boolean)"><!-- --></A><H3> defineClass</H3> <PRE> public static java.lang.String <B>defineClass</B>(<A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> scope, java.lang.Class clazz, boolean sealed, boolean mapInheritance) throws java.lang.IllegalAccessException, java.lang.InstantiationException, java.lang.reflect.InvocationTargetException</PRE> <DL> <DD>Defines JavaScript objects from a Java class, optionally allowing sealing and mapping of Java inheritance to JavaScript prototype-based inheritance. Similar to <code>defineClass(Scriptable scope, Class clazz)</code> except that sealing and inheritance mapping are allowed. An object that is sealed cannot have properties added or removed. Note that sealing is not allowed in the current ECMA/ISO language specification, but is likely for the next version. <P> <DD><DL> </DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>scope</CODE> - The scope in which to define the constructor.<DD><CODE>clazz</CODE> - The Java class to use to define the JavaScript objects and properties. The class must implement Scriptable.<DD><CODE>sealed</CODE> - Whether or not to create sealed standard objects that cannot be modified.<DD><CODE>mapInheritance</CODE> - Whether or not to map Java inheritance to JavaScript prototype-based inheritance. <DT><B>Returns:</B><DD>the class name for the prototype of the specified class <DT><B>Throws:</B> <DD><CODE>java.lang.IllegalAccessException</CODE> - if access is not available to a reflected class member <DD><CODE>java.lang.InstantiationException</CODE> - if unable to instantiate the named class <DD><CODE>java.lang.reflect.InvocationTargetException</CODE> - if an exception is thrown during execution of methods of the named class<DT><B>Since:</B></DT> <DD>1.6R2</DD> </DL> </DD> </DL> <HR> <A NAME="defineProperty(java.lang.String, java.lang.Object, int)"><!-- --></A><H3> defineProperty</H3> <PRE> public void <B>defineProperty</B>(java.lang.String propertyName, java.lang.Object value, int attributes)</PRE> <DL> <DD>Define a JavaScript property. Creates the property with an initial value and sets its attributes. <P> <DD><DL> </DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>propertyName</CODE> - the name of the property to define.<DD><CODE>value</CODE> - the initial value of the property<DD><CODE>attributes</CODE> - the attributes of the JavaScript property<DT><B>See Also:</B><DD><A HREF="../../../org/mozilla/javascript/Scriptable.html#put(java.lang.String, org.mozilla.javascript.Scriptable, java.lang.Object)"><CODE>Scriptable.put(String, Scriptable, Object)</CODE></A></DL> </DD> </DL> <HR> <A NAME="defineProperty(org.mozilla.javascript.Scriptable, java.lang.String, java.lang.Object, int)"><!-- --></A><H3> defineProperty</H3> <PRE> public static void <B>defineProperty</B>(<A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> destination, java.lang.String propertyName, java.lang.Object value, int attributes)</PRE> <DL> <DD>Utility method to add properties to arbitrary Scriptable object. If destination is instance of ScriptableObject, calls defineProperty there, otherwise calls put in destination ignoring attributes <P> <DD><DL> </DL> </DD> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="defineConstProperty(org.mozilla.javascript.Scriptable, java.lang.String)"><!-- --></A><H3> defineConstProperty</H3> <PRE> public static void <B>defineConstProperty</B>(<A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> destination, java.lang.String propertyName)</PRE> <DL> <DD>Utility method to add properties to arbitrary Scriptable object. If destination is instance of ScriptableObject, calls defineProperty there, otherwise calls put in destination ignoring attributes <P> <DD><DL> </DL> </DD> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="defineProperty(java.lang.String, java.lang.Class, int)"><!-- --></A><H3> defineProperty</H3> <PRE> public void <B>defineProperty</B>(java.lang.String propertyName, java.lang.Class clazz, int attributes)</PRE> <DL> <DD>Define a JavaScript property with getter and setter side effects. If the setter is not found, the attribute READONLY is added to the given attributes. <p> The getter must be a method with zero parameters, and the setter, if found, must be a method with one parameter.<p> <P> <DD><DL> </DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>propertyName</CODE> - the name of the property to define. This name also affects the name of the setter and getter to search for. If the propertyId is "foo", then <code>clazz</code> will be searched for "getFoo" and "setFoo" methods.<DD><CODE>clazz</CODE> - the Java class to search for the getter and setter<DD><CODE>attributes</CODE> - the attributes of the JavaScript property<DT><B>See Also:</B><DD><A HREF="../../../org/mozilla/javascript/Scriptable.html#put(java.lang.String, org.mozilla.javascript.Scriptable, java.lang.Object)"><CODE>Scriptable.put(String, Scriptable, Object)</CODE></A></DL> </DD> </DL> <HR> <A NAME="defineProperty(java.lang.String, java.lang.Object, java.lang.reflect.Method, java.lang.reflect.Method, int)"><!-- --></A><H3> defineProperty</H3> <PRE> public void <B>defineProperty</B>(java.lang.String propertyName, java.lang.Object delegateTo, java.lang.reflect.Method getter, java.lang.reflect.Method setter, int attributes)</PRE> <DL> <DD>Define a JavaScript property. Use this method only if you wish to define getters and setters for a given property in a ScriptableObject. To create a property without special getter or setter side effects, use <code>defineProperty(String,int)</code>. If <code>setter</code> is null, the attribute READONLY is added to the given attributes.<p> Several forms of getters or setters are allowed. In all cases the type of the value parameter can be any one of the following types: Object, String, boolean, Scriptable, byte, short, int, long, float, or double. The runtime will perform appropriate conversions based upon the type of the parameter (see description in FunctionObject). The first forms are nonstatic methods of the class referred to by 'this': <pre> Object getFoo(); void setFoo(SomeType value);</pre> Next are static methods that may be of any class; the object whose property is being accessed is passed in as an extra argument: <pre> static Object getFoo(Scriptable obj); static void setFoo(Scriptable obj, SomeType value);</pre> Finally, it is possible to delegate to another object entirely using the <code>delegateTo</code> parameter. In this case the methods are nonstatic methods of the class delegated to, and the object whose property is being accessed is passed in as an extra argument: <pre> Object getFoo(Scriptable obj); void setFoo(Scriptable obj, SomeType value);</pre> <P> <DD><DL> </DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>propertyName</CODE> - the name of the property to define.<DD><CODE>delegateTo</CODE> - an object to call the getter and setter methods on, or null, depending on the form used above.<DD><CODE>getter</CODE> - the method to invoke to get the value of the property<DD><CODE>setter</CODE> - the method to invoke to set the value of the property<DD><CODE>attributes</CODE> - the attributes of the JavaScript property</DL> </DD> </DL> <HR> <A NAME="defineFunctionProperties(java.lang.String[], java.lang.Class, int)"><!-- --></A><H3> defineFunctionProperties</H3> <PRE> public void <B>defineFunctionProperties</B>(java.lang.String[] names, java.lang.Class clazz, int attributes)</PRE> <DL> <DD>Search for names in a class, adding the resulting methods as properties. <p> Uses reflection to find the methods of the given names. Then FunctionObjects are constructed from the methods found, and are added to this object as properties with the given names. <P> <DD><DL> </DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>names</CODE> - the names of the Methods to add as function properties<DD><CODE>clazz</CODE> - the class to search for the Methods<DD><CODE>attributes</CODE> - the attributes of the new properties<DT><B>See Also:</B><DD><A HREF="../../../org/mozilla/javascript/FunctionObject.html" title="class in org.mozilla.javascript"><CODE>FunctionObject</CODE></A></DL> </DD> </DL> <HR> <A NAME="getObjectPrototype(org.mozilla.javascript.Scriptable)"><!-- --></A><H3> getObjectPrototype</H3> <PRE> public static <A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> <B>getObjectPrototype</B>(<A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> scope)</PRE> <DL> <DD>Get the Object.prototype property. See ECMA 15.2.4. <P> <DD><DL> </DL> </DD> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="getFunctionPrototype(org.mozilla.javascript.Scriptable)"><!-- --></A><H3> getFunctionPrototype</H3> <PRE> public static <A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> <B>getFunctionPrototype</B>(<A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> scope)</PRE> <DL> <DD>Get the Function.prototype property. See ECMA 15.3.4. <P> <DD><DL> </DL> </DD> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="getClassPrototype(org.mozilla.javascript.Scriptable, java.lang.String)"><!-- --></A><H3> getClassPrototype</H3> <PRE> public static <A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> <B>getClassPrototype</B>(<A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> scope, java.lang.String className)</PRE> <DL> <DD>Get the prototype for the named class. For example, <code>getClassPrototype(s, "Date")</code> will first walk up the parent chain to find the outermost scope, then will search that scope for the Date constructor, and then will return Date.prototype. If any of the lookups fail, or the prototype is not a JavaScript object, then null will be returned. <P> <DD><DL> </DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>scope</CODE> - an object in the scope chain<DD><CODE>className</CODE> - the name of the constructor <DT><B>Returns:</B><DD>the prototype for the named class, or null if it cannot be found.</DL> </DD> </DL> <HR> <A NAME="getTopLevelScope(org.mozilla.javascript.Scriptable)"><!-- --></A><H3> getTopLevelScope</H3> <PRE> public static <A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> <B>getTopLevelScope</B>(<A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> obj)</PRE> <DL> <DD>Get the global scope. <p>Walks the parent scope chain to find an object with a null parent scope (the global object). <P> <DD><DL> </DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>obj</CODE> - a JavaScript object <DT><B>Returns:</B><DD>the corresponding global scope</DL> </DD> </DL> <HR> <A NAME="sealObject()"><!-- --></A><H3> sealObject</H3> <PRE> public void <B>sealObject</B>()</PRE> <DL> <DD>Seal this object. A sealed object may not have properties added or removed. Once an object is sealed it may not be unsealed. <P> <DD><DL> </DL> </DD> <DD><DL> <DT><B>Since:</B></DT> <DD>1.4R3</DD> </DL> </DD> </DL> <HR> <A NAME="isSealed()"><!-- --></A><H3> isSealed</H3> <PRE> public final boolean <B>isSealed</B>()</PRE> <DL> <DD>Return true if this object is sealed. It is an error to attempt to add or remove properties to a sealed object. <P> <DD><DL> </DL> </DD> <DD><DL> <DT><B>Returns:</B><DD>true if sealed, false otherwise.<DT><B>Since:</B></DT> <DD>1.4R3</DD> </DL> </DD> </DL> <HR> <A NAME="getProperty(org.mozilla.javascript.Scriptable, java.lang.String)"><!-- --></A><H3> getProperty</H3> <PRE> public static java.lang.Object <B>getProperty</B>(<A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> obj, java.lang.String name)</PRE> <DL> <DD>Gets a named property from an object or any object in its prototype chain. <p> Searches the prototype chain for a property named <code>name</code>. <p> <P> <DD><DL> </DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>obj</CODE> - a JavaScript object<DD><CODE>name</CODE> - a property name <DT><B>Returns:</B><DD>the value of a property with name <code>name</code> found in <code>obj</code> or any object in its prototype chain, or <code>Scriptable.NOT_FOUND</code> if not found<DT><B>Since:</B></DT> <DD>1.5R2</DD> </DL> </DD> </DL> <HR> <A NAME="getProperty(org.mozilla.javascript.Scriptable, int)"><!-- --></A><H3> getProperty</H3> <PRE> public static java.lang.Object <B>getProperty</B>(<A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> obj, int index)</PRE> <DL> <DD>Gets an indexed property from an object or any object in its prototype chain. <p> Searches the prototype chain for a property with integral index <code>index</code>. Note that if you wish to look for properties with numerical but non-integral indicies, you should use getProperty(Scriptable,String) with the string value of the index. <p> <P> <DD><DL> </DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>obj</CODE> - a JavaScript object<DD><CODE>index</CODE> - an integral index <DT><B>Returns:</B><DD>the value of a property with index <code>index</code> found in <code>obj</code> or any object in its prototype chain, or <code>Scriptable.NOT_FOUND</code> if not found<DT><B>Since:</B></DT> <DD>1.5R2</DD> </DL> </DD> </DL> <HR> <A NAME="hasProperty(org.mozilla.javascript.Scriptable, java.lang.String)"><!-- --></A><H3> hasProperty</H3> <PRE> public static boolean <B>hasProperty</B>(<A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> obj, java.lang.String name)</PRE> <DL> <DD>Returns whether a named property is defined in an object or any object in its prototype chain. <p> Searches the prototype chain for a property named <code>name</code>. <p> <P> <DD><DL> </DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>obj</CODE> - a JavaScript object<DD><CODE>name</CODE> - a property name <DT><B>Returns:</B><DD>the true if property was found<DT><B>Since:</B></DT> <DD>1.5R2</DD> </DL> </DD> </DL> <HR> <A NAME="redefineProperty(org.mozilla.javascript.Scriptable, java.lang.String, boolean)"><!-- --></A><H3> redefineProperty</H3> <PRE> public static void <B>redefineProperty</B>(<A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> obj, java.lang.String name, boolean isConst)</PRE> <DL> <DD>If hasProperty(obj, name) would return true, then if the property that was found is compatible with the new property, this method just returns. If the property is not compatible, then an exception is thrown. A property redefinition is incompatible if the first definition was a const declaration or if this one is. They are compatible only if neither was const. <P> <DD><DL> </DL> </DD> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="hasProperty(org.mozilla.javascript.Scriptable, int)"><!-- --></A><H3> hasProperty</H3> <PRE> public static boolean <B>hasProperty</B>(<A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> obj, int index)</PRE> <DL> <DD>Returns whether an indexed property is defined in an object or any object in its prototype chain. <p> Searches the prototype chain for a property with index <code>index</code>. <p> <P> <DD><DL> </DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>obj</CODE> - a JavaScript object<DD><CODE>index</CODE> - a property index <DT><B>Returns:</B><DD>the true if property was found<DT><B>Since:</B></DT> <DD>1.5R2</DD> </DL> </DD> </DL> <HR> <A NAME="putProperty(org.mozilla.javascript.Scriptable, java.lang.String, java.lang.Object)"><!-- --></A><H3> putProperty</H3> <PRE> public static void <B>putProperty</B>(<A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> obj, java.lang.String name, java.lang.Object value)</PRE> <DL> <DD>Puts a named property in an object or in an object in its prototype chain. <p> Searches for the named property in the prototype chain. If it is found, the value of the property in <code>obj</code> is changed through a call to <A HREF="../../../org/mozilla/javascript/Scriptable.html#put(java.lang.String, org.mozilla.javascript.Scriptable, java.lang.Object)"><CODE>Scriptable.put(String, Scriptable, Object)</CODE></A> on the prototype passing <code>obj</code> as the <code>start</code> argument. This allows the prototype to veto the property setting in case the prototype defines the property with [[ReadOnly]] attribute. If the property is not found, it is added in <code>obj</code>. <P> <DD><DL> </DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>obj</CODE> - a JavaScript object<DD><CODE>name</CODE> - a property name<DD><CODE>value</CODE> - any JavaScript value accepted by Scriptable.put<DT><B>Since:</B></DT> <DD>1.5R2</DD> </DL> </DD> </DL> <HR> <A NAME="putConstProperty(org.mozilla.javascript.Scriptable, java.lang.String, java.lang.Object)"><!-- --></A><H3> putConstProperty</H3> <PRE> public static void <B>putConstProperty</B>(<A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> obj, java.lang.String name, java.lang.Object value)</PRE> <DL> <DD>Puts a named property in an object or in an object in its prototype chain. <p> Searches for the named property in the prototype chain. If it is found, the value of the property in <code>obj</code> is changed through a call to <A HREF="../../../org/mozilla/javascript/Scriptable.html#put(java.lang.String, org.mozilla.javascript.Scriptable, java.lang.Object)"><CODE>Scriptable.put(String, Scriptable, Object)</CODE></A> on the prototype passing <code>obj</code> as the <code>start</code> argument. This allows the prototype to veto the property setting in case the prototype defines the property with [[ReadOnly]] attribute. If the property is not found, it is added in <code>obj</code>. <P> <DD><DL> </DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>obj</CODE> - a JavaScript object<DD><CODE>name</CODE> - a property name<DD><CODE>value</CODE> - any JavaScript value accepted by Scriptable.put<DT><B>Since:</B></DT> <DD>1.5R2</DD> </DL> </DD> </DL> <HR> <A NAME="putProperty(org.mozilla.javascript.Scriptable, int, java.lang.Object)"><!-- --></A><H3> putProperty</H3> <PRE> public static void <B>putProperty</B>(<A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> obj, int index, java.lang.Object value)</PRE> <DL> <DD>Puts an indexed property in an object or in an object in its prototype chain. <p> Searches for the indexed property in the prototype chain. If it is found, the value of the property in <code>obj</code> is changed through a call to <A HREF="../../../org/mozilla/javascript/Scriptable.html#put(int, org.mozilla.javascript.Scriptable, java.lang.Object)"><CODE>Scriptable.put(int, Scriptable, Object)</CODE></A> on the prototype passing <code>obj</code> as the <code>start</code> argument. This allows the prototype to veto the property setting in case the prototype defines the property with [[ReadOnly]] attribute. If the property is not found, it is added in <code>obj</code>. <P> <DD><DL> </DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>obj</CODE> - a JavaScript object<DD><CODE>index</CODE> - a property index<DD><CODE>value</CODE> - any JavaScript value accepted by Scriptable.put<DT><B>Since:</B></DT> <DD>1.5R2</DD> </DL> </DD> </DL> <HR> <A NAME="deleteProperty(org.mozilla.javascript.Scriptable, java.lang.String)"><!-- --></A><H3> deleteProperty</H3> <PRE> public static boolean <B>deleteProperty</B>(<A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> obj, java.lang.String name)</PRE> <DL> <DD>Removes the property from an object or its prototype chain. <p> Searches for a property with <code>name</code> in obj or its prototype chain. If it is found, the object's delete method is called. <P> <DD><DL> </DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>obj</CODE> - a JavaScript object<DD><CODE>name</CODE> - a property name <DT><B>Returns:</B><DD>true if the property doesn't exist or was successfully removed<DT><B>Since:</B></DT> <DD>1.5R2</DD> </DL> </DD> </DL> <HR> <A NAME="deleteProperty(org.mozilla.javascript.Scriptable, int)"><!-- --></A><H3> deleteProperty</H3> <PRE> public static boolean <B>deleteProperty</B>(<A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> obj, int index)</PRE> <DL> <DD>Removes the property from an object or its prototype chain. <p> Searches for a property with <code>index</code> in obj or its prototype chain. If it is found, the object's delete method is called. <P> <DD><DL> </DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>obj</CODE> - a JavaScript object<DD><CODE>index</CODE> - a property index <DT><B>Returns:</B><DD>true if the property doesn't exist or was successfully removed<DT><B>Since:</B></DT> <DD>1.5R2</DD> </DL> </DD> </DL> <HR> <A NAME="getPropertyIds(org.mozilla.javascript.Scriptable)"><!-- --></A><H3> getPropertyIds</H3> <PRE> public static java.lang.Object[] <B>getPropertyIds</B>(<A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> obj)</PRE> <DL> <DD>Returns an array of all ids from an object and its prototypes. <p> <P> <DD><DL> </DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>obj</CODE> - a JavaScript object <DT><B>Returns:</B><DD>an array of all ids from all object in the prototype chain. If a given id occurs multiple times in the prototype chain, it will occur only once in this list.<DT><B>Since:</B></DT> <DD>1.5R2</DD> </DL> </DD> </DL> <HR> <A NAME="callMethod(org.mozilla.javascript.Scriptable, java.lang.String, java.lang.Object[])"><!-- --></A><H3> callMethod</H3> <PRE> public static java.lang.Object <B>callMethod</B>(<A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> obj, java.lang.String methodName, java.lang.Object[] args)</PRE> <DL> <DD>Call a method of an object. <P> <DD><DL> </DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>obj</CODE> - the JavaScript object<DD><CODE>methodName</CODE> - the name of the function property<DD><CODE>args</CODE> - the arguments for the call<DT><B>See Also:</B><DD><A HREF="../../../org/mozilla/javascript/Context.html#getCurrentContext()"><CODE>Context.getCurrentContext()</CODE></A></DL> </DD> </DL> <HR> <A NAME="callMethod(org.mozilla.javascript.Context, org.mozilla.javascript.Scriptable, java.lang.String, java.lang.Object[])"><!-- --></A><H3> callMethod</H3> <PRE> public static java.lang.Object <B>callMethod</B>(<A HREF="../../../org/mozilla/javascript/Context.html" title="class in org.mozilla.javascript">Context</A> cx, <A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> obj, java.lang.String methodName, java.lang.Object[] args)</PRE> <DL> <DD>Call a method of an object. <P> <DD><DL> </DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>cx</CODE> - the Context object associated with the current thread.<DD><CODE>obj</CODE> - the JavaScript object<DD><CODE>methodName</CODE> - the name of the function property<DD><CODE>args</CODE> - the arguments for the call</DL> </DD> </DL> <HR> <A NAME="getAssociatedValue(java.lang.Object)"><!-- --></A><H3> getAssociatedValue</H3> <PRE> public final java.lang.Object <B>getAssociatedValue</B>(java.lang.Object key)</PRE> <DL> <DD>Get arbitrary application-specific value associated with this object. <P> <DD><DL> </DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>key</CODE> - key object to select particular value.<DT><B>See Also:</B><DD><A HREF="../../../org/mozilla/javascript/ScriptableObject.html#associateValue(java.lang.Object, java.lang.Object)"><CODE>associateValue(Object key, Object value)</CODE></A></DL> </DD> </DL> <HR> <A NAME="getTopScopeValue(org.mozilla.javascript.Scriptable, java.lang.Object)"><!-- --></A><H3> getTopScopeValue</H3> <PRE> public static java.lang.Object <B>getTopScopeValue</B>(<A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> scope, java.lang.Object key)</PRE> <DL> <DD>Get arbitrary application-specific value associated with the top scope of the given scope. The method first calls <A HREF="../../../org/mozilla/javascript/ScriptableObject.html#getTopLevelScope(org.mozilla.javascript.Scriptable)"><CODE>getTopLevelScope(Scriptable scope)</CODE></A> and then searches the prototype chain of the top scope for the first object containing the associated value with the given key. <P> <DD><DL> </DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>scope</CODE> - the starting scope.<DD><CODE>key</CODE> - key object to select particular value.<DT><B>See Also:</B><DD><A HREF="../../../org/mozilla/javascript/ScriptableObject.html#getAssociatedValue(java.lang.Object)"><CODE>getAssociatedValue(Object key)</CODE></A></DL> </DD> </DL> <HR> <A NAME="associateValue(java.lang.Object, java.lang.Object)"><!-- --></A><H3> associateValue</H3> <PRE> public final java.lang.Object <B>associateValue</B>(java.lang.Object key, java.lang.Object value)</PRE> <DL> <DD>Associate arbitrary application-specific value with this object. Value can only be associated with the given object and key only once. The method ignores any subsequent attempts to change the already associated value. <p> The associated values are not serialized. <P> <DD><DL> </DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>key</CODE> - key object to select particular value.<DD><CODE>value</CODE> - the value to associate <DT><B>Returns:</B><DD>the passed value if the method is called first time for the given key or old value for any subsequent calls.<DT><B>See Also:</B><DD><A HREF="../../../org/mozilla/javascript/ScriptableObject.html#getAssociatedValue(java.lang.Object)"><CODE>getAssociatedValue(Object key)</CODE></A></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/Scriptable.html" title="interface in org.mozilla.javascript"><B>PREV CLASS</B></A> <A HREF="../../../org/mozilla/javascript/SecurityController.html" title="class 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/ScriptableObject.html" target="_top"><B>FRAMES</B></A> <A HREF="ScriptableObject.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>