naether 0.8.6 → 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,931 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
+ <head>
5
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
+ <title>
7
+ Class: Naether::Java::Ruby
8
+
9
+ &mdash; Documentation by YARD 0.8.2.1
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../../css/style.css" type="text/css" media="screen" charset="utf-8" />
14
+
15
+ <link rel="stylesheet" href="../../css/common.css" type="text/css" media="screen" charset="utf-8" />
16
+
17
+ <script type="text/javascript" charset="utf-8">
18
+ hasFrames = window.top.frames.main ? true : false;
19
+ relpath = '../../';
20
+ framesUrl = "../../frames.html#!" + escape(window.location.href);
21
+ </script>
22
+
23
+
24
+ <script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
25
+
26
+ <script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
27
+
28
+
29
+ </head>
30
+ <body>
31
+ <div id="header">
32
+ <div id="menu">
33
+
34
+ <a href="../../_index.html">Index (R)</a> &raquo;
35
+ <span class='title'><span class='object_link'><a href="../../Naether.html" title="Naether (class)">Naether</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Java.html" title="Naether::Java (class)">Java</a></span></span>
36
+ &raquo;
37
+ <span class="title">Ruby</span>
38
+
39
+
40
+ <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
41
+ </div>
42
+
43
+ <div id="search">
44
+
45
+ <a class="full_list_link" id="class_list_link"
46
+ href="../../class_list.html">
47
+ Class List
48
+ </a>
49
+
50
+ <a class="full_list_link" id="method_list_link"
51
+ href="../../method_list.html">
52
+ Method List
53
+ </a>
54
+
55
+ <a class="full_list_link" id="file_list_link"
56
+ href="../../file_list.html">
57
+ File List
58
+ </a>
59
+
60
+ </div>
61
+ <div class="clear"></div>
62
+ </div>
63
+
64
+ <iframe id="search_frame"></iframe>
65
+
66
+ <div id="content"><h1>Class: Naether::Java::Ruby
67
+
68
+
69
+
70
+ </h1>
71
+
72
+ <dl class="box">
73
+
74
+ <dt class="r1">Inherits:</dt>
75
+ <dd class="r1">
76
+ <span class="inheritName">Object</span>
77
+
78
+ <ul class="fullTree">
79
+ <li>Object</li>
80
+
81
+ <li class="next">Naether::Java::Ruby</li>
82
+
83
+ </ul>
84
+ <a href="#" class="inheritanceTree">show all</a>
85
+
86
+ </dd>
87
+
88
+
89
+
90
+
91
+
92
+
93
+ <dt class="r2">Includes:</dt>
94
+ <dd class="r2">Singleton</dd>
95
+
96
+
97
+
98
+
99
+
100
+ <dt class="r1 last">Defined in:</dt>
101
+ <dd class="r1 last">lib/naether/java/ruby.rb</dd>
102
+
103
+ </dl>
104
+ <div class="clear"></div>
105
+
106
+
107
+
108
+
109
+
110
+ <h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
111
+ <ul class="summary">
112
+
113
+ <li class="public ">
114
+ <span class="summary_signature">
115
+
116
+ <a href="#class_loader-instance_method" title="#class_loader (instance method)">- (Object) <strong>class_loader</strong> </a>
117
+
118
+
119
+
120
+ </span>
121
+
122
+
123
+
124
+
125
+ <span class="note title readonly">readonly</span>
126
+
127
+
128
+
129
+
130
+
131
+
132
+
133
+
134
+
135
+ <span class="summary_desc"><div class='inline'>
136
+ <p>Returns the value of attribute class_loader.</p>
137
+ </div></span>
138
+
139
+ </li>
140
+
141
+
142
+ <li class="public ">
143
+ <span class="summary_signature">
144
+
145
+ <a href="#loaded_paths-instance_method" title="#loaded_paths (instance method)">- (Object) <strong>loaded_paths</strong> </a>
146
+
147
+
148
+
149
+ </span>
150
+
151
+
152
+
153
+
154
+ <span class="note title readonly">readonly</span>
155
+
156
+
157
+
158
+
159
+
160
+
161
+
162
+
163
+
164
+ <span class="summary_desc"><div class='inline'>
165
+ <p>Returns the value of attribute loaded_paths.</p>
166
+ </div></span>
167
+
168
+ </li>
169
+
170
+
171
+ </ul>
172
+
173
+
174
+
175
+
176
+
177
+ <h2>
178
+ Instance Method Summary
179
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
180
+ </h2>
181
+
182
+ <ul class="summary">
183
+
184
+ <li class="public ">
185
+ <span class="summary_signature">
186
+
187
+ <a href="#convert_to_java_list-instance_method" title="#convert_to_java_list (instance method)">- (Object) <strong>convert_to_java_list</strong>(ruby_array) </a>
188
+
189
+
190
+
191
+ </span>
192
+
193
+
194
+
195
+
196
+
197
+
198
+
199
+
200
+
201
+ <span class="summary_desc"><div class='inline'></div></span>
202
+
203
+ </li>
204
+
205
+
206
+ <li class="public ">
207
+ <span class="summary_signature">
208
+
209
+ <a href="#convert_to_ruby_array-instance_method" title="#convert_to_ruby_array (instance method)">- (Object) <strong>convert_to_ruby_array</strong>(java_array, to_string = false) </a>
210
+
211
+
212
+
213
+ </span>
214
+
215
+
216
+
217
+
218
+
219
+
220
+
221
+
222
+
223
+ <span class="summary_desc"><div class='inline'></div></span>
224
+
225
+ </li>
226
+
227
+
228
+ <li class="public ">
229
+ <span class="summary_signature">
230
+
231
+ <a href="#convert_to_ruby_hash-instance_method" title="#convert_to_ruby_hash (instance method)">- (Object) <strong>convert_to_ruby_hash</strong>(java_hash, to_string = false) </a>
232
+
233
+
234
+
235
+ </span>
236
+
237
+
238
+
239
+
240
+
241
+
242
+
243
+
244
+
245
+ <span class="summary_desc"><div class='inline'></div></span>
246
+
247
+ </li>
248
+
249
+
250
+ <li class="public ">
251
+ <span class="summary_signature">
252
+
253
+ <a href="#create-instance_method" title="#create (instance method)">- (Object) <strong>create</strong>(target_class, *args) </a>
254
+
255
+
256
+
257
+ </span>
258
+
259
+
260
+
261
+
262
+
263
+
264
+
265
+
266
+
267
+ <span class="summary_desc"><div class='inline'></div></span>
268
+
269
+ </li>
270
+
271
+
272
+ <li class="public ">
273
+ <span class="summary_signature">
274
+
275
+ <a href="#exec_static_method-instance_method" title="#exec_static_method (instance method)">- (Object) <strong>exec_static_method</strong>(target_class, target_method, params, types = nil) </a>
276
+
277
+
278
+
279
+ </span>
280
+
281
+
282
+
283
+
284
+
285
+
286
+
287
+
288
+
289
+ <span class="summary_desc"><div class='inline'></div></span>
290
+
291
+ </li>
292
+
293
+
294
+ <li class="public ">
295
+ <span class="summary_signature">
296
+
297
+ <a href="#initialize-instance_method" title="#initialize (instance method)">- (Ruby) <strong>initialize</strong> </a>
298
+
299
+
300
+
301
+ </span>
302
+
303
+
304
+ <span class="note title constructor">constructor</span>
305
+
306
+
307
+
308
+
309
+
310
+
311
+
312
+
313
+ <span class="summary_desc"><div class='inline'>
314
+ <p>A new instance of Ruby.</p>
315
+ </div></span>
316
+
317
+ </li>
318
+
319
+
320
+ <li class="public ">
321
+ <span class="summary_signature">
322
+
323
+ <a href="#internal_load_paths-instance_method" title="#internal_load_paths (instance method)">- (Object) <strong>internal_load_paths</strong>(paths) </a>
324
+
325
+
326
+
327
+ </span>
328
+
329
+
330
+
331
+
332
+
333
+
334
+
335
+
336
+
337
+ <span class="summary_desc"><div class='inline'></div></span>
338
+
339
+ </li>
340
+
341
+
342
+ <li class="public ">
343
+ <span class="summary_signature">
344
+
345
+ <a href="#load_paths-instance_method" title="#load_paths (instance method)">- (Object) <strong>load_paths</strong>(paths) </a>
346
+
347
+
348
+
349
+ </span>
350
+
351
+
352
+
353
+
354
+
355
+
356
+
357
+
358
+
359
+ <span class="summary_desc"><div class='inline'></div></span>
360
+
361
+ </li>
362
+
363
+
364
+ </ul>
365
+
366
+
367
+
368
+ <div id="constructor_details" class="method_details_list">
369
+ <h2>Constructor Details</h2>
370
+
371
+ <div class="method_details first">
372
+ <h3 class="signature first" id="initialize-instance_method">
373
+
374
+ - (<tt><span class='object_link'><a href="" title="Naether::Java::Ruby (class)">Ruby</a></span></tt>) <strong>initialize</strong>
375
+
376
+
377
+
378
+
379
+
380
+ </h3><div class="docstring">
381
+ <div class="discussion">
382
+
383
+ <p>A new instance of Ruby</p>
384
+
385
+
386
+ </div>
387
+ </div>
388
+ <div class="tags">
389
+
390
+
391
+ </div><table class="source_code">
392
+ <tr>
393
+ <td>
394
+ <pre class="lines">
395
+
396
+
397
+ 19
398
+ 20
399
+ 21
400
+ 22
401
+ 23
402
+ 24
403
+ 25
404
+ 26
405
+ 27
406
+ 28
407
+ 29
408
+ 30
409
+ 31
410
+ 32
411
+ 33
412
+ 34
413
+ 35
414
+ 36</pre>
415
+ </td>
416
+ <td>
417
+ <pre class="code"><span class="info file"># File 'lib/naether/java/ruby.rb', line 19</span>
418
+
419
+ <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span>
420
+ <span class='id identifier rubyid_require'>require</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>rjb</span><span class='tstring_end'>'</span></span>
421
+
422
+ <span class='id identifier rubyid_naether_jar'>naether_jar</span> <span class='op'>=</span> <span class='const'>Naether</span><span class='op'>::</span><span class='const'>Configuration</span><span class='period'>.</span><span class='id identifier rubyid_naether_jar'>naether_jar</span>
423
+
424
+ <span class='comment'># Call Rjb::load with an empty classpath, incase Rjb::load has already been called
425
+ </span> <span class='id identifier rubyid_java_opts'>java_opts</span> <span class='op'>=</span> <span class='lparen'>(</span><span class='const'>ENV</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>JAVA_OPTS</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='const'>ENV</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>JAVA_OPTIONS</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='period'>.</span><span class='id identifier rubyid_split'>split</span>
426
+ <span class='const'>Rjb</span><span class='op'>::</span><span class='id identifier rubyid_load'>load</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_java_opts'>java_opts</span><span class='rparen'>)</span>
427
+
428
+ <span class='ivar'>@loaded_paths</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
429
+ <span class='id identifier rubyid_load_paths'>load_paths</span><span class='lparen'>(</span> <span class='id identifier rubyid_naether_jar'>naether_jar</span> <span class='rparen'>)</span>
430
+
431
+ <span class='id identifier rubyid_class_loader_class'>class_loader_class</span> <span class='op'>=</span> <span class='const'>Rjb</span><span class='op'>::</span><span class='id identifier rubyid_import'>import</span><span class='lparen'>(</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>com.tobedevoured.naether.PathClassLoader</span><span class='tstring_end'>&quot;</span></span> <span class='rparen'>)</span>
432
+ <span class='ivar'>@class_loader</span> <span class='op'>=</span> <span class='id identifier rubyid_class_loader_class'>class_loader_class</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='rparen'>)</span>
433
+
434
+ <span class='id identifier rubyid_internal_load_paths'>internal_load_paths</span><span class='lparen'>(</span> <span class='id identifier rubyid_naether_jar'>naether_jar</span> <span class='rparen'>)</span>
435
+
436
+ <span class='kw'>end</span></pre>
437
+ </td>
438
+ </tr>
439
+ </table>
440
+ </div>
441
+
442
+ </div>
443
+
444
+ <div id="instance_attr_details" class="attr_details">
445
+ <h2>Instance Attribute Details</h2>
446
+
447
+
448
+ <span id=""></span>
449
+ <div class="method_details first">
450
+ <h3 class="signature first" id="class_loader-instance_method">
451
+
452
+ - (<tt>Object</tt>) <strong>class_loader</strong> <span class="extras">(readonly)</span>
453
+
454
+
455
+
456
+
457
+
458
+ </h3><div class="docstring">
459
+ <div class="discussion">
460
+
461
+ <p>Returns the value of attribute class_loader</p>
462
+
463
+
464
+ </div>
465
+ </div>
466
+ <div class="tags">
467
+
468
+
469
+ </div><table class="source_code">
470
+ <tr>
471
+ <td>
472
+ <pre class="lines">
473
+
474
+
475
+ 17
476
+ 18
477
+ 19</pre>
478
+ </td>
479
+ <td>
480
+ <pre class="code"><span class="info file"># File 'lib/naether/java/ruby.rb', line 17</span>
481
+
482
+ <span class='kw'>def</span> <span class='id identifier rubyid_class_loader'>class_loader</span>
483
+ <span class='ivar'>@class_loader</span>
484
+ <span class='kw'>end</span></pre>
485
+ </td>
486
+ </tr>
487
+ </table>
488
+ </div>
489
+
490
+
491
+ <span id=""></span>
492
+ <div class="method_details ">
493
+ <h3 class="signature " id="loaded_paths-instance_method">
494
+
495
+ - (<tt>Object</tt>) <strong>loaded_paths</strong> <span class="extras">(readonly)</span>
496
+
497
+
498
+
499
+
500
+
501
+ </h3><div class="docstring">
502
+ <div class="discussion">
503
+
504
+ <p>Returns the value of attribute loaded_paths</p>
505
+
506
+
507
+ </div>
508
+ </div>
509
+ <div class="tags">
510
+
511
+
512
+ </div><table class="source_code">
513
+ <tr>
514
+ <td>
515
+ <pre class="lines">
516
+
517
+
518
+ 17
519
+ 18
520
+ 19</pre>
521
+ </td>
522
+ <td>
523
+ <pre class="code"><span class="info file"># File 'lib/naether/java/ruby.rb', line 17</span>
524
+
525
+ <span class='kw'>def</span> <span class='id identifier rubyid_loaded_paths'>loaded_paths</span>
526
+ <span class='ivar'>@loaded_paths</span>
527
+ <span class='kw'>end</span></pre>
528
+ </td>
529
+ </tr>
530
+ </table>
531
+ </div>
532
+
533
+ </div>
534
+
535
+
536
+ <div id="instance_method_details" class="method_details_list">
537
+ <h2>Instance Method Details</h2>
538
+
539
+
540
+ <div class="method_details first">
541
+ <h3 class="signature first" id="convert_to_java_list-instance_method">
542
+
543
+ - (<tt>Object</tt>) <strong>convert_to_java_list</strong>(ruby_array)
544
+
545
+
546
+
547
+
548
+
549
+ </h3><table class="source_code">
550
+ <tr>
551
+ <td>
552
+ <pre class="lines">
553
+
554
+
555
+ 111
556
+ 112
557
+ 113
558
+ 114
559
+ 115
560
+ 116
561
+ 117
562
+ 118</pre>
563
+ </td>
564
+ <td>
565
+ <pre class="code"><span class="info file"># File 'lib/naether/java/ruby.rb', line 111</span>
566
+
567
+ <span class='kw'>def</span> <span class='id identifier rubyid_convert_to_java_list'>convert_to_java_list</span><span class='lparen'>(</span> <span class='id identifier rubyid_ruby_array'>ruby_array</span> <span class='rparen'>)</span>
568
+ <span class='id identifier rubyid_list'>list</span> <span class='op'>=</span> <span class='const'>Rjb</span><span class='op'>::</span><span class='id identifier rubyid_import'>import</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>java.util.ArrayList</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
569
+ <span class='id identifier rubyid_ruby_array'>ruby_array</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_item'>item</span><span class='op'>|</span>
570
+ <span class='id identifier rubyid_list'>list</span><span class='period'>.</span><span class='id identifier rubyid_add'>add</span><span class='lparen'>(</span> <span class='id identifier rubyid_item'>item</span> <span class='rparen'>)</span>
571
+ <span class='kw'>end</span>
572
+
573
+ <span class='id identifier rubyid_list'>list</span>
574
+ <span class='kw'>end</span></pre>
575
+ </td>
576
+ </tr>
577
+ </table>
578
+ </div>
579
+
580
+ <div class="method_details ">
581
+ <h3 class="signature " id="convert_to_ruby_array-instance_method">
582
+
583
+ - (<tt>Object</tt>) <strong>convert_to_ruby_array</strong>(java_array, to_string = false)
584
+
585
+
586
+
587
+
588
+
589
+ </h3><table class="source_code">
590
+ <tr>
591
+ <td>
592
+ <pre class="lines">
593
+
594
+
595
+ 120
596
+ 121
597
+ 122
598
+ 123
599
+ 124
600
+ 125
601
+ 126
602
+ 127
603
+ 128</pre>
604
+ </td>
605
+ <td>
606
+ <pre class="code"><span class="info file"># File 'lib/naether/java/ruby.rb', line 120</span>
607
+
608
+ <span class='kw'>def</span> <span class='id identifier rubyid_convert_to_ruby_array'>convert_to_ruby_array</span><span class='lparen'>(</span> <span class='id identifier rubyid_java_array'>java_array</span><span class='comma'>,</span> <span class='id identifier rubyid_to_string'>to_string</span> <span class='op'>=</span> <span class='kw'>false</span> <span class='rparen'>)</span>
609
+ <span class='id identifier rubyid_ruby_array'>ruby_array</span> <span class='op'>=</span> <span class='id identifier rubyid_java_array'>java_array</span><span class='period'>.</span><span class='id identifier rubyid_toArray'>toArray</span><span class='lparen'>(</span><span class='rparen'>)</span>
610
+
611
+ <span class='kw'>if</span> <span class='id identifier rubyid_to_string'>to_string</span>
612
+ <span class='id identifier rubyid_ruby_array'>ruby_array</span> <span class='op'>=</span> <span class='id identifier rubyid_ruby_array'>ruby_array</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_x'>x</span><span class='op'>|</span> <span class='id identifier rubyid_x'>x</span><span class='period'>.</span><span class='id identifier rubyid_toString'>toString</span><span class='lparen'>(</span><span class='rparen'>)</span><span class='rbrace'>}</span>
613
+ <span class='kw'>end</span>
614
+
615
+ <span class='id identifier rubyid_ruby_array'>ruby_array</span>
616
+ <span class='kw'>end</span></pre>
617
+ </td>
618
+ </tr>
619
+ </table>
620
+ </div>
621
+
622
+ <div class="method_details ">
623
+ <h3 class="signature " id="convert_to_ruby_hash-instance_method">
624
+
625
+ - (<tt>Object</tt>) <strong>convert_to_ruby_hash</strong>(java_hash, to_string = false)
626
+
627
+
628
+
629
+
630
+
631
+ </h3><table class="source_code">
632
+ <tr>
633
+ <td>
634
+ <pre class="lines">
635
+
636
+
637
+ 130
638
+ 131
639
+ 132
640
+ 133
641
+ 134
642
+ 135
643
+ 136
644
+ 137
645
+ 138
646
+ 139
647
+ 140
648
+ 141
649
+ 142
650
+ 143
651
+ 144
652
+ 145
653
+ 146
654
+ 147
655
+ 148
656
+ 149</pre>
657
+ </td>
658
+ <td>
659
+ <pre class="code"><span class="info file"># File 'lib/naether/java/ruby.rb', line 130</span>
660
+
661
+ <span class='kw'>def</span> <span class='id identifier rubyid_convert_to_ruby_hash'>convert_to_ruby_hash</span><span class='lparen'>(</span> <span class='id identifier rubyid_java_hash'>java_hash</span><span class='comma'>,</span> <span class='id identifier rubyid_to_string'>to_string</span> <span class='op'>=</span> <span class='kw'>false</span> <span class='rparen'>)</span>
662
+
663
+ <span class='id identifier rubyid_hash'>hash</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
664
+ <span class='id identifier rubyid_keys'>keys</span> <span class='op'>=</span> <span class='id identifier rubyid_java_hash'>java_hash</span><span class='period'>.</span><span class='id identifier rubyid_keySet'>keySet</span><span class='lparen'>(</span><span class='rparen'>)</span>
665
+ <span class='id identifier rubyid_iterator'>iterator</span> <span class='op'>=</span> <span class='id identifier rubyid_keys'>keys</span><span class='period'>.</span><span class='id identifier rubyid_iterator'>iterator</span><span class='lparen'>(</span><span class='rparen'>)</span>
666
+ <span class='kw'>if</span> <span class='id identifier rubyid_to_string'>to_string</span>
667
+ <span class='kw'>while</span> <span class='id identifier rubyid_iterator'>iterator</span><span class='period'>.</span><span class='id identifier rubyid_hasNext'>hasNext</span><span class='lparen'>(</span><span class='rparen'>)</span>
668
+ <span class='id identifier rubyid_key'>key</span> <span class='op'>=</span> <span class='id identifier rubyid_iterator'>iterator</span><span class='period'>.</span><span class='id identifier rubyid_next'>next</span><span class='lparen'>(</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_toString'>toString</span><span class='lparen'>(</span><span class='rparen'>)</span>
669
+ <span class='id identifier rubyid_hash'>hash</span><span class='lbracket'>[</span><span class='id identifier rubyid_key'>key</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_java_hash'>java_hash</span><span class='period'>.</span><span class='id identifier rubyid_get'>get</span><span class='lparen'>(</span> <span class='id identifier rubyid_key'>key</span> <span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_toString'>toString</span><span class='lparen'>(</span><span class='rparen'>)</span>
670
+ <span class='kw'>end</span>
671
+ <span class='kw'>else</span>
672
+ <span class='kw'>while</span> <span class='id identifier rubyid_iterator'>iterator</span><span class='period'>.</span><span class='id identifier rubyid_hasNext'>hasNext</span><span class='lparen'>(</span><span class='rparen'>)</span>
673
+ <span class='id identifier rubyid_key'>key</span> <span class='op'>=</span> <span class='id identifier rubyid_iterator'>iterator</span><span class='period'>.</span><span class='id identifier rubyid_next'>next</span><span class='lparen'>(</span><span class='rparen'>)</span>
674
+ <span class='id identifier rubyid_hash'>hash</span><span class='lbracket'>[</span><span class='id identifier rubyid_key'>key</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_java_hash'>java_hash</span><span class='period'>.</span><span class='id identifier rubyid_get'>get</span><span class='lparen'>(</span> <span class='id identifier rubyid_key'>key</span> <span class='rparen'>)</span>
675
+ <span class='kw'>end</span>
676
+ <span class='kw'>end</span>
677
+
678
+ <span class='id identifier rubyid_hash'>hash</span>
679
+
680
+ <span class='kw'>end</span></pre>
681
+ </td>
682
+ </tr>
683
+ </table>
684
+ </div>
685
+
686
+ <div class="method_details ">
687
+ <h3 class="signature " id="create-instance_method">
688
+
689
+ - (<tt>Object</tt>) <strong>create</strong>(target_class, *args)
690
+
691
+
692
+
693
+
694
+
695
+ </h3><table class="source_code">
696
+ <tr>
697
+ <td>
698
+ <pre class="lines">
699
+
700
+
701
+ 38
702
+ 39
703
+ 40
704
+ 41
705
+ 42
706
+ 43
707
+ 44
708
+ 45</pre>
709
+ </td>
710
+ <td>
711
+ <pre class="code"><span class="info file"># File 'lib/naether/java/ruby.rb', line 38</span>
712
+
713
+ <span class='kw'>def</span> <span class='id identifier rubyid_create'>create</span><span class='lparen'>(</span> <span class='id identifier rubyid_target_class'>target_class</span><span class='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_args'>args</span> <span class='rparen'>)</span>
714
+ <span class='comment'>#@class_loader.newInstance(target_class, *args )
715
+ </span> <span class='kw'>if</span> <span class='id identifier rubyid_args'>args</span><span class='period'>.</span><span class='id identifier rubyid_size'>size</span> <span class='op'>&gt;</span> <span class='int'>0</span>
716
+ <span class='ivar'>@class_loader</span><span class='period'>.</span><span class='id identifier rubyid__invoke'>_invoke</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>newInstance</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Ljava.lang.String;[Ljava.lang.Object;</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='id identifier rubyid_target_class'>target_class</span><span class='comma'>,</span> <span class='id identifier rubyid_args'>args</span> <span class='rparen'>)</span>
717
+ <span class='kw'>else</span>
718
+ <span class='ivar'>@class_loader</span><span class='period'>.</span><span class='id identifier rubyid__invoke'>_invoke</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>newInstance</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Ljava.lang.String;</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='id identifier rubyid_target_class'>target_class</span> <span class='rparen'>)</span>
719
+ <span class='kw'>end</span>
720
+ <span class='kw'>end</span></pre>
721
+ </td>
722
+ </tr>
723
+ </table>
724
+ </div>
725
+
726
+ <div class="method_details ">
727
+ <h3 class="signature " id="exec_static_method-instance_method">
728
+
729
+ - (<tt>Object</tt>) <strong>exec_static_method</strong>(target_class, target_method, params, types = nil)
730
+
731
+
732
+
733
+
734
+
735
+ </h3><table class="source_code">
736
+ <tr>
737
+ <td>
738
+ <pre class="lines">
739
+
740
+
741
+ 47
742
+ 48
743
+ 49
744
+ 50
745
+ 51
746
+ 52
747
+ 53
748
+ 54
749
+ 55
750
+ 56
751
+ 57
752
+ 58
753
+ 59
754
+ 60
755
+ 61
756
+ 62
757
+ 63
758
+ 64
759
+ 65
760
+ 66
761
+ 67
762
+ 68
763
+ 69
764
+ 70
765
+ 71
766
+ 72
767
+ 73
768
+ 74</pre>
769
+ </td>
770
+ <td>
771
+ <pre class="code"><span class="info file"># File 'lib/naether/java/ruby.rb', line 47</span>
772
+
773
+ <span class='kw'>def</span> <span class='id identifier rubyid_exec_static_method'>exec_static_method</span><span class='lparen'>(</span> <span class='id identifier rubyid_target_class'>target_class</span><span class='comma'>,</span> <span class='id identifier rubyid_target_method'>target_method</span><span class='comma'>,</span> <span class='id identifier rubyid_params'>params</span><span class='comma'>,</span> <span class='id identifier rubyid_types'>types</span> <span class='op'>=</span> <span class='kw'>nil</span> <span class='rparen'>)</span>
774
+ <span class='kw'>unless</span> <span class='id identifier rubyid_params'>params</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span> <span class='const'>Array</span>
775
+ <span class='id identifier rubyid_params'>params</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='id identifier rubyid_params'>params</span><span class='rbracket'>]</span>
776
+ <span class='kw'>end</span>
777
+
778
+ <span class='kw'>if</span> <span class='id identifier rubyid_types'>types</span>
779
+ <span class='kw'>unless</span> <span class='id identifier rubyid_types'>types</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span> <span class='const'>Array</span>
780
+ <span class='id identifier rubyid_types'>types</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='id identifier rubyid_types'>types</span><span class='rbracket'>]</span>
781
+ <span class='kw'>end</span>
782
+ <span class='kw'>end</span>
783
+ <span class='id identifier rubyid_result'>result</span> <span class='op'>=</span> <span class='kw'>nil</span>
784
+ <span class='kw'>if</span> <span class='id identifier rubyid_params'>params</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
785
+ <span class='id identifier rubyid_result'>result</span> <span class='op'>=</span> <span class='ivar'>@class_loader</span><span class='period'>.</span><span class='id identifier rubyid__invoke'>_invoke</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>execStaticMethod</span><span class='tstring_end'>'</span></span><span class='comma'>,</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Ljava.lang.String;Ljava.lang.String;</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='id identifier rubyid_target_class'>target_class</span><span class='comma'>,</span> <span class='id identifier rubyid_target_method'>target_method</span> <span class='rparen'>)</span>
786
+ <span class='kw'>elsif</span> <span class='id identifier rubyid_types'>types</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
787
+ <span class='id identifier rubyid_result'>result</span> <span class='op'>=</span> <span class='ivar'>@class_loader</span><span class='period'>.</span><span class='id identifier rubyid__invoke'>_invoke</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>execStaticMethod</span><span class='tstring_end'>'</span></span><span class='comma'>,</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Ljava.lang.String;Ljava.lang.String;Ljava.util.List;</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='id identifier rubyid_target_class'>target_class</span><span class='comma'>,</span> <span class='id identifier rubyid_target_method'>target_method</span><span class='comma'>,</span> <span class='id identifier rubyid_convert_to_java_list'>convert_to_java_list</span><span class='lparen'>(</span><span class='id identifier rubyid_params'>params</span><span class='rparen'>)</span> <span class='rparen'>)</span>
788
+ <span class='kw'>else</span>
789
+ <span class='id identifier rubyid_result'>result</span> <span class='op'>=</span> <span class='ivar'>@class_loader</span><span class='period'>.</span><span class='id identifier rubyid__invoke'>_invoke</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>execStaticMethod</span><span class='tstring_end'>'</span></span><span class='comma'>,</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Ljava.lang.String;Ljava.lang.String;Ljava.util.List;Ljava.util.List;</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='id identifier rubyid_target_class'>target_class</span><span class='comma'>,</span> <span class='id identifier rubyid_target_method'>target_method</span><span class='comma'>,</span> <span class='id identifier rubyid_convert_to_java_list'>convert_to_java_list</span><span class='lparen'>(</span><span class='id identifier rubyid_params'>params</span><span class='rparen'>)</span><span class='comma'>,</span> <span class='id identifier rubyid_convert_to_java_list'>convert_to_java_list</span><span class='lparen'>(</span><span class='id identifier rubyid_types'>types</span><span class='rparen'>)</span> <span class='rparen'>)</span>
790
+ <span class='kw'>end</span>
791
+
792
+ <span class='kw'>unless</span> <span class='id identifier rubyid_result'>result</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
793
+ <span class='comment'># Force toString on java.lang.String otherwise the result will be a Rjb::Proxy
794
+ </span> <span class='kw'>if</span> <span class='id identifier rubyid_result'>result</span><span class='period'>.</span><span class='id identifier rubyid_getClass'>getClass</span><span class='lparen'>(</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_getName'>getName</span><span class='lparen'>(</span><span class='rparen'>)</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>java.lang.String</span><span class='tstring_end'>'</span></span>
795
+ <span class='id identifier rubyid_result'>result</span><span class='period'>.</span><span class='id identifier rubyid_toString'>toString</span><span class='lparen'>(</span><span class='rparen'>)</span>
796
+ <span class='kw'>else</span>
797
+ <span class='id identifier rubyid_result'>result</span>
798
+ <span class='kw'>end</span>
799
+ <span class='kw'>end</span>
800
+ <span class='kw'>end</span></pre>
801
+ </td>
802
+ </tr>
803
+ </table>
804
+ </div>
805
+
806
+ <div class="method_details ">
807
+ <h3 class="signature " id="internal_load_paths-instance_method">
808
+
809
+ - (<tt>Object</tt>) <strong>internal_load_paths</strong>(paths)
810
+
811
+
812
+
813
+
814
+
815
+ </h3><table class="source_code">
816
+ <tr>
817
+ <td>
818
+ <pre class="lines">
819
+
820
+
821
+ 76
822
+ 77
823
+ 78
824
+ 79
825
+ 80
826
+ 81
827
+ 82
828
+ 83
829
+ 84
830
+ 85
831
+ 86
832
+ 87
833
+ 88
834
+ 89
835
+ 90
836
+ 91</pre>
837
+ </td>
838
+ <td>
839
+ <pre class="code"><span class="info file"># File 'lib/naether/java/ruby.rb', line 76</span>
840
+
841
+ <span class='kw'>def</span> <span class='id identifier rubyid_internal_load_paths'>internal_load_paths</span><span class='lparen'>(</span><span class='id identifier rubyid_paths'>paths</span><span class='rparen'>)</span>
842
+ <span class='id identifier rubyid_loadable_paths'>loadable_paths</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
843
+ <span class='kw'>unless</span> <span class='id identifier rubyid_paths'>paths</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span> <span class='const'>Array</span>
844
+ <span class='id identifier rubyid_paths'>paths</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='id identifier rubyid_paths'>paths</span><span class='rbracket'>]</span>
845
+ <span class='kw'>end</span>
846
+
847
+ <span class='id identifier rubyid_paths'>paths</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_path'>path</span><span class='op'>|</span>
848
+ <span class='id identifier rubyid_expanded_path'>expanded_path</span> <span class='op'>=</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_expand_path'>expand_path</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='rparen'>)</span>
849
+ <span class='kw'>if</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_exists?'>exists?</span><span class='lparen'>(</span> <span class='id identifier rubyid_expanded_path'>expanded_path</span> <span class='rparen'>)</span>
850
+ <span class='ivar'>@class_loader</span><span class='period'>.</span><span class='id identifier rubyid_addPath'>addPath</span><span class='lparen'>(</span> <span class='id identifier rubyid_path'>path</span> <span class='rparen'>)</span>
851
+ <span class='id identifier rubyid_loadable_paths'>loadable_paths</span> <span class='op'>&lt;&lt;</span> <span class='id identifier rubyid_expanded_path'>expanded_path</span>
852
+ <span class='kw'>end</span>
853
+ <span class='kw'>end</span>
854
+
855
+ <span class='id identifier rubyid_loadable_paths'>loadable_paths</span>
856
+ <span class='kw'>end</span></pre>
857
+ </td>
858
+ </tr>
859
+ </table>
860
+ </div>
861
+
862
+ <div class="method_details ">
863
+ <h3 class="signature " id="load_paths-instance_method">
864
+
865
+ - (<tt>Object</tt>) <strong>load_paths</strong>(paths)
866
+
867
+
868
+
869
+
870
+
871
+ </h3><table class="source_code">
872
+ <tr>
873
+ <td>
874
+ <pre class="lines">
875
+
876
+
877
+ 93
878
+ 94
879
+ 95
880
+ 96
881
+ 97
882
+ 98
883
+ 99
884
+ 100
885
+ 101
886
+ 102
887
+ 103
888
+ 104
889
+ 105
890
+ 106
891
+ 107
892
+ 108
893
+ 109</pre>
894
+ </td>
895
+ <td>
896
+ <pre class="code"><span class="info file"># File 'lib/naether/java/ruby.rb', line 93</span>
897
+
898
+ <span class='kw'>def</span> <span class='id identifier rubyid_load_paths'>load_paths</span><span class='lparen'>(</span><span class='id identifier rubyid_paths'>paths</span><span class='rparen'>)</span>
899
+ <span class='id identifier rubyid_loadable_paths'>loadable_paths</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
900
+ <span class='kw'>unless</span> <span class='id identifier rubyid_paths'>paths</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span> <span class='const'>Array</span>
901
+ <span class='id identifier rubyid_paths'>paths</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='id identifier rubyid_paths'>paths</span><span class='rbracket'>]</span>
902
+ <span class='kw'>end</span>
903
+
904
+ <span class='id identifier rubyid_paths'>paths</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_path'>path</span><span class='op'>|</span>
905
+ <span class='id identifier rubyid_expanded_path'>expanded_path</span> <span class='op'>=</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_expand_path'>expand_path</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='rparen'>)</span>
906
+ <span class='kw'>if</span> <span class='op'>!</span><span class='ivar'>@loaded_paths</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='id identifier rubyid_expanded_path'>expanded_path</span><span class='rparen'>)</span> <span class='op'>&amp;&amp;</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_exists?'>exists?</span><span class='lparen'>(</span> <span class='id identifier rubyid_expanded_path'>expanded_path</span> <span class='rparen'>)</span>
907
+ <span class='ivar'>@loaded_paths</span> <span class='op'>&lt;&lt;</span> <span class='id identifier rubyid_expanded_path'>expanded_path</span>
908
+ <span class='const'>Rjb</span><span class='op'>::</span><span class='id identifier rubyid_add_jar'>add_jar</span><span class='lparen'>(</span> <span class='id identifier rubyid_expanded_path'>expanded_path</span> <span class='rparen'>)</span>
909
+ <span class='id identifier rubyid_loadable_paths'>loadable_paths</span> <span class='op'>&lt;&lt;</span> <span class='id identifier rubyid_expanded_path'>expanded_path</span>
910
+ <span class='kw'>end</span>
911
+ <span class='kw'>end</span>
912
+
913
+ <span class='id identifier rubyid_loadable_paths'>loadable_paths</span>
914
+ <span class='kw'>end</span></pre>
915
+ </td>
916
+ </tr>
917
+ </table>
918
+ </div>
919
+
920
+ </div>
921
+
922
+ </div>
923
+
924
+ <div id="footer">
925
+ Generated on Wed Sep 12 14:18:13 2012 by
926
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
927
+ 0.8.2.1 (ruby-1.9.3).
928
+ </div>
929
+
930
+ </body>
931
+ </html>