aboutsummaryrefslogtreecommitdiffstats
path: root/infrastructure/rhino1_7R1/javadoc/org/mozilla/javascript/FunctionObject.html
blob: 4e9d01125649752cd9bdaedad9ca6e42a564d5f4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0) on Thu Mar 06 17:19:15 EST 2008 -->
<TITLE>
FunctionObject (Rhino)
</TITLE>

<META NAME="date" CONTENT="2008-03-06">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">

<SCRIPT type="text/javascript">
function windowTitle()
{
    if (location.href.indexOf('is-external=true') == -1) {
        parent.document.title="FunctionObject (Rhino)";
    }
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>

</HEAD>

<BODY BGCOLOR="white" onload="windowTitle();">
<HR>


<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../org/mozilla/javascript/Function.html" title="interface in org.mozilla.javascript"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../org/mozilla/javascript/GeneratedClassLoader.html" title="interface in org.mozilla.javascript"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../index.html?org/mozilla/javascript/FunctionObject.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="FunctionObject.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<SCRIPT type="text/javascript">
  <!--
  if(window==top) {
    document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
  }
  //-->
</SCRIPT>
<NOSCRIPT>
  <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>


</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->

<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
org.mozilla.javascript</FONT>
<BR>
Class FunctionObject</H2>
<PRE>
java.lang.Object
  <IMG SRC="../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../org/mozilla/javascript/ScriptableObject.html" title="class in org.mozilla.javascript">org.mozilla.javascript.ScriptableObject</A>
      <IMG SRC="../../../resources/inherit.gif" ALT="extended by ">org.mozilla.javascript.IdScriptableObject
          <IMG SRC="../../../resources/inherit.gif" ALT="extended by ">org.mozilla.javascript.BaseFunction
              <IMG SRC="../../../resources/inherit.gif" ALT="extended by "><B>org.mozilla.javascript.FunctionObject</B>
</PRE>
<DL>
<DT><B>All Implemented Interfaces:</B> <DD>java.io.Serializable, <A HREF="../../../org/mozilla/javascript/Callable.html" title="interface in org.mozilla.javascript">Callable</A>, org.mozilla.javascript.ConstProperties, org.mozilla.javascript.debug.DebuggableObject, <A HREF="../../../org/mozilla/javascript/Function.html" title="interface in org.mozilla.javascript">Function</A>, org.mozilla.javascript.IdFunctionCall, <A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A></DD>
</DL>
<HR>
<DL>
<DT><PRE>public class <B>FunctionObject</B><DT>extends org.mozilla.javascript.BaseFunction</DL>
</PRE>

<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../serialized-form.html#org.mozilla.javascript.FunctionObject">Serialized Form</A></DL>
<HR>

<P>
<!-- =========== FIELD SUMMARY =========== -->

<A NAME="field_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Field Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/mozilla/javascript/FunctionObject.html#JAVA_BOOLEAN_TYPE">JAVA_BOOLEAN_TYPE</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/mozilla/javascript/FunctionObject.html#JAVA_DOUBLE_TYPE">JAVA_DOUBLE_TYPE</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/mozilla/javascript/FunctionObject.html#JAVA_INT_TYPE">JAVA_INT_TYPE</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/mozilla/javascript/FunctionObject.html#JAVA_OBJECT_TYPE">JAVA_OBJECT_TYPE</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/mozilla/javascript/FunctionObject.html#JAVA_SCRIPTABLE_TYPE">JAVA_SCRIPTABLE_TYPE</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/mozilla/javascript/FunctionObject.html#JAVA_STRING_TYPE">JAVA_STRING_TYPE</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/mozilla/javascript/FunctionObject.html#JAVA_UNSUPPORTED_TYPE">JAVA_UNSUPPORTED_TYPE</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
</TABLE>
&nbsp;<A NAME="fields_inherited_from_class_org.mozilla.javascript.ScriptableObject"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Fields inherited from class org.mozilla.javascript.<A HREF="../../../org/mozilla/javascript/ScriptableObject.html" title="class in org.mozilla.javascript">ScriptableObject</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../org/mozilla/javascript/ScriptableObject.html#CONST">CONST</A>, <A HREF="../../../org/mozilla/javascript/ScriptableObject.html#DONTENUM">DONTENUM</A>, <A HREF="../../../org/mozilla/javascript/ScriptableObject.html#EMPTY">EMPTY</A>, <A HREF="../../../org/mozilla/javascript/ScriptableObject.html#PERMANENT">PERMANENT</A>, <A HREF="../../../org/mozilla/javascript/ScriptableObject.html#READONLY">READONLY</A>, <A HREF="../../../org/mozilla/javascript/ScriptableObject.html#UNINITIALIZED_CONST">UNINITIALIZED_CONST</A></CODE></TD>
</TR>
</TABLE>
&nbsp;<A NAME="fields_inherited_from_class_org.mozilla.javascript.Scriptable"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Fields inherited from interface org.mozilla.javascript.<A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../org/mozilla/javascript/Scriptable.html#NOT_FOUND">NOT_FOUND</A></CODE></TD>
</TR>
</TABLE>
&nbsp;
<!-- ======== CONSTRUCTOR SUMMARY ======== -->

<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../org/mozilla/javascript/FunctionObject.html#FunctionObject(java.lang.String, java.lang.reflect.Member, org.mozilla.javascript.Scriptable)">FunctionObject</A></B>(java.lang.String&nbsp;name,
               java.lang.reflect.Member&nbsp;methodOrConstructor,
               <A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A>&nbsp;scope)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create a JavaScript function object from a Java method.</TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== METHOD SUMMARY =========== -->

<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/mozilla/javascript/FunctionObject.html#addAsConstructor(org.mozilla.javascript.Scriptable, org.mozilla.javascript.Scriptable)">addAsConstructor</A></B>(<A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A>&nbsp;scope,
                 <A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A>&nbsp;prototype)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Define this function as a JavaScript constructor.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.lang.Object</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/mozilla/javascript/FunctionObject.html#call(org.mozilla.javascript.Context, org.mozilla.javascript.Scriptable, org.mozilla.javascript.Scriptable, java.lang.Object[])">call</A></B>(<A HREF="../../../org/mozilla/javascript/Context.html" title="class in org.mozilla.javascript">Context</A>&nbsp;cx,
     <A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A>&nbsp;scope,
     <A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A>&nbsp;thisObj,
     java.lang.Object[]&nbsp;args)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Performs conversions on argument types if needed and
 invokes the underlying Java method or constructor.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;java.lang.Object</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/mozilla/javascript/FunctionObject.html#convertArg(org.mozilla.javascript.Context, org.mozilla.javascript.Scriptable, java.lang.Object, java.lang.Class)">convertArg</A></B>(<A HREF="../../../org/mozilla/javascript/Context.html" title="class in org.mozilla.javascript">Context</A>&nbsp;cx,
           <A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A>&nbsp;scope,
           java.lang.Object&nbsp;arg,
           java.lang.Class&nbsp;desired)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&nbsp;<I>Use <A HREF="../../../org/mozilla/javascript/FunctionObject.html#getTypeTag(java.lang.Class)"><CODE>getTypeTag(Class)</CODE></A>
 and <A HREF="../../../org/mozilla/javascript/FunctionObject.html#convertArg(org.mozilla.javascript.Context, org.mozilla.javascript.Scriptable, java.lang.Object, int)"><CODE>convertArg(Context, Scriptable, Object, int)</CODE></A>
 for type convertion.</I></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;java.lang.Object</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/mozilla/javascript/FunctionObject.html#convertArg(org.mozilla.javascript.Context, org.mozilla.javascript.Scriptable, java.lang.Object, int)">convertArg</A></B>(<A HREF="../../../org/mozilla/javascript/Context.html" title="class in org.mozilla.javascript">Context</A>&nbsp;cx,
           <A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A>&nbsp;scope,
           java.lang.Object&nbsp;arg,
           int&nbsp;typeTag)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/mozilla/javascript/FunctionObject.html#createObject(org.mozilla.javascript.Context, org.mozilla.javascript.Scriptable)">createObject</A></B>(<A HREF="../../../org/mozilla/javascript/Context.html" title="class in org.mozilla.javascript">Context</A>&nbsp;cx,
             <A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A>&nbsp;scope)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return new <A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript"><CODE>Scriptable</CODE></A> instance using the default
 constructor for the class of the underlying Java method.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/mozilla/javascript/FunctionObject.html#getArity()">getArity</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return the value defined by  the method used to construct the object
 (number of parameters of the method, or 1 if the method is a "varargs"
 form).</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/mozilla/javascript/FunctionObject.html#getFunctionName()">getFunctionName</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/mozilla/javascript/FunctionObject.html#getLength()">getLength</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return the same value as <A HREF="../../../org/mozilla/javascript/FunctionObject.html#getArity()"><CODE>getArity()</CODE></A>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.lang.reflect.Member</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/mozilla/javascript/FunctionObject.html#getMethodOrConstructor()">getMethodOrConstructor</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get Java method or constructor this function represent.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/mozilla/javascript/FunctionObject.html#getTypeTag(java.lang.Class)">getTypeTag</A></B>(java.lang.Class&nbsp;type)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_org.mozilla.javascript.BaseFunction"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class org.mozilla.javascript.BaseFunction</B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>construct, execIdCall, fillConstructorProperties, findInstanceIdInfo, findPrototypeId, getClassName, getClassPrototype, getInstanceIdName, getInstanceIdValue, getMaxInstanceId, hasInstance, initPrototypeId, setImmunePrototypeProperty, setInstanceIdValue</CODE></TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_org.mozilla.javascript.IdScriptableObject"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class org.mozilla.javascript.IdScriptableObject</B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>activatePrototypeMap, addIdFunctionProperty, defaultGet, defaultPut, delete, exportAsJSClass, get, getAttributes, has, hasPrototypeMap, incompatibleCallError, initPrototypeConstructor, initPrototypeMethod, initPrototypeValue, instanceIdInfo, put, setAttributes</CODE></TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_org.mozilla.javascript.ScriptableObject"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class org.mozilla.javascript.<A HREF="../../../org/mozilla/javascript/ScriptableObject.html" title="class in org.mozilla.javascript">ScriptableObject</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../org/mozilla/javascript/ScriptableObject.html#associateValue(java.lang.Object, java.lang.Object)">associateValue</A>, <A HREF="../../../org/mozilla/javascript/ScriptableObject.html#avoidObjectDetection()">avoidObjectDetection</A>, <A HREF="../../../org/mozilla/javascript/ScriptableObject.html#callMethod(org.mozilla.javascript.Context, org.mozilla.javascript.Scriptable, java.lang.String, java.lang.Object[])">callMethod</A>, <A HREF="../../../org/mozilla/javascript/ScriptableObject.html#callMethod(org.mozilla.javascript.Scriptable, java.lang.String, java.lang.Object[])">callMethod</A>, <A HREF="../../../org/mozilla/javascript/ScriptableObject.html#defineClass(org.mozilla.javascript.Scriptable, java.lang.Class)">defineClass</A>, <A HREF="../../../org/mozilla/javascript/ScriptableObject.html#defineClass(org.mozilla.javascript.Scriptable, java.lang.Class, boolean)">defineClass</A>, <A HREF="../../../org/mozilla/javascript/ScriptableObject.html#defineClass(org.mozilla.javascript.Scriptable, java.lang.Class, boolean, boolean)">defineClass</A>, <A HREF="../../../org/mozilla/javascript/ScriptableObject.html#defineConst(java.lang.String, org.mozilla.javascript.Scriptable)">defineConst</A>, <A HREF="../../../org/mozilla/javascript/ScriptableObject.html#defineConstProperty(org.mozilla.javascript.Scriptable, java.lang.String)">defineConstProperty</A>, <A HREF="../../../org/mozilla/javascript/ScriptableObject.html#defineFunctionProperties(java.lang.String[], java.lang.Class, int)">defineFunctionProperties</A>, <A HREF="../../../org/mozilla/javascript/ScriptableObject.html#defineProperty(org.mozilla.javascript.Scriptable, java.lang.String, java.lang.Object, int)">defineProperty</A>, <A HREF="../../../org/mozilla/javascript/ScriptableObject.html#defineProperty(java.lang.String, java.lang.Class, int)">defineProperty</A>, <A HREF="../../../org/mozilla/javascript/ScriptableObject.html#defineProperty(java.lang.String, java.lang.Object, int)">defineProperty</A>, <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>, <A HREF="../../../org/mozilla/javascript/ScriptableObject.html#delete(int)">delete</A>, <A HREF="../../../org/mozilla/javascript/ScriptableObject.html#deleteProperty(org.mozilla.javascript.Scriptable, int)">deleteProperty</A>, <A HREF="../../../org/mozilla/javascript/ScriptableObject.html#deleteProperty(org.mozilla.javascript.Scriptable, java.lang.String)">deleteProperty</A>, <A HREF="../../../org/mozilla/javascript/ScriptableObject.html#equivalentValues(java.lang.Object)">equivalentValues</A>, <A HREF="../../../org/mozilla/javascript/ScriptableObject.html#get(int, org.mozilla.javascript.Scriptable)">get</A>, <A HREF="../../../org/mozilla/javascript/ScriptableObject.html#getAllIds()">getAllIds</A>, <A HREF="../../../org/mozilla/javascript/ScriptableObject.html#getAssociatedValue(java.lang.Object)">getAssociatedValue</A>, <A HREF="../../../org/mozilla/javascript/ScriptableObject.html#getAttributes(int)">getAttributes</A>, <A HREF="../../../org/mozilla/javascript/ScriptableObject.html#getAttributes(int, org.mozilla.javascript.Scriptable)">getAttributes</A>, <A HREF="../../../org/mozilla/javascript/ScriptableObject.html#getAttributes(java.lang.String, org.mozilla.javascript.Scriptable)">getAttributes</A>, <A HREF="../../../org/mozilla/javascript/ScriptableObject.html#getClassPrototype(org.mozilla.javascript.Scriptable, java.lang.String)">getClassPrototype</A>, <A HREF="../../../org/mozilla/javascript/ScriptableObject.html#getDefaultValue(java.lang.Class)">getDefaultValue</A>, <A HREF="../../../org/mozilla/javascript/ScriptableObject.html#getDefaultValue(org.mozilla.javascript.Scriptable, java.lang.Class)">getDefaultValue</A>, <A HREF="../../../org/mozilla/javascript/ScriptableObject.html#getFunctionPrototype(org.mozilla.javascript.Scriptable)">getFunctionPrototype</A>, <A HREF="../../../org/mozilla/javascript/ScriptableObject.html#getGetterOrSetter(java.lang.String, int, boolean)">getGetterOrSetter</A>, <A HREF="../../../org/mozilla/javascript/ScriptableObject.html#getIds()">getIds</A>, <A HREF="../../../org/mozilla/javascript/ScriptableObject.html#getObjectPrototype(org.mozilla.javascript.Scriptable)">getObjectPrototype</A>, <A HREF="../../../org/mozilla/javascript/ScriptableObject.html#getParentScope()">getParentScope</A>, <A HREF="../../../org/mozilla/javascript/ScriptableObject.html#getProperty(org.mozilla.javascript.Scriptable, int)">getProperty</A>, <A HREF="../../../org/mozilla/javascript/ScriptableObject.html#getProperty(org.mozilla.javascript.Scriptable, java.lang.String)">getProperty</A>, <A HREF="../../../org/mozilla/javascript/ScriptableObject.html#getPropertyIds(org.mozilla.javascript.Scriptable)">getPropertyIds</A>, <A HREF="../../../org/mozilla/javascript/ScriptableObject.html#getPrototype()">getPrototype</A>, <A HREF="../../../org/mozilla/javascript/ScriptableObject.html#getTopLevelScope(org.mozilla.javascript.Scriptable)">getTopLevelScope</A>, <A HREF="../../../org/mozilla/javascript/ScriptableObject.html#getTopScopeValue(org.mozilla.javascript.Scriptable, java.lang.Object)">getTopScopeValue</A>, <A HREF="../../../org/mozilla/javascript/ScriptableObject.html#has(int, org.mozilla.javascript.Scriptable)">has</A>, <A HREF="../../../org/mozilla/javascript/ScriptableObject.html#hasProperty(org.mozilla.javascript.Scriptable, int)">hasProperty</A>, <A HREF="../../../org/mozilla/javascript/ScriptableObject.html#hasProperty(org.mozilla.javascript.Scriptable, java.lang.String)">hasProperty</A>, <A HREF="../../../org/mozilla/javascript/ScriptableObject.html#isConst(java.lang.String)">isConst</A>, <A HREF="../../../org/mozilla/javascript/ScriptableObject.html#isGetterOrSetter(java.lang.String, int, boolean)">isGetterOrSetter</A>, <A HREF="../../../org/mozilla/javascript/ScriptableObject.html#isSealed()">isSealed</A>, <A HREF="../../../org/mozilla/javascript/ScriptableObject.html#put(int, org.mozilla.javascript.Scriptable, java.lang.Object)">put</A>, <A HREF="../../../org/mozilla/javascript/ScriptableObject.html#putConst(java.lang.String, org.mozilla.javascript.Scriptable, java.lang.Object)">putConst</A>, <A HREF="../../../org/mozilla/javascript/ScriptableObject.html#putConstProperty(org.mozilla.javascript.Scriptable, java.lang.String, java.lang.Object)">putConstProperty</A>, <A HREF="../../../org/mozilla/javascript/ScriptableObject.html#putProperty(org.mozilla.javascript.Scriptable, int, java.lang.Object)">putProperty</A>, <A HREF="../../../org/mozilla/javascript/ScriptableObject.html#putProperty(org.mozilla.javascript.Scriptable, java.lang.String, java.lang.Object)">putProperty</A>, <A HREF="../../../org/mozilla/javascript/ScriptableObject.html#redefineProperty(org.mozilla.javascript.Scriptable, java.lang.String, boolean)">redefineProperty</A>, <A HREF="../../../org/mozilla/javascript/ScriptableObject.html#sealObject()">sealObject</A>, <A HREF="../../../org/mozilla/javascript/ScriptableObject.html#setAttributes(int, int)">setAttributes</A>, <A HREF="../../../org/mozilla/javascript/ScriptableObject.html#setAttributes(int, org.mozilla.javascript.Scriptable, int)">setAttributes</A>, <A HREF="../../../org/mozilla/javascript/ScriptableObject.html#setAttributes(java.lang.String, org.mozilla.javascript.Scriptable, int)">setAttributes</A>, <A HREF="../../../org/mozilla/javascript/ScriptableObject.html#setGetterOrSetter(java.lang.String, int, org.mozilla.javascript.Callable, boolean)">setGetterOrSetter</A>, <A HREF="../../../org/mozilla/javascript/ScriptableObject.html#setParentScope(org.mozilla.javascript.Scriptable)">setParentScope</A>, <A HREF="../../../org/mozilla/javascript/ScriptableObject.html#setPrototype(org.mozilla.javascript.Scriptable)">setPrototype</A></CODE></TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_org.mozilla.javascript.Scriptable"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from interface org.mozilla.javascript.<A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../org/mozilla/javascript/Scriptable.html#delete(int)">delete</A>, <A HREF="../../../org/mozilla/javascript/Scriptable.html#delete(java.lang.String)">delete</A>, <A HREF="../../../org/mozilla/javascript/Scriptable.html#get(int, org.mozilla.javascript.Scriptable)">get</A>, <A HREF="../../../org/mozilla/javascript/Scriptable.html#get(java.lang.String, org.mozilla.javascript.Scriptable)">get</A>, <A HREF="../../../org/mozilla/javascript/Scriptable.html#getDefaultValue(java.lang.Class)">getDefaultValue</A>, <A HREF="../../../org/mozilla/javascript/Scriptable.html#getIds()">getIds</A>, <A HREF="../../../org/mozilla/javascript/Scriptable.html#getParentScope()">getParentScope</A>, <A HREF="../../../org/mozilla/javascript/Scriptable.html#getPrototype()">getPrototype</A>, <A HREF="../../../org/mozilla/javascript/Scriptable.html#has(int, org.mozilla.javascript.Scriptable)">has</A>, <A HREF="../../../org/mozilla/javascript/Scriptable.html#has(java.lang.String, org.mozilla.javascript.Scriptable)">has</A>, <A HREF="../../../org/mozilla/javascript/Scriptable.html#put(int, org.mozilla.javascript.Scriptable, java.lang.Object)">put</A>, <A HREF="../../../org/mozilla/javascript/Scriptable.html#put(java.lang.String, org.mozilla.javascript.Scriptable, java.lang.Object)">put</A>, <A HREF="../../../org/mozilla/javascript/Scriptable.html#setParentScope(org.mozilla.javascript.Scriptable)">setParentScope</A>, <A HREF="../../../org/mozilla/javascript/Scriptable.html#setPrototype(org.mozilla.javascript.Scriptable)">setPrototype</A></CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>

<!-- ============ FIELD DETAIL =========== -->

<A NAME="field_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Field Detail</B></FONT></TH>
</TR>
</TABLE>

<A NAME="JAVA_UNSUPPORTED_TYPE"><!-- --></A><H3>
JAVA_UNSUPPORTED_TYPE</H3>
<PRE>
public static final int <B>JAVA_UNSUPPORTED_TYPE</B></PRE>
<DL>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#org.mozilla.javascript.FunctionObject.JAVA_UNSUPPORTED_TYPE">Constant Field Values</A></DL>
</DL>
<HR>

<A NAME="JAVA_STRING_TYPE"><!-- --></A><H3>
JAVA_STRING_TYPE</H3>
<PRE>
public static final int <B>JAVA_STRING_TYPE</B></PRE>
<DL>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#org.mozilla.javascript.FunctionObject.JAVA_STRING_TYPE">Constant Field Values</A></DL>
</DL>
<HR>

<A NAME="JAVA_INT_TYPE"><!-- --></A><H3>
JAVA_INT_TYPE</H3>
<PRE>
public static final int <B>JAVA_INT_TYPE</B></PRE>
<DL>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#org.mozilla.javascript.FunctionObject.JAVA_INT_TYPE">Constant Field Values</A></DL>
</DL>
<HR>

<A NAME="JAVA_BOOLEAN_TYPE"><!-- --></A><H3>
JAVA_BOOLEAN_TYPE</H3>
<PRE>
public static final int <B>JAVA_BOOLEAN_TYPE</B></PRE>
<DL>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#org.mozilla.javascript.FunctionObject.JAVA_BOOLEAN_TYPE">Constant Field Values</A></DL>
</DL>
<HR>

<A NAME="JAVA_DOUBLE_TYPE"><!-- --></A><H3>
JAVA_DOUBLE_TYPE</H3>
<PRE>
public static final int <B>JAVA_DOUBLE_TYPE</B></PRE>
<DL>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#org.mozilla.javascript.FunctionObject.JAVA_DOUBLE_TYPE">Constant Field Values</A></DL>
</DL>
<HR>

<A NAME="JAVA_SCRIPTABLE_TYPE"><!-- --></A><H3>
JAVA_SCRIPTABLE_TYPE</H3>
<PRE>
public static final int <B>JAVA_SCRIPTABLE_TYPE</B></PRE>
<DL>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#org.mozilla.javascript.FunctionObject.JAVA_SCRIPTABLE_TYPE">Constant Field Values</A></DL>
</DL>
<HR>

<A NAME="JAVA_OBJECT_TYPE"><!-- --></A><H3>
JAVA_OBJECT_TYPE</H3>
<PRE>
public static final int <B>JAVA_OBJECT_TYPE</B></PRE>
<DL>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#org.mozilla.javascript.FunctionObject.JAVA_OBJECT_TYPE">Constant Field Values</A></DL>
</DL>

<!-- ========= CONSTRUCTOR DETAIL ======== -->

<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TH>
</TR>
</TABLE>

<A NAME="FunctionObject(java.lang.String, java.lang.reflect.Member, org.mozilla.javascript.Scriptable)"><!-- --></A><H3>
FunctionObject</H3>
<PRE>
public <B>FunctionObject</B>(java.lang.String&nbsp;name,
                      java.lang.reflect.Member&nbsp;methodOrConstructor,
                      <A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A>&nbsp;scope)</PRE>
<DL>
<DD>Create a JavaScript function object from a Java method.

 <p>The <code>member</code> argument must be either a java.lang.reflect.Method
 or a java.lang.reflect.Constructor and must match one of two forms.<p>

 The first form is a member with zero or more parameters
 of the following types: Object, String, boolean, Scriptable,
 int, or double. The Long type is not supported
 because the double representation of a long (which is the
 EMCA-mandated storage type for Numbers) may lose precision.
 If the member is a Method, the return value must be void or one
 of the types allowed for parameters.<p>

 The runtime will perform appropriate conversions based
 upon the type of the parameter. A parameter type of
 Object specifies that no conversions are to be done. A parameter
 of type String will use Context.toString to convert arguments.
 Similarly, parameters of type double, boolean, and Scriptable
 will cause Context.toNumber, Context.toBoolean, and
 Context.toObject, respectively, to be called.<p>

 If the method is not static, the Java 'this' value will
 correspond to the JavaScript 'this' value. Any attempt
 to call the function with a 'this' value that is not
 of the right Java type will result in an error.<p>

 The second form is the variable arguments (or "varargs")
 form. If the FunctionObject will be used as a constructor,
 the member must have the following parameters
 <pre>
      (Context cx, Object[] args, Function ctorObj,
       boolean inNewExpr)</pre>
 and if it is a Method, be static and return an Object result.<p>

 Otherwise, if the FunctionObject will <i>not</i> be used to define a
 constructor, the member must be a static Method with parameters
      (Context cx, Scriptable thisObj, Object[] args,
       Function funObj) </pre>
 <pre>
 and an Object result.<p>

 When the function varargs form is called as part of a function call,
 the <code>args</code> parameter contains the
 arguments, with <code>thisObj</code>
 set to the JavaScript 'this' value. <code>funObj</code>
 is the function object for the invoked function.<p>

 When the constructor varargs form is called or invoked while evaluating
 a <code>new</code> expression, <code>args</code> contains the
 arguments, <code>ctorObj</code> refers to this FunctionObject, and
 <code>inNewExpr</code> is true if and only if  a <code>new</code>
 expression caused the call. This supports defining a function that
 has different behavior when called as a constructor than when
 invoked as a normal function call. (For example, the Boolean
 constructor, when called as a function,
 will convert to boolean rather than creating a new object.)<p>
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>name</CODE> - the name of the function<DD><CODE>methodOrConstructor</CODE> - a java.lang.reflect.Method or a java.lang.reflect.Constructor
                            that defines the object<DD><CODE>scope</CODE> - enclosing scope of function<DT><B>See Also:</B><DD><A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript"><CODE>Scriptable</CODE></A></DL>
</DL>

<!-- ============ METHOD DETAIL ========== -->

<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>

<A NAME="getTypeTag(java.lang.Class)"><!-- --></A><H3>
getTypeTag</H3>
<PRE>
public static int <B>getTypeTag</B>(java.lang.Class&nbsp;type)</PRE>
<DL>
<DD><DL>

<DT><B>Returns:</B><DD>One of <tt>JAVA_*_TYPE</tt> constants to indicate desired type
         or <A HREF="../../../org/mozilla/javascript/FunctionObject.html#JAVA_UNSUPPORTED_TYPE"><CODE>JAVA_UNSUPPORTED_TYPE</CODE></A> if the convertion is not
         possible</DL>
</DD>
</DL>
<HR>

<A NAME="convertArg(org.mozilla.javascript.Context, org.mozilla.javascript.Scriptable, java.lang.Object, int)"><!-- --></A><H3>
convertArg</H3>
<PRE>
public static java.lang.Object <B>convertArg</B>(<A HREF="../../../org/mozilla/javascript/Context.html" title="class in org.mozilla.javascript">Context</A>&nbsp;cx,
                                          <A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A>&nbsp;scope,
                                          java.lang.Object&nbsp;arg,
                                          int&nbsp;typeTag)</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="getArity()"><!-- --></A><H3>
getArity</H3>
<PRE>
public int <B>getArity</B>()</PRE>
<DL>
<DD>Return the value defined by  the method used to construct the object
 (number of parameters of the method, or 1 if the method is a "varargs"
 form).
<P>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE>getArity</CODE> in class <CODE>org.mozilla.javascript.BaseFunction</CODE></DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="getLength()"><!-- --></A><H3>
getLength</H3>
<PRE>
public int <B>getLength</B>()</PRE>
<DL>
<DD>Return the same value as <A HREF="../../../org/mozilla/javascript/FunctionObject.html#getArity()"><CODE>getArity()</CODE></A>.
<P>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE>getLength</CODE> in class <CODE>org.mozilla.javascript.BaseFunction</CODE></DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="getFunctionName()"><!-- --></A><H3>
getFunctionName</H3>
<PRE>
public java.lang.String <B>getFunctionName</B>()</PRE>
<DL>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE>getFunctionName</CODE> in class <CODE>org.mozilla.javascript.BaseFunction</CODE></DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="getMethodOrConstructor()"><!-- --></A><H3>
getMethodOrConstructor</H3>
<PRE>
public java.lang.reflect.Member <B>getMethodOrConstructor</B>()</PRE>
<DL>
<DD>Get Java method or constructor this function represent.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="addAsConstructor(org.mozilla.javascript.Scriptable, org.mozilla.javascript.Scriptable)"><!-- --></A><H3>
addAsConstructor</H3>
<PRE>
public void <B>addAsConstructor</B>(<A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A>&nbsp;scope,
                             <A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A>&nbsp;prototype)</PRE>
<DL>
<DD>Define this function as a JavaScript constructor.
 <p>
 Sets up the "prototype" and "constructor" properties. Also
 calls setParent and setPrototype with appropriate values.
 Then adds the function object as a property of the given scope, using
      <code>prototype.getClassName()</code>
 as the name of the property.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>scope</CODE> - the scope in which to define the constructor (typically
              the global object)<DD><CODE>prototype</CODE> - the prototype object<DT><B>See Also:</B><DD><A HREF="../../../org/mozilla/javascript/Scriptable.html#setParentScope(org.mozilla.javascript.Scriptable)"><CODE>Scriptable.setParentScope(org.mozilla.javascript.Scriptable)</CODE></A>, 
<A HREF="../../../org/mozilla/javascript/Scriptable.html#setPrototype(org.mozilla.javascript.Scriptable)"><CODE>Scriptable.setPrototype(org.mozilla.javascript.Scriptable)</CODE></A>, 
<A HREF="../../../org/mozilla/javascript/Scriptable.html#getClassName()"><CODE>Scriptable.getClassName()</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="convertArg(org.mozilla.javascript.Context, org.mozilla.javascript.Scriptable, java.lang.Object, java.lang.Class)"><!-- --></A><H3>
convertArg</H3>
<PRE>
public static java.lang.Object <B>convertArg</B>(<A HREF="../../../org/mozilla/javascript/Context.html" title="class in org.mozilla.javascript">Context</A>&nbsp;cx,
                                          <A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A>&nbsp;scope,
                                          java.lang.Object&nbsp;arg,
                                          java.lang.Class&nbsp;desired)</PRE>
<DL>
<DD><B>Deprecated.</B>&nbsp;<I>Use <A HREF="../../../org/mozilla/javascript/FunctionObject.html#getTypeTag(java.lang.Class)"><CODE>getTypeTag(Class)</CODE></A>
 and <A HREF="../../../org/mozilla/javascript/FunctionObject.html#convertArg(org.mozilla.javascript.Context, org.mozilla.javascript.Scriptable, java.lang.Object, int)"><CODE>convertArg(Context, Scriptable, Object, int)</CODE></A>
 for type convertion.</I>
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="call(org.mozilla.javascript.Context, org.mozilla.javascript.Scriptable, org.mozilla.javascript.Scriptable, java.lang.Object[])"><!-- --></A><H3>
call</H3>
<PRE>
public java.lang.Object <B>call</B>(<A HREF="../../../org/mozilla/javascript/Context.html" title="class in org.mozilla.javascript">Context</A>&nbsp;cx,
                             <A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A>&nbsp;scope,
                             <A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A>&nbsp;thisObj,
                             java.lang.Object[]&nbsp;args)</PRE>
<DL>
<DD>Performs conversions on argument types if needed and
 invokes the underlying Java method or constructor.
 <p>
 Implements Function.call.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../org/mozilla/javascript/Callable.html#call(org.mozilla.javascript.Context, org.mozilla.javascript.Scriptable, org.mozilla.javascript.Scriptable, java.lang.Object[])">call</A></CODE> in interface <CODE><A HREF="../../../org/mozilla/javascript/Callable.html" title="interface in org.mozilla.javascript">Callable</A></CODE><DT><B>Specified by:</B><DD><CODE><A HREF="../../../org/mozilla/javascript/Function.html#call(org.mozilla.javascript.Context, org.mozilla.javascript.Scriptable, org.mozilla.javascript.Scriptable, java.lang.Object[])">call</A></CODE> in interface <CODE><A HREF="../../../org/mozilla/javascript/Function.html" title="interface in org.mozilla.javascript">Function</A></CODE><DT><B>Overrides:</B><DD><CODE>call</CODE> in class <CODE>org.mozilla.javascript.BaseFunction</CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>cx</CODE> - the current Context for this thread<DD><CODE>scope</CODE> - the scope to execute the function relative to. This is
              set to the value returned by getParentScope() except
              when the function is called from a closure.<DD><CODE>thisObj</CODE> - the JavaScript <code>this</code> object<DD><CODE>args</CODE> - the array of arguments
<DT><B>Returns:</B><DD>the result of the call<DT><B>See Also:</B><DD><A HREF="../../../org/mozilla/javascript/Function.html#call(org.mozilla.javascript.Context, org.mozilla.javascript.Scriptable, org.mozilla.javascript.Scriptable, java.lang.Object[])"><CODE>Function.call(
          Context, Scriptable, Scriptable, Object[])</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="createObject(org.mozilla.javascript.Context, org.mozilla.javascript.Scriptable)"><!-- --></A><H3>
createObject</H3>
<PRE>
public <A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> <B>createObject</B>(<A HREF="../../../org/mozilla/javascript/Context.html" title="class in org.mozilla.javascript">Context</A>&nbsp;cx,
                               <A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A>&nbsp;scope)</PRE>
<DL>
<DD>Return new <A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript"><CODE>Scriptable</CODE></A> instance using the default
 constructor for the class of the underlying Java method.
 Return null to indicate that the call method should be used to create
 new objects.
<P>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE>createObject</CODE> in class <CODE>org.mozilla.javascript.BaseFunction</CODE></DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>


<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../org/mozilla/javascript/Function.html" title="interface in org.mozilla.javascript"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../org/mozilla/javascript/GeneratedClassLoader.html" title="interface in org.mozilla.javascript"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../index.html?org/mozilla/javascript/FunctionObject.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="FunctionObject.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<SCRIPT type="text/javascript">
  <!--
  if(window==top) {
    document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
  }
  //-->
</SCRIPT>
<NOSCRIPT>
  <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>


</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->

<HR>

</BODY>
</HTML>