1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
5
<!-- Generated by javadoc (build 1.4.2_05) on Tue Nov 30 22:11:30 EST 2004 -->
7
ScriptableObject (Rhino)
10
<META NAME="keywords" CONTENT="org.mozilla.javascript.ScriptableObject class">
12
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
14
<SCRIPT type="text/javascript">
15
function windowTitle()
17
parent.document.title="ScriptableObject (Rhino)";
23
<BODY BGCOLOR="white" onload="windowTitle();">
26
<!-- ========= START OF TOP NAVBAR ======= -->
27
<A NAME="navbar_top"><!-- --></A>
28
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
29
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
31
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
32
<A NAME="navbar_top_firstrow"><!-- --></A>
33
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
34
<TR ALIGN="center" VALIGN="top">
35
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
36
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
37
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
38
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
39
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
40
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
41
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
45
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
51
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
52
<A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript"><B>PREV CLASS</B></A>
53
<A HREF="../../../org/mozilla/javascript/SecurityController.html" title="class in org.mozilla.javascript"><B>NEXT CLASS</B></A></FONT></TD>
54
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
55
<A HREF="../../../index.html" target="_top"><B>FRAMES</B></A>
56
<A HREF="ScriptableObject.html" target="_top"><B>NO FRAMES</B></A>
57
<SCRIPT type="text/javascript">
60
document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
65
<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
71
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
72
SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
73
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
74
DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
77
<A NAME="skip-navbar_top"></A>
78
<!-- ========= END OF TOP NAVBAR ========= -->
81
<!-- ======== START OF CLASS DATA ======== -->
84
org.mozilla.javascript</FONT>
86
Class ScriptableObject</H2>
89
<IMG SRC="../../../resources/inherit.gif" ALT="extended by"><B>org.mozilla.javascript.ScriptableObject</B>
92
<DT><B>All Implemented Interfaces:</B> <DD>org.mozilla.javascript.debug.DebuggableObject, <A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A>, java.io.Serializable</DD>
95
<DT><B>Direct Known Subclasses:</B> <DD>org.mozilla.javascript.IdScriptableObject</DD>
99
<DT>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</DL>
102
This is the default implementation of the Scriptable interface. This
103
class provides convenient default behavior that makes it easier to
106
Various properties and methods of JavaScript objects can be conveniently
107
defined using methods of ScriptableObject.
109
Classes extending ScriptableObject must define the getClassName method.
114
<DT><B>Author:</B></DT>
116
<DT><B>See Also:</B><DD><A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript"><CODE>Scriptable</CODE></A>,
117
<A HREF="../../../serialized-form.html#org.mozilla.javascript.ScriptableObject">Serialized Form</A></DL>
121
<!-- ======== NESTED CLASS SUMMARY ======== -->
124
<!-- =========== FIELD SUMMARY =========== -->
126
<A NAME="field_summary"><!-- --></A>
127
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
128
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
129
<TD COLSPAN=2><FONT SIZE="+2">
130
<B>Field Summary</B></FONT></TD>
132
<TR BGCOLOR="white" CLASS="TableRowColor">
133
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
134
<CODE>static int</CODE></FONT></TD>
135
<TD><CODE><B><A HREF="../../../org/mozilla/javascript/ScriptableObject.html#DONTENUM">DONTENUM</A></B></CODE>
138
Property attribute indicating property is not enumerated.</TD>
140
<TR BGCOLOR="white" CLASS="TableRowColor">
141
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
142
<CODE>static int</CODE></FONT></TD>
143
<TD><CODE><B><A HREF="../../../org/mozilla/javascript/ScriptableObject.html#EMPTY">EMPTY</A></B></CODE>
146
The empty property attribute.</TD>
148
<TR BGCOLOR="white" CLASS="TableRowColor">
149
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
150
<CODE>static int</CODE></FONT></TD>
151
<TD><CODE><B><A HREF="../../../org/mozilla/javascript/ScriptableObject.html#PERMANENT">PERMANENT</A></B></CODE>
154
Property attribute indicating property cannot be deleted.</TD>
156
<TR BGCOLOR="white" CLASS="TableRowColor">
157
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
158
<CODE>static int</CODE></FONT></TD>
159
<TD><CODE><B><A HREF="../../../org/mozilla/javascript/ScriptableObject.html#READONLY">READONLY</A></B></CODE>
162
Property attribute indicating assignment to this property is ignored.</TD>
165
<A NAME="fields_inherited_from_class_org.mozilla.javascript.Scriptable"><!-- --></A>
166
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
167
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
168
<TD><B>Fields inherited from interface org.mozilla.javascript.<A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A></B></TD>
170
<TR BGCOLOR="white" CLASS="TableRowColor">
171
<TD><CODE><A HREF="../../../org/mozilla/javascript/Scriptable.html#NOT_FOUND">NOT_FOUND</A></CODE></TD>
175
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
177
<A NAME="constructor_summary"><!-- --></A>
178
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
179
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
180
<TD COLSPAN=2><FONT SIZE="+2">
181
<B>Constructor Summary</B></FONT></TD>
183
<TR BGCOLOR="white" CLASS="TableRowColor">
184
<TD><CODE><B><A HREF="../../../org/mozilla/javascript/ScriptableObject.html#ScriptableObject()">ScriptableObject</A></B>()</CODE>
187
</TD>
189
<TR BGCOLOR="white" CLASS="TableRowColor">
190
<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,
191
<A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> prototype)</CODE>
194
</TD>
198
<!-- ========== METHOD SUMMARY =========== -->
200
<A NAME="method_summary"><!-- --></A>
201
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
202
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
203
<TD COLSPAN=2><FONT SIZE="+2">
204
<B>Method Summary</B></FONT></TD>
206
<TR BGCOLOR="white" CLASS="TableRowColor">
207
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
208
<CODE> java.lang.Object</CODE></FONT></TD>
209
<TD><CODE><B><A HREF="../../../org/mozilla/javascript/ScriptableObject.html#associateValue(java.lang.Object, java.lang.Object)">associateValue</A></B>(java.lang.Object key,
210
java.lang.Object value)</CODE>
213
Associate arbitrary application-specific value with this object.</TD>
215
<TR BGCOLOR="white" CLASS="TableRowColor">
216
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
217
<CODE>static java.lang.Object</CODE></FONT></TD>
218
<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,
219
<A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> obj,
220
java.lang.String methodName,
221
java.lang.Object[] args)</CODE>
224
Call a method of an object.</TD>
226
<TR BGCOLOR="white" CLASS="TableRowColor">
227
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
228
<CODE>static java.lang.Object</CODE></FONT></TD>
229
<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,
230
java.lang.String methodName,
231
java.lang.Object[] args)</CODE>
234
Call a method of an object.</TD>
236
<TR BGCOLOR="white" CLASS="TableRowColor">
237
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
238
<CODE>static void</CODE></FONT></TD>
239
<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,
240
java.lang.Class clazz)</CODE>
243
Defines JavaScript objects from a Java class that implements Scriptable.</TD>
245
<TR BGCOLOR="white" CLASS="TableRowColor">
246
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
247
<CODE>static void</CODE></FONT></TD>
248
<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,
249
java.lang.Class clazz,
250
boolean sealed)</CODE>
253
Defines JavaScript objects from a Java class, optionally
254
allowing sealing.</TD>
256
<TR BGCOLOR="white" CLASS="TableRowColor">
257
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
258
<CODE> void</CODE></FONT></TD>
259
<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,
260
java.lang.Class clazz,
261
int attributes)</CODE>
264
Search for names in a class, adding the resulting methods
267
<TR BGCOLOR="white" CLASS="TableRowColor">
268
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
269
<CODE>static void</CODE></FONT></TD>
270
<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,
271
java.lang.String propertyName,
272
java.lang.Object value,
273
int attributes)</CODE>
276
Utility method to add properties to arbitrary Scriptable object.</TD>
278
<TR BGCOLOR="white" CLASS="TableRowColor">
279
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
280
<CODE> void</CODE></FONT></TD>
281
<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,
282
java.lang.Class clazz,
283
int attributes)</CODE>
286
Define a JavaScript property with getter and setter side effects.</TD>
288
<TR BGCOLOR="white" CLASS="TableRowColor">
289
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
290
<CODE> void</CODE></FONT></TD>
291
<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,
292
java.lang.Object value,
293
int attributes)</CODE>
296
Define a JavaScript property.</TD>
298
<TR BGCOLOR="white" CLASS="TableRowColor">
299
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
300
<CODE> void</CODE></FONT></TD>
301
<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,
302
java.lang.Object delegateTo,
303
java.lang.reflect.Method getter,
304
java.lang.reflect.Method setter,
305
int attributes)</CODE>
308
Define a JavaScript property.</TD>
310
<TR BGCOLOR="white" CLASS="TableRowColor">
311
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
312
<CODE> void</CODE></FONT></TD>
313
<TD><CODE><B><A HREF="../../../org/mozilla/javascript/ScriptableObject.html#delete(int)">delete</A></B>(int index)</CODE>
316
Removes the indexed property from the object.</TD>
318
<TR BGCOLOR="white" CLASS="TableRowColor">
319
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
320
<CODE> void</CODE></FONT></TD>
321
<TD><CODE><B><A HREF="../../../org/mozilla/javascript/ScriptableObject.html#delete(java.lang.String)">delete</A></B>(java.lang.String name)</CODE>
324
Removes a named property from the object.</TD>
326
<TR BGCOLOR="white" CLASS="TableRowColor">
327
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
328
<CODE>static boolean</CODE></FONT></TD>
329
<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,
330
int index)</CODE>
333
Removes the property from an object or its prototype chain.</TD>
335
<TR BGCOLOR="white" CLASS="TableRowColor">
336
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
337
<CODE>static boolean</CODE></FONT></TD>
338
<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,
339
java.lang.String name)</CODE>
342
Removes the property from an object or its prototype chain.</TD>
344
<TR BGCOLOR="white" CLASS="TableRowColor">
345
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
346
<CODE>protected java.lang.Object</CODE></FONT></TD>
347
<TD><CODE><B><A HREF="../../../org/mozilla/javascript/ScriptableObject.html#equivalentValues(java.lang.Object)">equivalentValues</A></B>(java.lang.Object value)</CODE>
350
Custom <tt>==</tt> operator.</TD>
352
<TR BGCOLOR="white" CLASS="TableRowColor">
353
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
354
<CODE> java.lang.Object</CODE></FONT></TD>
355
<TD><CODE><B><A HREF="../../../org/mozilla/javascript/ScriptableObject.html#get(int, org.mozilla.javascript.Scriptable)">get</A></B>(int index,
356
<A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> start)</CODE>
359
Returns the value of the indexed property or NOT_FOUND.</TD>
361
<TR BGCOLOR="white" CLASS="TableRowColor">
362
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
363
<CODE> java.lang.Object</CODE></FONT></TD>
364
<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,
365
<A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> start)</CODE>
368
Returns the value of the named property or NOT_FOUND.</TD>
370
<TR BGCOLOR="white" CLASS="TableRowColor">
371
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
372
<CODE> java.lang.Object[]</CODE></FONT></TD>
373
<TD><CODE><B><A HREF="../../../org/mozilla/javascript/ScriptableObject.html#getAllIds()">getAllIds</A></B>()</CODE>
376
Returns an array of ids for the properties of the object.</TD>
378
<TR BGCOLOR="white" CLASS="TableRowColor">
379
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
380
<CODE> java.lang.Object</CODE></FONT></TD>
381
<TD><CODE><B><A HREF="../../../org/mozilla/javascript/ScriptableObject.html#getAssociatedValue(java.lang.Object)">getAssociatedValue</A></B>(java.lang.Object key)</CODE>
384
Get arbitrary application-specific value associated with this object.</TD>
386
<TR BGCOLOR="white" CLASS="TableRowColor">
387
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
388
<CODE> int</CODE></FONT></TD>
389
<TD><CODE><B><A HREF="../../../org/mozilla/javascript/ScriptableObject.html#getAttributes(int)">getAttributes</A></B>(int index)</CODE>
392
Get the attributes of an indexed property.</TD>
394
<TR BGCOLOR="white" CLASS="TableRowColor">
395
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
396
<CODE> int</CODE></FONT></TD>
397
<TD><CODE><B><A HREF="../../../org/mozilla/javascript/ScriptableObject.html#getAttributes(int, org.mozilla.javascript.Scriptable)">getAttributes</A></B>(int index,
398
<A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> start)</CODE>
401
<B>Deprecated.</B> <I>Use <A HREF="../../../org/mozilla/javascript/ScriptableObject.html#getAttributes(int)"><CODE>getAttributes(int index)</CODE></A>. The engine always
402
ignored the start argument.</I></TD>
404
<TR BGCOLOR="white" CLASS="TableRowColor">
405
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
406
<CODE> int</CODE></FONT></TD>
407
<TD><CODE><B><A HREF="../../../org/mozilla/javascript/ScriptableObject.html#getAttributes(java.lang.String)">getAttributes</A></B>(java.lang.String name)</CODE>
410
Get the attributes of a named property.</TD>
412
<TR BGCOLOR="white" CLASS="TableRowColor">
413
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
414
<CODE> int</CODE></FONT></TD>
415
<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,
416
<A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> start)</CODE>
419
<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
420
ignored the start argument.</I></TD>
422
<TR BGCOLOR="white" CLASS="TableRowColor">
423
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
424
<CODE>abstract java.lang.String</CODE></FONT></TD>
425
<TD><CODE><B><A HREF="../../../org/mozilla/javascript/ScriptableObject.html#getClassName()">getClassName</A></B>()</CODE>
428
Return the name of the class.</TD>
430
<TR BGCOLOR="white" CLASS="TableRowColor">
431
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
432
<CODE>static <A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A></CODE></FONT></TD>
433
<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,
434
java.lang.String className)</CODE>
437
Get the prototype for the named class.</TD>
439
<TR BGCOLOR="white" CLASS="TableRowColor">
440
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
441
<CODE> java.lang.Object</CODE></FONT></TD>
442
<TD><CODE><B><A HREF="../../../org/mozilla/javascript/ScriptableObject.html#getDefaultValue(java.lang.Class)">getDefaultValue</A></B>(java.lang.Class typeHint)</CODE>
445
Implements the [[DefaultValue]] internal method.</TD>
447
<TR BGCOLOR="white" CLASS="TableRowColor">
448
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
449
<CODE>static <A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A></CODE></FONT></TD>
450
<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>
453
Get the Function.prototype property.</TD>
455
<TR BGCOLOR="white" CLASS="TableRowColor">
456
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
457
<CODE> java.lang.Object[]</CODE></FONT></TD>
458
<TD><CODE><B><A HREF="../../../org/mozilla/javascript/ScriptableObject.html#getIds()">getIds</A></B>()</CODE>
461
Returns an array of ids for the properties of the object.</TD>
463
<TR BGCOLOR="white" CLASS="TableRowColor">
464
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
465
<CODE>static <A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A></CODE></FONT></TD>
466
<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>
469
Get the Object.prototype property.</TD>
471
<TR BGCOLOR="white" CLASS="TableRowColor">
472
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
473
<CODE> <A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A></CODE></FONT></TD>
474
<TD><CODE><B><A HREF="../../../org/mozilla/javascript/ScriptableObject.html#getParentScope()">getParentScope</A></B>()</CODE>
477
Returns the parent (enclosing) scope of the object.</TD>
479
<TR BGCOLOR="white" CLASS="TableRowColor">
480
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
481
<CODE>static java.lang.Object</CODE></FONT></TD>
482
<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,
483
int index)</CODE>
486
Gets an indexed property from an object or any object in its prototype chain.</TD>
488
<TR BGCOLOR="white" CLASS="TableRowColor">
489
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
490
<CODE>static java.lang.Object</CODE></FONT></TD>
491
<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,
492
java.lang.String name)</CODE>
495
Gets a named property from an object or any object in its prototype chain.</TD>
497
<TR BGCOLOR="white" CLASS="TableRowColor">
498
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
499
<CODE>static java.lang.Object[]</CODE></FONT></TD>
500
<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>
503
Returns an array of all ids from an object and its prototypes.</TD>
505
<TR BGCOLOR="white" CLASS="TableRowColor">
506
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
507
<CODE> <A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A></CODE></FONT></TD>
508
<TD><CODE><B><A HREF="../../../org/mozilla/javascript/ScriptableObject.html#getPrototype()">getPrototype</A></B>()</CODE>
511
Returns the prototype of the object.</TD>
513
<TR BGCOLOR="white" CLASS="TableRowColor">
514
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
515
<CODE>static <A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A></CODE></FONT></TD>
516
<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>
519
Get the global scope.</TD>
521
<TR BGCOLOR="white" CLASS="TableRowColor">
522
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
523
<CODE>static java.lang.Object</CODE></FONT></TD>
524
<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,
525
java.lang.Object key)</CODE>
528
Get arbitrary application-specific value associated with the top scope
529
of the given scope.</TD>
531
<TR BGCOLOR="white" CLASS="TableRowColor">
532
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
533
<CODE> boolean</CODE></FONT></TD>
534
<TD><CODE><B><A HREF="../../../org/mozilla/javascript/ScriptableObject.html#has(int, org.mozilla.javascript.Scriptable)">has</A></B>(int index,
535
<A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> start)</CODE>
538
Returns true if the property index is defined.</TD>
540
<TR BGCOLOR="white" CLASS="TableRowColor">
541
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
542
<CODE> boolean</CODE></FONT></TD>
543
<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,
544
<A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> start)</CODE>
547
Returns true if the named property is defined.</TD>
549
<TR BGCOLOR="white" CLASS="TableRowColor">
550
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
551
<CODE> boolean</CODE></FONT></TD>
552
<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>
555
Implements the instanceof operator.</TD>
557
<TR BGCOLOR="white" CLASS="TableRowColor">
558
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
559
<CODE>static boolean</CODE></FONT></TD>
560
<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,
561
int index)</CODE>
564
Returns whether an indexed property is defined in an object or any object
565
in its prototype chain.</TD>
567
<TR BGCOLOR="white" CLASS="TableRowColor">
568
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
569
<CODE>static boolean</CODE></FONT></TD>
570
<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,
571
java.lang.String name)</CODE>
574
Returns whether a named property is defined in an object or any object
575
in its prototype chain.</TD>
577
<TR BGCOLOR="white" CLASS="TableRowColor">
578
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
579
<CODE> boolean</CODE></FONT></TD>
580
<TD><CODE><B><A HREF="../../../org/mozilla/javascript/ScriptableObject.html#isSealed()">isSealed</A></B>()</CODE>
583
Return true if this object is sealed.</TD>
585
<TR BGCOLOR="white" CLASS="TableRowColor">
586
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
587
<CODE> void</CODE></FONT></TD>
588
<TD><CODE><B><A HREF="../../../org/mozilla/javascript/ScriptableObject.html#put(int, org.mozilla.javascript.Scriptable, java.lang.Object)">put</A></B>(int index,
589
<A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> start,
590
java.lang.Object value)</CODE>
593
Sets the value of the indexed property, creating it if need be.</TD>
595
<TR BGCOLOR="white" CLASS="TableRowColor">
596
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
597
<CODE> void</CODE></FONT></TD>
598
<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,
599
<A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> start,
600
java.lang.Object value)</CODE>
603
Sets the value of the named property, creating it if need be.</TD>
605
<TR BGCOLOR="white" CLASS="TableRowColor">
606
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
607
<CODE>static void</CODE></FONT></TD>
608
<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,
610
java.lang.Object value)</CODE>
613
Puts an indexed property in an object or in an object in its prototype chain.</TD>
615
<TR BGCOLOR="white" CLASS="TableRowColor">
616
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
617
<CODE>static void</CODE></FONT></TD>
618
<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,
619
java.lang.String name,
620
java.lang.Object value)</CODE>
623
Puts a named property in an object or in an object in its prototype chain.</TD>
625
<TR BGCOLOR="white" CLASS="TableRowColor">
626
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
627
<CODE> void</CODE></FONT></TD>
628
<TD><CODE><B><A HREF="../../../org/mozilla/javascript/ScriptableObject.html#sealObject()">sealObject</A></B>()</CODE>
631
Seal this object.</TD>
633
<TR BGCOLOR="white" CLASS="TableRowColor">
634
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
635
<CODE> void</CODE></FONT></TD>
636
<TD><CODE><B><A HREF="../../../org/mozilla/javascript/ScriptableObject.html#setAttributes(int, int)">setAttributes</A></B>(int index,
637
int attributes)</CODE>
640
Set the attributes of an indexed property.</TD>
642
<TR BGCOLOR="white" CLASS="TableRowColor">
643
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
644
<CODE> void</CODE></FONT></TD>
645
<TD><CODE><B><A HREF="../../../org/mozilla/javascript/ScriptableObject.html#setAttributes(int, org.mozilla.javascript.Scriptable, int)">setAttributes</A></B>(int index,
646
<A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> start,
647
int attributes)</CODE>
650
<B>Deprecated.</B> <I>Use <A HREF="../../../org/mozilla/javascript/ScriptableObject.html#setAttributes(int, int)"><CODE>setAttributes(int index, int attributes)</CODE></A>.
651
The engine always ignored the start argument.</I></TD>
653
<TR BGCOLOR="white" CLASS="TableRowColor">
654
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
655
<CODE> void</CODE></FONT></TD>
656
<TD><CODE><B><A HREF="../../../org/mozilla/javascript/ScriptableObject.html#setAttributes(java.lang.String, int)">setAttributes</A></B>(java.lang.String name,
657
int attributes)</CODE>
660
Set the attributes of a named property.</TD>
662
<TR BGCOLOR="white" CLASS="TableRowColor">
663
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
664
<CODE> void</CODE></FONT></TD>
665
<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,
666
<A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> start,
667
int attributes)</CODE>
670
<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>.
671
The engine always ignored the start argument.</I></TD>
673
<TR BGCOLOR="white" CLASS="TableRowColor">
674
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
675
<CODE> void</CODE></FONT></TD>
676
<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>
679
Sets the parent (enclosing) scope of the object.</TD>
681
<TR BGCOLOR="white" CLASS="TableRowColor">
682
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
683
<CODE> void</CODE></FONT></TD>
684
<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>
687
Sets the prototype of the object.</TD>
690
<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
691
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
692
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
693
<TD><B>Methods inherited from class java.lang.Object</B></TD>
695
<TR BGCOLOR="white" CLASS="TableRowColor">
696
<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
702
<!-- ============ FIELD DETAIL =========== -->
704
<A NAME="field_detail"><!-- --></A>
705
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
706
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
707
<TD COLSPAN=1><FONT SIZE="+2">
708
<B>Field Detail</B></FONT></TD>
712
<A NAME="EMPTY"><!-- --></A><H3>
715
public static final int <B>EMPTY</B></PRE>
717
<DD>The empty property attribute.
719
Used by getAttributes() and setAttributes().
722
<DT><B>See Also:</B><DD><A HREF="../../../org/mozilla/javascript/ScriptableObject.html#getAttributes(java.lang.String, org.mozilla.javascript.Scriptable)"><CODE>getAttributes(java.lang.String, org.mozilla.javascript.Scriptable)</CODE></A>,
723
<A HREF="../../../org/mozilla/javascript/ScriptableObject.html#setAttributes(java.lang.String, org.mozilla.javascript.Scriptable, int)"><CODE>setAttributes(java.lang.String, org.mozilla.javascript.Scriptable, int)</CODE></A>,
724
<A HREF="../../../constant-values.html#org.mozilla.javascript.ScriptableObject.EMPTY">Constant Field Values</A></DL>
728
<A NAME="READONLY"><!-- --></A><H3>
731
public static final int <B>READONLY</B></PRE>
733
<DD>Property attribute indicating assignment to this property is ignored.
736
<DT><B>See Also:</B><DD><A HREF="../../../org/mozilla/javascript/ScriptableObject.html#put(java.lang.String, org.mozilla.javascript.Scriptable, java.lang.Object)"><CODE>put(java.lang.String, org.mozilla.javascript.Scriptable, java.lang.Object)</CODE></A>,
737
<A HREF="../../../org/mozilla/javascript/ScriptableObject.html#getAttributes(java.lang.String, org.mozilla.javascript.Scriptable)"><CODE>getAttributes(java.lang.String, org.mozilla.javascript.Scriptable)</CODE></A>,
738
<A HREF="../../../org/mozilla/javascript/ScriptableObject.html#setAttributes(java.lang.String, org.mozilla.javascript.Scriptable, int)"><CODE>setAttributes(java.lang.String, org.mozilla.javascript.Scriptable, int)</CODE></A>,
739
<A HREF="../../../constant-values.html#org.mozilla.javascript.ScriptableObject.READONLY">Constant Field Values</A></DL>
743
<A NAME="DONTENUM"><!-- --></A><H3>
746
public static final int <B>DONTENUM</B></PRE>
748
<DD>Property attribute indicating property is not enumerated.
750
Only enumerated properties will be returned by getIds().
753
<DT><B>See Also:</B><DD><A HREF="../../../org/mozilla/javascript/ScriptableObject.html#getIds()"><CODE>getIds()</CODE></A>,
754
<A HREF="../../../org/mozilla/javascript/ScriptableObject.html#getAttributes(java.lang.String, org.mozilla.javascript.Scriptable)"><CODE>getAttributes(java.lang.String, org.mozilla.javascript.Scriptable)</CODE></A>,
755
<A HREF="../../../org/mozilla/javascript/ScriptableObject.html#setAttributes(java.lang.String, org.mozilla.javascript.Scriptable, int)"><CODE>setAttributes(java.lang.String, org.mozilla.javascript.Scriptable, int)</CODE></A>,
756
<A HREF="../../../constant-values.html#org.mozilla.javascript.ScriptableObject.DONTENUM">Constant Field Values</A></DL>
760
<A NAME="PERMANENT"><!-- --></A><H3>
763
public static final int <B>PERMANENT</B></PRE>
765
<DD>Property attribute indicating property cannot be deleted.
768
<DT><B>See Also:</B><DD><A HREF="../../../org/mozilla/javascript/ScriptableObject.html#delete(java.lang.String)"><CODE>delete(java.lang.String)</CODE></A>,
769
<A HREF="../../../org/mozilla/javascript/ScriptableObject.html#getAttributes(java.lang.String, org.mozilla.javascript.Scriptable)"><CODE>getAttributes(java.lang.String, org.mozilla.javascript.Scriptable)</CODE></A>,
770
<A HREF="../../../org/mozilla/javascript/ScriptableObject.html#setAttributes(java.lang.String, org.mozilla.javascript.Scriptable, int)"><CODE>setAttributes(java.lang.String, org.mozilla.javascript.Scriptable, int)</CODE></A>,
771
<A HREF="../../../constant-values.html#org.mozilla.javascript.ScriptableObject.PERMANENT">Constant Field Values</A></DL>
774
<!-- ========= CONSTRUCTOR DETAIL ======== -->
776
<A NAME="constructor_detail"><!-- --></A>
777
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
778
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
779
<TD COLSPAN=1><FONT SIZE="+2">
780
<B>Constructor Detail</B></FONT></TD>
784
<A NAME="ScriptableObject()"><!-- --></A><H3>
785
ScriptableObject</H3>
787
public <B>ScriptableObject</B>()</PRE>
792
<A NAME="ScriptableObject(org.mozilla.javascript.Scriptable, org.mozilla.javascript.Scriptable)"><!-- --></A><H3>
793
ScriptableObject</H3>
795
public <B>ScriptableObject</B>(<A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> scope,
796
<A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> prototype)</PRE>
800
<!-- ============ METHOD DETAIL ========== -->
802
<A NAME="method_detail"><!-- --></A>
803
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
804
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
805
<TD COLSPAN=1><FONT SIZE="+2">
806
<B>Method Detail</B></FONT></TD>
810
<A NAME="getClassName()"><!-- --></A><H3>
813
public abstract java.lang.String <B>getClassName</B>()</PRE>
815
<DD>Return the name of the class.
817
This is typically the same name as the constructor.
818
Classes extending ScriptableObject must implement this abstract
822
<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>
830
<A NAME="has(java.lang.String, org.mozilla.javascript.Scriptable)"><!-- --></A><H3>
833
public boolean <B>has</B>(java.lang.String name,
834
<A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> start)</PRE>
836
<DD>Returns true if the named property is defined.
839
<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>
842
<DT><B>Parameters:</B><DD><CODE>name</CODE> - the name of the property<DD><CODE>start</CODE> - the object in which the lookup began
843
<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(java.lang.String, org.mozilla.javascript.Scriptable)</CODE></A>,
844
<A HREF="../../../org/mozilla/javascript/ScriptableObject.html#getProperty(org.mozilla.javascript.Scriptable, java.lang.String)"><CODE>getProperty(org.mozilla.javascript.Scriptable, java.lang.String)</CODE></A></DL>
849
<A NAME="has(int, org.mozilla.javascript.Scriptable)"><!-- --></A><H3>
852
public boolean <B>has</B>(int index,
853
<A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> start)</PRE>
855
<DD>Returns true if the property index is defined.
858
<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>
861
<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
862
<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(java.lang.String, org.mozilla.javascript.Scriptable)</CODE></A>,
863
<A HREF="../../../org/mozilla/javascript/ScriptableObject.html#getProperty(org.mozilla.javascript.Scriptable, java.lang.String)"><CODE>getProperty(org.mozilla.javascript.Scriptable, java.lang.String)</CODE></A></DL>
868
<A NAME="get(java.lang.String, org.mozilla.javascript.Scriptable)"><!-- --></A><H3>
871
public java.lang.Object <B>get</B>(java.lang.String name,
872
<A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> start)</PRE>
874
<DD>Returns the value of the named property or NOT_FOUND.
876
If the property was created using defineProperty, the
877
appropriate getter method is called.
880
<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>
883
<DT><B>Parameters:</B><DD><CODE>name</CODE> - the name of the property<DD><CODE>start</CODE> - the object in which the lookup began
884
<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>
889
<A NAME="get(int, org.mozilla.javascript.Scriptable)"><!-- --></A><H3>
892
public java.lang.Object <B>get</B>(int index,
893
<A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> start)</PRE>
895
<DD>Returns the value of the indexed property or NOT_FOUND.
898
<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>
901
<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
902
<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>
907
<A NAME="put(java.lang.String, org.mozilla.javascript.Scriptable, java.lang.Object)"><!-- --></A><H3>
910
public void <B>put</B>(java.lang.String name,
911
<A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> start,
912
java.lang.Object value)</PRE>
914
<DD>Sets the value of the named property, creating it if need be.
916
If the property was created using defineProperty, the
917
appropriate setter method is called. <p>
919
If the property's attributes include READONLY, no action is
921
This method will actually set the property in the start
925
<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>
928
<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(java.lang.String, org.mozilla.javascript.Scriptable)</CODE></A>,
929
<A HREF="../../../org/mozilla/javascript/Scriptable.html#get(java.lang.String, org.mozilla.javascript.Scriptable)"><CODE>Scriptable.get(java.lang.String, org.mozilla.javascript.Scriptable)</CODE></A>,
930
<A HREF="../../../org/mozilla/javascript/ScriptableObject.html#putProperty(org.mozilla.javascript.Scriptable, java.lang.String, java.lang.Object)"><CODE>putProperty(org.mozilla.javascript.Scriptable, java.lang.String, java.lang.Object)</CODE></A>,
931
<A HREF="../../../org/mozilla/javascript/Context.html#toObject(java.lang.Object, org.mozilla.javascript.Scriptable)"><CODE>Context.toObject(java.lang.Object, org.mozilla.javascript.Scriptable)</CODE></A></DL>
936
<A NAME="put(int, org.mozilla.javascript.Scriptable, java.lang.Object)"><!-- --></A><H3>
939
public void <B>put</B>(int index,
940
<A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> start,
941
java.lang.Object value)</PRE>
943
<DD>Sets the value of the indexed property, creating it if need be.
946
<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>
949
<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(java.lang.String, org.mozilla.javascript.Scriptable)"><CODE>Scriptable.has(java.lang.String, org.mozilla.javascript.Scriptable)</CODE></A>,
950
<A HREF="../../../org/mozilla/javascript/Scriptable.html#get(java.lang.String, org.mozilla.javascript.Scriptable)"><CODE>Scriptable.get(java.lang.String, org.mozilla.javascript.Scriptable)</CODE></A>,
951
<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>,
952
<A HREF="../../../org/mozilla/javascript/ScriptableObject.html#putProperty(org.mozilla.javascript.Scriptable, java.lang.String, java.lang.Object)"><CODE>putProperty(org.mozilla.javascript.Scriptable, java.lang.String, java.lang.Object)</CODE></A></DL>
957
<A NAME="delete(java.lang.String)"><!-- --></A><H3>
960
public void <B>delete</B>(java.lang.String name)</PRE>
962
<DD>Removes a named property from the object.
964
If the property is not found, or it has the PERMANENT attribute,
968
<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>
971
<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(java.lang.String, org.mozilla.javascript.Scriptable)</CODE></A>,
972
<A HREF="../../../org/mozilla/javascript/ScriptableObject.html#deleteProperty(org.mozilla.javascript.Scriptable, java.lang.String)"><CODE>deleteProperty(org.mozilla.javascript.Scriptable, java.lang.String)</CODE></A></DL>
977
<A NAME="delete(int)"><!-- --></A><H3>
980
public void <B>delete</B>(int index)</PRE>
982
<DD>Removes the indexed property from the object.
984
If the property is not found, or it has the PERMANENT attribute,
988
<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>
991
<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(java.lang.String, org.mozilla.javascript.Scriptable)"><CODE>Scriptable.get(java.lang.String, org.mozilla.javascript.Scriptable)</CODE></A>,
992
<A HREF="../../../org/mozilla/javascript/ScriptableObject.html#deleteProperty(org.mozilla.javascript.Scriptable, java.lang.String)"><CODE>deleteProperty(org.mozilla.javascript.Scriptable, java.lang.String)</CODE></A></DL>
997
<A NAME="getAttributes(java.lang.String, org.mozilla.javascript.Scriptable)"><!-- --></A><H3>
1000
public final int <B>getAttributes</B>(java.lang.String name,
1001
<A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> start)</PRE>
1003
<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
1004
ignored the start argument.</I>
1015
<A NAME="getAttributes(int, org.mozilla.javascript.Scriptable)"><!-- --></A><H3>
1018
public final int <B>getAttributes</B>(int index,
1019
<A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> start)</PRE>
1021
<DD><B>Deprecated.</B> <I>Use <A HREF="../../../org/mozilla/javascript/ScriptableObject.html#getAttributes(int)"><CODE>getAttributes(int index)</CODE></A>. The engine always
1022
ignored the start argument.</I>
1033
<A NAME="setAttributes(java.lang.String, org.mozilla.javascript.Scriptable, int)"><!-- --></A><H3>
1036
public final void <B>setAttributes</B>(java.lang.String name,
1037
<A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> start,
1038
int attributes)</PRE>
1040
<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>.
1041
The engine always ignored the start argument.</I>
1052
<A NAME="setAttributes(int, org.mozilla.javascript.Scriptable, int)"><!-- --></A><H3>
1055
public void <B>setAttributes</B>(int index,
1056
<A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> start,
1057
int attributes)</PRE>
1059
<DD><B>Deprecated.</B> <I>Use <A HREF="../../../org/mozilla/javascript/ScriptableObject.html#setAttributes(int, int)"><CODE>setAttributes(int index, int attributes)</CODE></A>.
1060
The engine always ignored the start argument.</I>
1071
<A NAME="getAttributes(java.lang.String)"><!-- --></A><H3>
1074
public int <B>getAttributes</B>(java.lang.String name)</PRE>
1076
<DD>Get the attributes of a named property.
1078
The property is specified by <code>name</code>
1079
as defined for <code>has</code>.<p>
1085
<DT><B>Parameters:</B><DD><CODE>name</CODE> - the identifier for the property
1086
<DT><B>Returns:</B><DD>the bitset of attributes
1088
<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(java.lang.String, org.mozilla.javascript.Scriptable)</CODE></A>,
1089
<A HREF="../../../org/mozilla/javascript/ScriptableObject.html#READONLY"><CODE>READONLY</CODE></A>,
1090
<A HREF="../../../org/mozilla/javascript/ScriptableObject.html#DONTENUM"><CODE>DONTENUM</CODE></A>,
1091
<A HREF="../../../org/mozilla/javascript/ScriptableObject.html#PERMANENT"><CODE>PERMANENT</CODE></A>,
1092
<A HREF="../../../org/mozilla/javascript/ScriptableObject.html#EMPTY"><CODE>EMPTY</CODE></A></DL>
1097
<A NAME="getAttributes(int)"><!-- --></A><H3>
1100
public int <B>getAttributes</B>(int index)</PRE>
1102
<DD>Get the attributes of an indexed property.
1108
<DT><B>Parameters:</B><DD><CODE>index</CODE> - the numeric index for the property
1109
<DT><B>Returns:</B><DD>the bitset of attributes
1111
<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
1112
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(java.lang.String, org.mozilla.javascript.Scriptable)</CODE></A>,
1113
<A HREF="../../../org/mozilla/javascript/ScriptableObject.html#READONLY"><CODE>READONLY</CODE></A>,
1114
<A HREF="../../../org/mozilla/javascript/ScriptableObject.html#DONTENUM"><CODE>DONTENUM</CODE></A>,
1115
<A HREF="../../../org/mozilla/javascript/ScriptableObject.html#PERMANENT"><CODE>PERMANENT</CODE></A>,
1116
<A HREF="../../../org/mozilla/javascript/ScriptableObject.html#EMPTY"><CODE>EMPTY</CODE></A></DL>
1121
<A NAME="setAttributes(java.lang.String, int)"><!-- --></A><H3>
1124
public void <B>setAttributes</B>(java.lang.String name,
1125
int attributes)</PRE>
1127
<DD>Set the attributes of a named property.
1129
The property is specified by <code>name</code>
1130
as defined for <code>has</code>.<p>
1132
The possible attributes are READONLY, DONTENUM,
1133
and PERMANENT. Combinations of attributes
1134
are expressed by the bitwise OR of attributes.
1135
EMPTY is the state of no attributes set. Any unused
1136
bits are reserved for future use.
1142
<DT><B>Parameters:</B><DD><CODE>name</CODE> - the name of the property<DD><CODE>attributes</CODE> - the bitset of attributes
1144
<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(java.lang.String, org.mozilla.javascript.Scriptable)</CODE></A>,
1145
<A HREF="../../../org/mozilla/javascript/ScriptableObject.html#READONLY"><CODE>READONLY</CODE></A>,
1146
<A HREF="../../../org/mozilla/javascript/ScriptableObject.html#DONTENUM"><CODE>DONTENUM</CODE></A>,
1147
<A HREF="../../../org/mozilla/javascript/ScriptableObject.html#PERMANENT"><CODE>PERMANENT</CODE></A>,
1148
<A HREF="../../../org/mozilla/javascript/ScriptableObject.html#EMPTY"><CODE>EMPTY</CODE></A></DL>
1153
<A NAME="setAttributes(int, int)"><!-- --></A><H3>
1156
public void <B>setAttributes</B>(int index,
1157
int attributes)</PRE>
1159
<DD>Set the attributes of an indexed property.
1165
<DT><B>Parameters:</B><DD><CODE>index</CODE> - the numeric index for the property<DD><CODE>attributes</CODE> - the bitset of attributes
1167
<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(java.lang.String, org.mozilla.javascript.Scriptable)</CODE></A>,
1168
<A HREF="../../../org/mozilla/javascript/ScriptableObject.html#READONLY"><CODE>READONLY</CODE></A>,
1169
<A HREF="../../../org/mozilla/javascript/ScriptableObject.html#DONTENUM"><CODE>DONTENUM</CODE></A>,
1170
<A HREF="../../../org/mozilla/javascript/ScriptableObject.html#PERMANENT"><CODE>PERMANENT</CODE></A>,
1171
<A HREF="../../../org/mozilla/javascript/ScriptableObject.html#EMPTY"><CODE>EMPTY</CODE></A></DL>
1176
<A NAME="getPrototype()"><!-- --></A><H3>
1179
public <A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> <B>getPrototype</B>()</PRE>
1181
<DD>Returns the prototype of the object.
1184
<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>
1188
<DT><B>Returns:</B><DD>the prototype</DL>
1193
<A NAME="setPrototype(org.mozilla.javascript.Scriptable)"><!-- --></A><H3>
1196
public void <B>setPrototype</B>(<A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> m)</PRE>
1198
<DD>Sets the prototype of the object.
1201
<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>
1204
<DT><B>Parameters:</B><DD><CODE>m</CODE> - the prototype to set</DL>
1209
<A NAME="getParentScope()"><!-- --></A><H3>
1212
public <A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> <B>getParentScope</B>()</PRE>
1214
<DD>Returns the parent (enclosing) scope of the object.
1217
<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>
1221
<DT><B>Returns:</B><DD>the parent scope</DL>
1226
<A NAME="setParentScope(org.mozilla.javascript.Scriptable)"><!-- --></A><H3>
1229
public void <B>setParentScope</B>(<A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> m)</PRE>
1231
<DD>Sets the parent (enclosing) scope of the object.
1234
<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>
1237
<DT><B>Parameters:</B><DD><CODE>m</CODE> - the parent scope to set</DL>
1242
<A NAME="getIds()"><!-- --></A><H3>
1245
public java.lang.Object[] <B>getIds</B>()</PRE>
1247
<DD>Returns an array of ids for the properties of the object.
1249
<p>Any properties with the attribute DONTENUM are not listed. <p>
1252
<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>
1256
<DT><B>Returns:</B><DD>an array of java.lang.Objects with an entry for every
1257
listed property. Properties accessed via an integer index will
1258
have a corresponding
1259
Integer entry in the returned array. Properties accessed by
1260
a String will have a String entry in the returned array.</DL>
1265
<A NAME="getAllIds()"><!-- --></A><H3>
1268
public java.lang.Object[] <B>getAllIds</B>()</PRE>
1270
<DD>Returns an array of ids for the properties of the object.
1272
<p>All properties, even those with attribute DONTENUM, are listed. <p>
1275
<DT><B>Specified by:</B><DD><CODE>getAllIds</CODE> in interface <CODE>org.mozilla.javascript.debug.DebuggableObject</CODE></DL>
1279
<DT><B>Returns:</B><DD>an array of java.lang.Objects with an entry for every
1280
listed property. Properties accessed via an integer index will
1281
have a corresponding
1282
Integer entry in the returned array. Properties accessed by
1283
a String will have a String entry in the returned array.</DL>
1288
<A NAME="getDefaultValue(java.lang.Class)"><!-- --></A><H3>
1289
getDefaultValue</H3>
1291
public java.lang.Object <B>getDefaultValue</B>(java.lang.Class typeHint)</PRE>
1293
<DD>Implements the [[DefaultValue]] internal method.
1295
<p>Note that the toPrimitive conversion is a no-op for
1296
every type other than Object, for which [[DefaultValue]]
1297
is called. See ECMA 9.1.<p>
1299
A <code>hint</code> of null means "no hint".
1302
<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>
1305
<DT><B>Parameters:</B><DD><CODE>typeHint</CODE> - the type hint
1306
<DT><B>Returns:</B><DD>the default value for the object
1308
See ECMA 8.6.2.6.</DL>
1313
<A NAME="hasInstance(org.mozilla.javascript.Scriptable)"><!-- --></A><H3>
1316
public boolean <B>hasInstance</B>(<A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> instance)</PRE>
1318
<DD>Implements the instanceof operator.
1320
<p>This operator has been proposed to ECMA.
1323
<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>
1326
<DT><B>Parameters:</B><DD><CODE>instance</CODE> - The value that appeared on the LHS of the instanceof
1328
<DT><B>Returns:</B><DD>true if "this" appears in value's prototype chain</DL>
1333
<A NAME="equivalentValues(java.lang.Object)"><!-- --></A><H3>
1334
equivalentValues</H3>
1336
protected java.lang.Object <B>equivalentValues</B>(java.lang.Object value)</PRE>
1338
<DD>Custom <tt>==</tt> operator.
1339
Must return <A HREF="../../../org/mozilla/javascript/Scriptable.html#NOT_FOUND"><CODE>Scriptable.NOT_FOUND</CODE></A> if this object does not
1340
have custom equality operator for the given value,
1341
<tt>Boolean.TRUE</tt> if this object is equivalent to <tt>value</tt>,
1342
<tt>Boolean.FALSE</tt> if this object is not equivalent to
1345
The default implementation returns Boolean.TRUE
1346
if <tt>this == value</tt> or <A HREF="../../../org/mozilla/javascript/Scriptable.html#NOT_FOUND"><CODE>Scriptable.NOT_FOUND</CODE></A> otherwise.
1347
It indicates that by default custom equality is available only if
1348
<tt>value</tt> is <tt>this</tt> in which case true is returned.
1359
<A NAME="defineClass(org.mozilla.javascript.Scriptable, java.lang.Class)"><!-- --></A><H3>
1362
public static void <B>defineClass</B>(<A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> scope,
1363
java.lang.Class clazz)
1364
throws java.lang.IllegalAccessException,
1365
java.lang.InstantiationException,
1366
java.lang.reflect.InvocationTargetException</PRE>
1368
<DD>Defines JavaScript objects from a Java class that implements Scriptable.
1370
If the given class has a method
1372
static void init(Context cx, Scriptable scope, boolean sealed);</pre>
1374
or its compatibility form
1376
static void init(Scriptable scope);</pre>
1378
then it is invoked and no further initialization is done.<p>
1380
However, if no such a method is found, then the class's constructors and
1381
methods are used to initialize a class in the following manner.<p>
1383
First, the zero-parameter constructor of the class is called to
1384
create the prototype. If no such constructor exists,
1385
a <A HREF="../../../org/mozilla/javascript/EvaluatorException.html" title="class in org.mozilla.javascript"><CODE>EvaluatorException</CODE></A> is thrown. <p>
1387
Next, all methods are scanned for special prefixes that indicate that they
1388
have special meaning for defining JavaScript objects.
1389
These special prefixes are
1391
<li><code>jsFunction_</code> for a JavaScript function
1392
<li><code>jsStaticFunction_</code> for a JavaScript function that
1393
is a property of the constructor
1394
<li><code>jsGet_</code> for a getter of a JavaScript property
1395
<li><code>jsSet_</code> for a setter of a JavaScript property
1396
<li><code>jsConstructor</code> for a JavaScript function that
1400
If the method's name begins with "jsFunction_", a JavaScript function
1401
is created with a name formed from the rest of the Java method name
1402
following "jsFunction_". So a Java method named "jsFunction_foo" will
1403
define a JavaScript method "foo". Calling this JavaScript function
1404
will cause the Java method to be called. The parameters of the method
1405
must be of number and types as defined by the FunctionObject class.
1406
The JavaScript function is then added as a property
1407
of the prototype. <p>
1409
If the method's name begins with "jsStaticFunction_", it is handled
1410
similarly except that the resulting JavaScript function is added as a
1411
property of the constructor object. The Java method must be static.
1413
If the method's name begins with "jsGet_" or "jsSet_", the method is
1414
considered to define a property. Accesses to the defined property
1415
will result in calls to these getter and setter methods. If no
1416
setter is defined, the property is defined as READONLY.<p>
1418
If the method's name is "jsConstructor", the method is
1419
considered to define the body of the constructor. Only one
1420
method of this name may be defined.
1421
If no method is found that can serve as constructor, a Java
1422
constructor will be selected to serve as the JavaScript
1423
constructor in the following manner. If the class has only one
1424
Java constructor, that constructor is used to define
1425
the JavaScript constructor. If the the class has two constructors,
1426
one must be the zero-argument constructor (otherwise an
1427
<A HREF="../../../org/mozilla/javascript/EvaluatorException.html" title="class in org.mozilla.javascript"><CODE>EvaluatorException</CODE></A> would have already been thrown
1428
when the prototype was to be created). In this case
1429
the Java constructor with one or more parameters will be used
1430
to define the JavaScript constructor. If the class has three
1431
or more constructors, an <A HREF="../../../org/mozilla/javascript/EvaluatorException.html" title="class in org.mozilla.javascript"><CODE>EvaluatorException</CODE></A>
1434
Finally, if there is a method
1436
static void finishInit(Scriptable scope, FunctionObject constructor,
1437
Scriptable prototype)</pre>
1439
it will be called to finish any initialization. The <code>scope</code>
1440
argument will be passed, along with the newly created constructor and
1441
the newly created prototype.<p>
1447
<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
1450
<DD><CODE>java.lang.IllegalAccessException</CODE> - if access is not available
1451
to a reflected class member
1452
<DD><CODE>java.lang.InstantiationException</CODE> - if unable to instantiate
1454
<DD><CODE>java.lang.reflect.InvocationTargetException</CODE> - if an exception is thrown
1455
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>,
1456
<A HREF="../../../org/mozilla/javascript/FunctionObject.html" title="class in org.mozilla.javascript"><CODE>FunctionObject</CODE></A>,
1457
<A HREF="../../../org/mozilla/javascript/ScriptableObject.html#READONLY"><CODE>READONLY</CODE></A>,
1458
<A HREF="../../../org/mozilla/javascript/ScriptableObject.html#defineProperty(java.lang.String, java.lang.Object, int)"><CODE>defineProperty(java.lang.String, java.lang.Object, int)</CODE></A></DL>
1463
<A NAME="defineClass(org.mozilla.javascript.Scriptable, java.lang.Class, boolean)"><!-- --></A><H3>
1466
public static void <B>defineClass</B>(<A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> scope,
1467
java.lang.Class clazz,
1468
boolean sealed)
1469
throws java.lang.IllegalAccessException,
1470
java.lang.InstantiationException,
1471
java.lang.reflect.InvocationTargetException</PRE>
1473
<DD>Defines JavaScript objects from a Java class, optionally
1476
Similar to <code>defineClass(Scriptable scope, Class clazz)</code>
1477
except that sealing is allowed. An object that is sealed cannot have
1478
properties added or removed. Note that sealing is not allowed in
1479
the current ECMA/ISO language specification, but is likely for
1486
<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
1487
and properties. The class must implement Scriptable.<DD><CODE>sealed</CODE> - whether or not to create sealed standard objects that
1490
<DD><CODE>java.lang.IllegalAccessException</CODE> - if access is not available
1491
to a reflected class member
1492
<DD><CODE>java.lang.InstantiationException</CODE> - if unable to instantiate
1494
<DD><CODE>java.lang.reflect.InvocationTargetException</CODE> - if an exception is thrown
1495
during execution of methods of the named class<DT><B>Since:</B></DT>
1502
<A NAME="defineProperty(java.lang.String, java.lang.Object, int)"><!-- --></A><H3>
1505
public void <B>defineProperty</B>(java.lang.String propertyName,
1506
java.lang.Object value,
1507
int attributes)</PRE>
1509
<DD>Define a JavaScript property.
1511
Creates the property with an initial value and sets its attributes.
1517
<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(java.lang.String, org.mozilla.javascript.Scriptable, java.lang.Object)</CODE></A></DL>
1522
<A NAME="defineProperty(org.mozilla.javascript.Scriptable, java.lang.String, java.lang.Object, int)"><!-- --></A><H3>
1525
public static void <B>defineProperty</B>(<A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> destination,
1526
java.lang.String propertyName,
1527
java.lang.Object value,
1528
int attributes)</PRE>
1530
<DD>Utility method to add properties to arbitrary Scriptable object.
1531
If destination is instance of ScriptableObject, calls
1532
defineProperty there, otherwise calls put in destination
1544
<A NAME="defineProperty(java.lang.String, java.lang.Class, int)"><!-- --></A><H3>
1547
public void <B>defineProperty</B>(java.lang.String propertyName,
1548
java.lang.Class clazz,
1549
int attributes)</PRE>
1551
<DD>Define a JavaScript property with getter and setter side effects.
1553
If the setter is not found, the attribute READONLY is added to
1554
the given attributes. <p>
1556
The getter must be a method with zero parameters, and the setter, if
1557
found, must be a method with one parameter.<p>
1563
<DT><B>Parameters:</B><DD><CODE>propertyName</CODE> - the name of the property to define. This name
1564
also affects the name of the setter and getter
1565
to search for. If the propertyId is "foo", then
1566
<code>clazz</code> will be searched for "getFoo"
1567
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(java.lang.String, org.mozilla.javascript.Scriptable, java.lang.Object)</CODE></A></DL>
1572
<A NAME="defineProperty(java.lang.String, java.lang.Object, java.lang.reflect.Method, java.lang.reflect.Method, int)"><!-- --></A><H3>
1575
public void <B>defineProperty</B>(java.lang.String propertyName,
1576
java.lang.Object delegateTo,
1577
java.lang.reflect.Method getter,
1578
java.lang.reflect.Method setter,
1579
int attributes)</PRE>
1581
<DD>Define a JavaScript property.
1583
Use this method only if you wish to define getters and setters for
1584
a given property in a ScriptableObject. To create a property without
1585
special getter or setter side effects, use
1586
<code>defineProperty(String,int)</code>.
1588
If <code>setter</code> is null, the attribute READONLY is added to
1589
the given attributes.<p>
1591
Several forms of getters or setters are allowed. In all cases the
1592
type of the value parameter can be any one of the following types:
1593
Object, String, boolean, Scriptable, byte, short, int, long, float,
1594
or double. The runtime will perform appropriate conversions based
1595
upon the type of the parameter (see description in FunctionObject).
1596
The first forms are nonstatic methods of the class referred to
1600
void setFoo(SomeType value);</pre>
1601
Next are static methods that may be of any class; the object whose
1602
property is being accessed is passed in as an extra argument:
1604
static Object getFoo(ScriptableObject obj);
1605
static void setFoo(ScriptableObject obj, SomeType value);</pre>
1606
Finally, it is possible to delegate to another object entirely using
1607
the <code>delegateTo</code> parameter. In this case the methods are
1608
nonstatic methods of the class delegated to, and the object whose
1609
property is being accessed is passed in as an extra argument:
1611
Object getFoo(ScriptableObject obj);
1612
void setFoo(ScriptableObject obj, SomeType value);</pre>
1618
<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,
1619
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>
1624
<A NAME="defineFunctionProperties(java.lang.String[], java.lang.Class, int)"><!-- --></A><H3>
1625
defineFunctionProperties</H3>
1627
public void <B>defineFunctionProperties</B>(java.lang.String[] names,
1628
java.lang.Class clazz,
1629
int attributes)</PRE>
1631
<DD>Search for names in a class, adding the resulting methods
1634
<p> Uses reflection to find the methods of the given names. Then
1635
FunctionObjects are constructed from the methods found, and
1636
are added to this object as properties with the given names.
1642
<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>
1647
<A NAME="getObjectPrototype(org.mozilla.javascript.Scriptable)"><!-- --></A><H3>
1648
getObjectPrototype</H3>
1650
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>
1652
<DD>Get the Object.prototype property.
1664
<A NAME="getFunctionPrototype(org.mozilla.javascript.Scriptable)"><!-- --></A><H3>
1665
getFunctionPrototype</H3>
1667
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>
1669
<DD>Get the Function.prototype property.
1681
<A NAME="getClassPrototype(org.mozilla.javascript.Scriptable, java.lang.String)"><!-- --></A><H3>
1682
getClassPrototype</H3>
1684
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,
1685
java.lang.String className)</PRE>
1687
<DD>Get the prototype for the named class.
1689
For example, <code>getClassPrototype(s, "Date")</code> will first
1690
walk up the parent chain to find the outermost scope, then will
1691
search that scope for the Date constructor, and then will
1692
return Date.prototype. If any of the lookups fail, or
1693
the prototype is not a JavaScript object, then null will
1700
<DT><B>Parameters:</B><DD><CODE>scope</CODE> - an object in the scope chain<DD><CODE>className</CODE> - the name of the constructor
1701
<DT><B>Returns:</B><DD>the prototype for the named class, or null if it
1702
cannot be found.</DL>
1707
<A NAME="getTopLevelScope(org.mozilla.javascript.Scriptable)"><!-- --></A><H3>
1708
getTopLevelScope</H3>
1710
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>
1712
<DD>Get the global scope.
1714
<p>Walks the parent scope chain to find an object with a null
1715
parent scope (the global object).
1721
<DT><B>Parameters:</B><DD><CODE>obj</CODE> - a JavaScript object
1722
<DT><B>Returns:</B><DD>the corresponding global scope</DL>
1727
<A NAME="sealObject()"><!-- --></A><H3>
1730
public void <B>sealObject</B>()</PRE>
1732
<DD>Seal this object.
1734
A sealed object may not have properties added or removed. Once
1735
an object is sealed it may not be unsealed.
1741
<DT><B>Since:</B></DT>
1748
<A NAME="isSealed()"><!-- --></A><H3>
1751
public final boolean <B>isSealed</B>()</PRE>
1753
<DD>Return true if this object is sealed.
1755
It is an error to attempt to add or remove properties to
1763
<DT><B>Returns:</B><DD>true if sealed, false otherwise.<DT><B>Since:</B></DT>
1770
<A NAME="getProperty(org.mozilla.javascript.Scriptable, java.lang.String)"><!-- --></A><H3>
1773
public static java.lang.Object <B>getProperty</B>(<A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> obj,
1774
java.lang.String name)</PRE>
1776
<DD>Gets a named property from an object or any object in its prototype chain.
1778
Searches the prototype chain for a property named <code>name</code>.
1785
<DT><B>Parameters:</B><DD><CODE>obj</CODE> - a JavaScript object<DD><CODE>name</CODE> - a property name
1786
<DT><B>Returns:</B><DD>the value of a property with name <code>name</code> found in
1787
<code>obj</code> or any object in its prototype chain, or
1788
<code>Scriptable.NOT_FOUND</code> if not found<DT><B>Since:</B></DT>
1795
<A NAME="getProperty(org.mozilla.javascript.Scriptable, int)"><!-- --></A><H3>
1798
public static java.lang.Object <B>getProperty</B>(<A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> obj,
1799
int index)</PRE>
1801
<DD>Gets an indexed property from an object or any object in its prototype chain.
1803
Searches the prototype chain for a property with integral index
1804
<code>index</code>. Note that if you wish to look for properties with numerical
1805
but non-integral indicies, you should use getProperty(Scriptable,String) with
1806
the string value of the index.
1813
<DT><B>Parameters:</B><DD><CODE>obj</CODE> - a JavaScript object<DD><CODE>index</CODE> - an integral index
1814
<DT><B>Returns:</B><DD>the value of a property with index <code>index</code> found in
1815
<code>obj</code> or any object in its prototype chain, or
1816
<code>Scriptable.NOT_FOUND</code> if not found<DT><B>Since:</B></DT>
1823
<A NAME="hasProperty(org.mozilla.javascript.Scriptable, java.lang.String)"><!-- --></A><H3>
1826
public static boolean <B>hasProperty</B>(<A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> obj,
1827
java.lang.String name)</PRE>
1829
<DD>Returns whether a named property is defined in an object or any object
1830
in its prototype chain.
1832
Searches the prototype chain for a property named <code>name</code>.
1839
<DT><B>Parameters:</B><DD><CODE>obj</CODE> - a JavaScript object<DD><CODE>name</CODE> - a property name
1840
<DT><B>Returns:</B><DD>the true if property was found<DT><B>Since:</B></DT>
1847
<A NAME="hasProperty(org.mozilla.javascript.Scriptable, int)"><!-- --></A><H3>
1850
public static boolean <B>hasProperty</B>(<A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> obj,
1851
int index)</PRE>
1853
<DD>Returns whether an indexed property is defined in an object or any object
1854
in its prototype chain.
1856
Searches the prototype chain for a property with index <code>index</code>.
1863
<DT><B>Parameters:</B><DD><CODE>obj</CODE> - a JavaScript object<DD><CODE>index</CODE> - a property index
1864
<DT><B>Returns:</B><DD>the true if property was found<DT><B>Since:</B></DT>
1871
<A NAME="putProperty(org.mozilla.javascript.Scriptable, java.lang.String, java.lang.Object)"><!-- --></A><H3>
1874
public static void <B>putProperty</B>(<A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> obj,
1875
java.lang.String name,
1876
java.lang.Object value)</PRE>
1878
<DD>Puts a named property in an object or in an object in its prototype chain.
1880
Seaches for the named property in the prototype chain. If it is found,
1881
the value of the property is changed. If it is not found, a new
1882
property is added in <code>obj</code>.
1888
<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>
1895
<A NAME="putProperty(org.mozilla.javascript.Scriptable, int, java.lang.Object)"><!-- --></A><H3>
1898
public static void <B>putProperty</B>(<A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> obj,
1900
java.lang.Object value)</PRE>
1902
<DD>Puts an indexed property in an object or in an object in its prototype chain.
1904
Seaches for the indexed property in the prototype chain. If it is found,
1905
the value of the property is changed. If it is not found, a new
1906
property is added in <code>obj</code>.
1912
<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>
1919
<A NAME="deleteProperty(org.mozilla.javascript.Scriptable, java.lang.String)"><!-- --></A><H3>
1922
public static boolean <B>deleteProperty</B>(<A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> obj,
1923
java.lang.String name)</PRE>
1925
<DD>Removes the property from an object or its prototype chain.
1927
Searches for a property with <code>name</code> in obj or
1928
its prototype chain. If it is found, the object's delete
1935
<DT><B>Parameters:</B><DD><CODE>obj</CODE> - a JavaScript object<DD><CODE>name</CODE> - a property name
1936
<DT><B>Returns:</B><DD>true if the property doesn't exist or was successfully removed<DT><B>Since:</B></DT>
1943
<A NAME="deleteProperty(org.mozilla.javascript.Scriptable, int)"><!-- --></A><H3>
1946
public static boolean <B>deleteProperty</B>(<A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> obj,
1947
int index)</PRE>
1949
<DD>Removes the property from an object or its prototype chain.
1951
Searches for a property with <code>index</code> in obj or
1952
its prototype chain. If it is found, the object's delete
1959
<DT><B>Parameters:</B><DD><CODE>obj</CODE> - a JavaScript object<DD><CODE>index</CODE> - a property index
1960
<DT><B>Returns:</B><DD>true if the property doesn't exist or was successfully removed<DT><B>Since:</B></DT>
1967
<A NAME="getPropertyIds(org.mozilla.javascript.Scriptable)"><!-- --></A><H3>
1970
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>
1972
<DD>Returns an array of all ids from an object and its prototypes.
1979
<DT><B>Parameters:</B><DD><CODE>obj</CODE> - a JavaScript object
1980
<DT><B>Returns:</B><DD>an array of all ids from all object in the prototype chain.
1981
If a given id occurs multiple times in the prototype chain,
1982
it will occur only once in this list.<DT><B>Since:</B></DT>
1989
<A NAME="callMethod(org.mozilla.javascript.Scriptable, java.lang.String, java.lang.Object[])"><!-- --></A><H3>
1992
public static java.lang.Object <B>callMethod</B>(<A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> obj,
1993
java.lang.String methodName,
1994
java.lang.Object[] args)</PRE>
1996
<DD>Call a method of an object.
2002
<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>
2007
<A NAME="callMethod(org.mozilla.javascript.Context, org.mozilla.javascript.Scriptable, java.lang.String, java.lang.Object[])"><!-- --></A><H3>
2010
public static java.lang.Object <B>callMethod</B>(<A HREF="../../../org/mozilla/javascript/Context.html" title="class in org.mozilla.javascript">Context</A> cx,
2011
<A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> obj,
2012
java.lang.String methodName,
2013
java.lang.Object[] args)</PRE>
2015
<DD>Call a method of an object.
2021
<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>
2026
<A NAME="getAssociatedValue(java.lang.Object)"><!-- --></A><H3>
2027
getAssociatedValue</H3>
2029
public final java.lang.Object <B>getAssociatedValue</B>(java.lang.Object key)</PRE>
2031
<DD>Get arbitrary application-specific value associated with this object.
2037
<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>
2042
<A NAME="getTopScopeValue(org.mozilla.javascript.Scriptable, java.lang.Object)"><!-- --></A><H3>
2043
getTopScopeValue</H3>
2045
public static java.lang.Object <B>getTopScopeValue</B>(<A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> scope,
2046
java.lang.Object key)</PRE>
2048
<DD>Get arbitrary application-specific value associated with the top scope
2050
The method first calls <A HREF="../../../org/mozilla/javascript/ScriptableObject.html#getTopLevelScope(org.mozilla.javascript.Scriptable)"><CODE>getTopLevelScope(Scriptable scope)</CODE></A>
2051
and then searches the prototype chain of the top scope for the first
2052
object containing the associated value with the given key.
2058
<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>
2063
<A NAME="associateValue(java.lang.Object, java.lang.Object)"><!-- --></A><H3>
2066
public final java.lang.Object <B>associateValue</B>(java.lang.Object key,
2067
java.lang.Object value)</PRE>
2069
<DD>Associate arbitrary application-specific value with this object.
2070
Value can only be associated with the given object and key only once.
2071
The method ignores any subsequent attempts to change the already
2073
<p> The associated values are not serilized.
2079
<DT><B>Parameters:</B><DD><CODE>key</CODE> - key object to select particular value.<DD><CODE>value</CODE> - the value to associate
2080
<DT><B>Returns:</B><DD>the passed value if the method is called first time for the
2081
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>
2084
<!-- ========= END OF CLASS DATA ========= -->
2088
<!-- ======= START OF BOTTOM NAVBAR ====== -->
2089
<A NAME="navbar_bottom"><!-- --></A>
2090
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
2091
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
2093
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
2094
<A NAME="navbar_bottom_firstrow"><!-- --></A>
2095
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
2096
<TR ALIGN="center" VALIGN="top">
2097
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
2098
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
2099
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
2100
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
2101
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
2102
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
2103
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
2107
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
2113
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
2114
<A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript"><B>PREV CLASS</B></A>
2115
<A HREF="../../../org/mozilla/javascript/SecurityController.html" title="class in org.mozilla.javascript"><B>NEXT CLASS</B></A></FONT></TD>
2116
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
2117
<A HREF="../../../index.html" target="_top"><B>FRAMES</B></A>
2118
<A HREF="ScriptableObject.html" target="_top"><B>NO FRAMES</B></A>
2119
<SCRIPT type="text/javascript">
2122
document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
2127
<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
2133
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
2134
SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
2135
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
2136
DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
2139
<A NAME="skip-navbar_bottom"></A>
2140
<!-- ======== END OF BOTTOM NAVBAR ======= -->