naether 0.13.8-java → 0.14.0-java

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,1208 +0,0 @@
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::JRuby
8
-
9
- &mdash; Documentation by YARD 0.8.7.2
10
-
11
- </title>
12
-
13
- <link rel="stylesheet" href="../../css/style.css" type="text/css" charset="utf-8" />
14
-
15
- <link rel="stylesheet" href="../../css/common.css" type="text/css" 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 (J)</a> &raquo;
35
- <span class='title'><span class='object_link'><a href="../../Naether.html" title="Naether (module)">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">JRuby</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::JRuby
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::JRuby</li>
82
-
83
- </ul>
84
- <a href="#" class="inheritanceTree">show all</a>
85
-
86
- </dd>
87
-
88
-
89
-
90
-
91
-
92
-
93
-
94
-
95
-
96
- <dt class="r2 last">Defined in:</dt>
97
- <dd class="r2 last">lib/naether/java/jruby.rb</dd>
98
-
99
- </dl>
100
- <div class="clear"></div>
101
-
102
-
103
-
104
-
105
-
106
- <h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
107
- <ul class="summary">
108
-
109
- <li class="public ">
110
- <span class="summary_signature">
111
-
112
- <a href="#class_loader-instance_method" title="#class_loader (instance method)">- (Object) <strong>class_loader</strong> </a>
113
-
114
-
115
-
116
- </span>
117
-
118
-
119
-
120
-
121
- <span class="note title readonly">readonly</span>
122
-
123
-
124
-
125
-
126
-
127
-
128
-
129
-
130
-
131
- <span class="summary_desc"><div class='inline'>
132
- <p>Returns the value of attribute class_loader.</p>
133
- </div></span>
134
-
135
- </li>
136
-
137
-
138
- <li class="public ">
139
- <span class="summary_signature">
140
-
141
- <a href="#loaded_paths-instance_method" title="#loaded_paths (instance method)">- (Object) <strong>loaded_paths</strong> </a>
142
-
143
-
144
-
145
- </span>
146
-
147
-
148
-
149
-
150
- <span class="note title readonly">readonly</span>
151
-
152
-
153
-
154
-
155
-
156
-
157
-
158
-
159
-
160
- <span class="summary_desc"><div class='inline'>
161
- <p>Returns the value of attribute loaded_paths.</p>
162
- </div></span>
163
-
164
- </li>
165
-
166
-
167
- </ul>
168
-
169
-
170
-
171
-
172
-
173
- <h2>
174
- Instance Method Summary
175
- <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
176
- </h2>
177
-
178
- <ul class="summary">
179
-
180
- <li class="public ">
181
- <span class="summary_signature">
182
-
183
- <a href="#convert_to_java_list-instance_method" title="#convert_to_java_list (instance method)">- (java.util.ArrayList) <strong>convert_to_java_list</strong>(ruby_array) </a>
184
-
185
-
186
-
187
- </span>
188
-
189
-
190
-
191
-
192
-
193
-
194
-
195
-
196
-
197
- <span class="summary_desc"><div class='inline'>
198
- <p>Convert a Ruby Array to a java.util.ArrayList.</p>
199
- </div></span>
200
-
201
- </li>
202
-
203
-
204
- <li class="public ">
205
- <span class="summary_signature">
206
-
207
- <a href="#convert_to_ruby_array-instance_method" title="#convert_to_ruby_array (instance method)">- (Array) <strong>convert_to_ruby_array</strong>(java_array, to_string = false) </a>
208
-
209
-
210
-
211
- </span>
212
-
213
-
214
-
215
-
216
-
217
-
218
-
219
-
220
-
221
- <span class="summary_desc"><div class='inline'>
222
- <p>Convert a java,util.List to a Ruby Array.</p>
223
- </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)">- (Hash) <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'>
246
- <p>Convert a java.util.Map to a Ruby Hash.</p>
247
- </div></span>
248
-
249
- </li>
250
-
251
-
252
- <li class="public ">
253
- <span class="summary_signature">
254
-
255
- <a href="#create-instance_method" title="#create (instance method)">- (Object) <strong>create</strong>(target_class, *args) </a>
256
-
257
-
258
-
259
- </span>
260
-
261
-
262
-
263
-
264
-
265
-
266
-
267
-
268
-
269
- <span class="summary_desc"><div class='inline'>
270
- <p>Create a Java Object from the Naether Class Loader.</p>
271
- </div></span>
272
-
273
- </li>
274
-
275
-
276
- <li class="public ">
277
- <span class="summary_signature">
278
-
279
- <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>
280
-
281
-
282
-
283
- </span>
284
-
285
-
286
-
287
-
288
-
289
-
290
-
291
-
292
-
293
- <span class="summary_desc"><div class='inline'>
294
- <p>Execute a Staic method on a Java class from the Naether Class Loader.</p>
295
- </div></span>
296
-
297
- </li>
298
-
299
-
300
- <li class="public ">
301
- <span class="summary_signature">
302
-
303
- <a href="#initialize-instance_method" title="#initialize (instance method)">- (JRuby) <strong>initialize</strong> </a>
304
-
305
-
306
-
307
- </span>
308
-
309
-
310
- <span class="note title constructor">constructor</span>
311
-
312
-
313
-
314
-
315
-
316
-
317
-
318
-
319
- <span class="summary_desc"><div class='inline'>
320
- <p>Creates new instance by loading the Naether jar to the parent ClassLoader
321
- and creating the internal Naether ClassLoader.</p>
322
- </div></span>
323
-
324
- </li>
325
-
326
-
327
- <li class="public ">
328
- <span class="summary_signature">
329
-
330
- <a href="#internal_load_paths-instance_method" title="#internal_load_paths (instance method)">- (Object) <strong>internal_load_paths</strong>(paths) </a>
331
-
332
-
333
-
334
- </span>
335
-
336
-
337
-
338
-
339
-
340
-
341
-
342
-
343
-
344
- <span class="summary_desc"><div class='inline'>
345
- <p>Load a path into the internal Naether ClassLoader.</p>
346
- </div></span>
347
-
348
- </li>
349
-
350
-
351
- <li class="public ">
352
- <span class="summary_signature">
353
-
354
- <a href="#load_paths-instance_method" title="#load_paths (instance method)">- (Object) <strong>load_paths</strong>(paths) </a>
355
-
356
-
357
-
358
- </span>
359
-
360
-
361
-
362
-
363
-
364
-
365
-
366
-
367
-
368
- <span class="summary_desc"><div class='inline'>
369
- <p>Load a path onto the parent ClassLoader.</p>
370
- </div></span>
371
-
372
- </li>
373
-
374
-
375
- </ul>
376
-
377
-
378
- <div id="constructor_details" class="method_details_list">
379
- <h2>Constructor Details</h2>
380
-
381
- <div class="method_details first">
382
- <h3 class="signature first" id="initialize-instance_method">
383
-
384
- - (<tt><span class='object_link'><a href="" title="Naether::Java::JRuby (class)">JRuby</a></span></tt>) <strong>initialize</strong>
385
-
386
-
387
-
388
-
389
-
390
- </h3><div class="docstring">
391
- <div class="discussion">
392
-
393
- <p>Creates new instance by loading the Naether jar to the parent ClassLoader
394
- and creating the internal Naether ClassLoader</p>
395
-
396
-
397
- </div>
398
- </div>
399
- <div class="tags">
400
-
401
-
402
- </div><table class="source_code">
403
- <tr>
404
- <td>
405
- <pre class="lines">
406
-
407
-
408
- 20
409
- 21
410
- 22
411
- 23
412
- 24
413
- 25
414
- 26
415
- 27
416
- 28
417
- 29
418
- 30</pre>
419
- </td>
420
- <td>
421
- <pre class="code"><span class="info file"># File 'lib/naether/java/jruby.rb', line 20</span>
422
-
423
- <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span>
424
- <span class='id identifier rubyid_require'>require</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>java</span><span class='tstring_end'>'</span></span>
425
-
426
- <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>
427
-
428
- <span class='ivar'>@loaded_paths</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
429
-
430
- <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>
431
- <span class='ivar'>@class_loader</span> <span class='op'>=</span> <span class='id identifier rubyid_com'>com</span><span class='period'>.</span><span class='id identifier rubyid_tobedevoured'>tobedevoured</span><span class='period'>.</span><span class='id identifier rubyid_naether'>naether</span><span class='period'>.</span><span class='const'>PathClassLoader</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='rparen'>)</span>
432
- <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>
433
- <span class='kw'>end</span></pre>
434
- </td>
435
- </tr>
436
- </table>
437
- </div>
438
-
439
- </div>
440
-
441
- <div id="instance_attr_details" class="attr_details">
442
- <h2>Instance Attribute Details</h2>
443
-
444
-
445
- <span id=""></span>
446
- <div class="method_details first">
447
- <h3 class="signature first" id="class_loader-instance_method">
448
-
449
- - (<tt>Object</tt>) <strong>class_loader</strong> <span class="extras">(readonly)</span>
450
-
451
-
452
-
453
-
454
-
455
- </h3><div class="docstring">
456
- <div class="discussion">
457
-
458
- <p>Returns the value of attribute class_loader</p>
459
-
460
-
461
- </div>
462
- </div>
463
- <div class="tags">
464
-
465
-
466
- </div><table class="source_code">
467
- <tr>
468
- <td>
469
- <pre class="lines">
470
-
471
-
472
- 14
473
- 15
474
- 16</pre>
475
- </td>
476
- <td>
477
- <pre class="code"><span class="info file"># File 'lib/naether/java/jruby.rb', line 14</span>
478
-
479
- <span class='kw'>def</span> <span class='id identifier rubyid_class_loader'>class_loader</span>
480
- <span class='ivar'>@class_loader</span>
481
- <span class='kw'>end</span></pre>
482
- </td>
483
- </tr>
484
- </table>
485
- </div>
486
-
487
-
488
- <span id=""></span>
489
- <div class="method_details ">
490
- <h3 class="signature " id="loaded_paths-instance_method">
491
-
492
- - (<tt>Object</tt>) <strong>loaded_paths</strong> <span class="extras">(readonly)</span>
493
-
494
-
495
-
496
-
497
-
498
- </h3><div class="docstring">
499
- <div class="discussion">
500
-
501
- <p>Returns the value of attribute loaded_paths</p>
502
-
503
-
504
- </div>
505
- </div>
506
- <div class="tags">
507
-
508
-
509
- </div><table class="source_code">
510
- <tr>
511
- <td>
512
- <pre class="lines">
513
-
514
-
515
- 14
516
- 15
517
- 16</pre>
518
- </td>
519
- <td>
520
- <pre class="code"><span class="info file"># File 'lib/naether/java/jruby.rb', line 14</span>
521
-
522
- <span class='kw'>def</span> <span class='id identifier rubyid_loaded_paths'>loaded_paths</span>
523
- <span class='ivar'>@loaded_paths</span>
524
- <span class='kw'>end</span></pre>
525
- </td>
526
- </tr>
527
- </table>
528
- </div>
529
-
530
- </div>
531
-
532
-
533
- <div id="instance_method_details" class="method_details_list">
534
- <h2>Instance Method Details</h2>
535
-
536
-
537
- <div class="method_details first">
538
- <h3 class="signature first" id="convert_to_java_list-instance_method">
539
-
540
- - (<tt>java.util.ArrayList</tt>) <strong>convert_to_java_list</strong>(ruby_array)
541
-
542
-
543
-
544
-
545
-
546
- </h3><div class="docstring">
547
- <div class="discussion">
548
-
549
- <p>Convert a Ruby Array to a java.util.ArrayList</p>
550
-
551
-
552
- </div>
553
- </div>
554
- <div class="tags">
555
- <p class="tag_title">Parameters:</p>
556
- <ul class="param">
557
-
558
- <li>
559
-
560
- <span class='name'>ruby_array</span>
561
-
562
-
563
- <span class='type'>(<tt>Array</tt>)</span>
564
-
565
-
566
-
567
- &mdash;
568
- <div class='inline'>
569
- <p>Array to convert to Java.util.ArrayList</p>
570
- </div>
571
-
572
- </li>
573
-
574
- </ul>
575
-
576
- <p class="tag_title">Returns:</p>
577
- <ul class="return">
578
-
579
- <li>
580
-
581
-
582
- <span class='type'>(<tt>java.util.ArrayList</tt>)</span>
583
-
584
-
585
-
586
- </li>
587
-
588
- </ul>
589
-
590
- </div><table class="source_code">
591
- <tr>
592
- <td>
593
- <pre class="lines">
594
-
595
-
596
- 115
597
- 116
598
- 117
599
- 118
600
- 119
601
- 120
602
- 121
603
- 122</pre>
604
- </td>
605
- <td>
606
- <pre class="code"><span class="info file"># File 'lib/naether/java/jruby.rb', line 115</span>
607
-
608
- <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>
609
- <span class='id identifier rubyid_list'>list</span> <span class='op'>=</span> <span class='id identifier rubyid_java'>java</span><span class='period'>.</span><span class='id identifier rubyid_util'>util</span><span class='period'>.</span><span class='const'>ArrayList</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
610
- <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>
611
- <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>
612
- <span class='kw'>end</span>
613
-
614
- <span class='id identifier rubyid_list'>list</span>
615
- <span class='kw'>end</span></pre>
616
- </td>
617
- </tr>
618
- </table>
619
- </div>
620
-
621
- <div class="method_details ">
622
- <h3 class="signature " id="convert_to_ruby_array-instance_method">
623
-
624
- - (<tt>Array</tt>) <strong>convert_to_ruby_array</strong>(java_array, to_string = false)
625
-
626
-
627
-
628
-
629
-
630
- </h3><div class="docstring">
631
- <div class="discussion">
632
-
633
- <p>Convert a java,util.List to a Ruby Array</p>
634
-
635
-
636
- </div>
637
- </div>
638
- <div class="tags">
639
- <p class="tag_title">Parameters:</p>
640
- <ul class="param">
641
-
642
- <li>
643
-
644
- <span class='name'>java_array</span>
645
-
646
-
647
- <span class='type'>(<tt>java.util.ArrayList</tt>)</span>
648
-
649
-
650
-
651
- </li>
652
-
653
- <li>
654
-
655
- <span class='name'>to_string</span>
656
-
657
-
658
- <span class='type'>(<tt>Boolean</tt>)</span>
659
-
660
-
661
- <em class="default">(defaults to: <tt>false</tt>)</em>
662
-
663
-
664
- &mdash;
665
- <div class='inline'>
666
- <p>has no affect on conversion.</p>
667
- </div>
668
-
669
- </li>
670
-
671
- </ul>
672
-
673
- <p class="tag_title">Returns:</p>
674
- <ul class="return">
675
-
676
- <li>
677
-
678
-
679
- <span class='type'>(<tt>Array</tt>)</span>
680
-
681
-
682
-
683
- </li>
684
-
685
- </ul>
686
-
687
- </div><table class="source_code">
688
- <tr>
689
- <td>
690
- <pre class="lines">
691
-
692
-
693
- 131
694
- 132
695
- 133</pre>
696
- </td>
697
- <td>
698
- <pre class="code"><span class="info file"># File 'lib/naether/java/jruby.rb', line 131</span>
699
-
700
- <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>
701
- <span class='id identifier rubyid_java_array'>java_array</span><span class='period'>.</span><span class='id identifier rubyid_to_a'>to_a</span>
702
- <span class='kw'>end</span></pre>
703
- </td>
704
- </tr>
705
- </table>
706
- </div>
707
-
708
- <div class="method_details ">
709
- <h3 class="signature " id="convert_to_ruby_hash-instance_method">
710
-
711
- - (<tt>Hash</tt>) <strong>convert_to_ruby_hash</strong>(java_hash, to_string = false)
712
-
713
-
714
-
715
-
716
-
717
- </h3><div class="docstring">
718
- <div class="discussion">
719
-
720
- <p>Convert a java.util.Map to a Ruby Hash</p>
721
-
722
-
723
- </div>
724
- </div>
725
- <div class="tags">
726
- <p class="tag_title">Parameters:</p>
727
- <ul class="param">
728
-
729
- <li>
730
-
731
- <span class='name'>java_hash</span>
732
-
733
-
734
- <span class='type'>(<tt>java.util.Map</tt>)</span>
735
-
736
-
737
-
738
- </li>
739
-
740
- <li>
741
-
742
- <span class='name'>to_string</span>
743
-
744
-
745
- <span class='type'>(<tt>Boolean</tt>)</span>
746
-
747
-
748
- <em class="default">(defaults to: <tt>false</tt>)</em>
749
-
750
-
751
- &mdash;
752
- <div class='inline'>
753
- <p>has no affect on conversion</p>
754
- </div>
755
-
756
- </li>
757
-
758
- </ul>
759
-
760
- <p class="tag_title">Returns:</p>
761
- <ul class="return">
762
-
763
- <li>
764
-
765
-
766
- <span class='type'>(<tt>Hash</tt>)</span>
767
-
768
-
769
-
770
- </li>
771
-
772
- </ul>
773
-
774
- </div><table class="source_code">
775
- <tr>
776
- <td>
777
- <pre class="lines">
778
-
779
-
780
- 142
781
- 143
782
- 144
783
- 145
784
- 146
785
- 147
786
- 148
787
- 149
788
- 150</pre>
789
- </td>
790
- <td>
791
- <pre class="code"><span class="info file"># File 'lib/naether/java/jruby.rb', line 142</span>
792
-
793
- <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>
794
- <span class='id identifier rubyid_hash'>hash</span> <span class='op'>=</span> <span class='id identifier rubyid_java_hash'>java_hash</span><span class='period'>.</span><span class='id identifier rubyid_to_hash'>to_hash</span>
795
-
796
- <span class='id identifier rubyid_hash'>hash</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_k'>k</span><span class='comma'>,</span><span class='id identifier rubyid_v'>v</span><span class='op'>|</span>
797
- <span class='kw'>if</span> <span class='id identifier rubyid_v'>v</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span> <span class='id identifier rubyid_java'>java</span><span class='period'>.</span><span class='id identifier rubyid_util'>util</span><span class='period'>.</span><span class='const'>Map</span>
798
- <span class='id identifier rubyid_hash'>hash</span><span class='lbracket'>[</span><span class='id identifier rubyid_k'>k</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_convert_to_ruby_hash'>convert_to_ruby_hash</span><span class='lparen'>(</span><span class='id identifier rubyid_v'>v</span><span class='comma'>,</span> <span class='id identifier rubyid_to_string'>to_string</span> <span class='rparen'>)</span>
799
- <span class='kw'>end</span>
800
- <span class='kw'>end</span>
801
- <span class='kw'>end</span></pre>
802
- </td>
803
- </tr>
804
- </table>
805
- </div>
806
-
807
- <div class="method_details ">
808
- <h3 class="signature " id="create-instance_method">
809
-
810
- - (<tt>Object</tt>) <strong>create</strong>(target_class, *args)
811
-
812
-
813
-
814
-
815
-
816
- </h3><div class="docstring">
817
- <div class="discussion">
818
-
819
- <p>Create a Java Object from the Naether Class Loader</p>
820
-
821
-
822
- </div>
823
- </div>
824
- <div class="tags">
825
- <p class="tag_title">Parameters:</p>
826
- <ul class="param">
827
-
828
- <li>
829
-
830
- <span class='name'>target_class</span>
831
-
832
-
833
- <span class='type'>(<tt>String</tt>)</span>
834
-
835
-
836
-
837
- &mdash;
838
- <div class='inline'>
839
- <p>to create</p>
840
- </div>
841
-
842
- </li>
843
-
844
- <li>
845
-
846
- <span class='name'>args</span>
847
-
848
-
849
- <span class='type'>(<tt>Array</tt>)</span>
850
-
851
-
852
-
853
- &mdash;
854
- <div class='inline'>
855
- <p>Array of constructor arguments</p>
856
- </div>
857
-
858
- </li>
859
-
860
- </ul>
861
-
862
-
863
- </div><table class="source_code">
864
- <tr>
865
- <td>
866
- <pre class="lines">
867
-
868
-
869
- 37
870
- 38
871
- 39</pre>
872
- </td>
873
- <td>
874
- <pre class="code"><span class="info file"># File 'lib/naether/java/jruby.rb', line 37</span>
875
-
876
- <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>
877
- <span class='ivar'>@class_loader</span><span class='period'>.</span><span class='id identifier rubyid_newInstance'>newInstance</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>
878
- <span class='kw'>end</span></pre>
879
- </td>
880
- </tr>
881
- </table>
882
- </div>
883
-
884
- <div class="method_details ">
885
- <h3 class="signature " id="exec_static_method-instance_method">
886
-
887
- - (<tt>Object</tt>) <strong>exec_static_method</strong>(target_class, target_method, params, types = nil)
888
-
889
-
890
-
891
-
892
-
893
- </h3><div class="docstring">
894
- <div class="discussion">
895
-
896
- <p>Execute a Staic method on a Java class from the Naether Class Loader</p>
897
-
898
-
899
- </div>
900
- </div>
901
- <div class="tags">
902
- <p class="tag_title">Parameters:</p>
903
- <ul class="param">
904
-
905
- <li>
906
-
907
- <span class='name'>target_class</span>
908
-
909
-
910
- <span class='type'>(<tt>String</tt>)</span>
911
-
912
-
913
-
914
- </li>
915
-
916
- <li>
917
-
918
- <span class='name'>target_method</span>
919
-
920
-
921
- <span class='type'>(<tt>String</tt>)</span>
922
-
923
-
924
-
925
- </li>
926
-
927
- <li>
928
-
929
- <span class='name'>params</span>
930
-
931
-
932
- <span class='type'>(<tt>Array</tt>)</span>
933
-
934
-
935
-
936
- &mdash;
937
- <div class='inline'>
938
- <p>Array of method parameters</p>
939
- </div>
940
-
941
- </li>
942
-
943
- <li>
944
-
945
- <span class='name'>types</span>
946
-
947
-
948
- <span class='type'>(<tt>Array</tt>)</span>
949
-
950
-
951
- <em class="default">(defaults to: <tt>nil</tt>)</em>
952
-
953
-
954
- &mdash;
955
- <div class='inline'>
956
- <p>if defined, a Array of String classes of params type that lines up with
957
- params one to one.</p>
958
- </div>
959
-
960
- </li>
961
-
962
- </ul>
963
-
964
- <p class="tag_title">Returns:</p>
965
- <ul class="return">
966
-
967
- <li>
968
-
969
-
970
- <span class='type'>(<tt>Object</tt>)</span>
971
-
972
-
973
-
974
- </li>
975
-
976
- </ul>
977
-
978
- </div><table class="source_code">
979
- <tr>
980
- <td>
981
- <pre class="lines">
982
-
983
-
984
- 49
985
- 50
986
- 51
987
- 52
988
- 53
989
- 54
990
- 55
991
- 56
992
- 57
993
- 58
994
- 59
995
- 60
996
- 61</pre>
997
- </td>
998
- <td>
999
- <pre class="code"><span class="info file"># File 'lib/naether/java/jruby.rb', line 49</span>
1000
-
1001
- <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>
1002
- <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>
1003
- <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>
1004
- <span class='kw'>end</span>
1005
-
1006
- <span class='kw'>if</span> <span class='id identifier rubyid_types'>types</span>
1007
- <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>
1008
- <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>
1009
- <span class='kw'>end</span>
1010
- <span class='kw'>end</span>
1011
-
1012
- <span class='ivar'>@class_loader</span><span class='period'>.</span><span class='id identifier rubyid_execStaticMethod'>execStaticMethod</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='rparen'>)</span>
1013
- <span class='kw'>end</span></pre>
1014
- </td>
1015
- </tr>
1016
- </table>
1017
- </div>
1018
-
1019
- <div class="method_details ">
1020
- <h3 class="signature " id="internal_load_paths-instance_method">
1021
-
1022
- - (<tt>Object</tt>) <strong>internal_load_paths</strong>(paths)
1023
-
1024
-
1025
-
1026
-
1027
-
1028
- </h3><div class="docstring">
1029
- <div class="discussion">
1030
-
1031
- <p>Load a path into the internal Naether ClassLoader</p>
1032
-
1033
-
1034
- </div>
1035
- </div>
1036
- <div class="tags">
1037
- <p class="tag_title">Parameters:</p>
1038
- <ul class="param">
1039
-
1040
- <li>
1041
-
1042
- <span class='name'>paths</span>
1043
-
1044
-
1045
- <span class='type'>(<tt>Array</tt>)</span>
1046
-
1047
-
1048
-
1049
- &mdash;
1050
- <div class='inline'>
1051
- <p>as an Array of String paths or a String path</p>
1052
- </div>
1053
-
1054
- </li>
1055
-
1056
- </ul>
1057
-
1058
-
1059
- </div><table class="source_code">
1060
- <tr>
1061
- <td>
1062
- <pre class="lines">
1063
-
1064
-
1065
- 68
1066
- 69
1067
- 70
1068
- 71
1069
- 72
1070
- 73
1071
- 74
1072
- 75
1073
- 76
1074
- 77
1075
- 78
1076
- 79
1077
- 80
1078
- 81
1079
- 82
1080
- 83
1081
- 84</pre>
1082
- </td>
1083
- <td>
1084
- <pre class="code"><span class="info file"># File 'lib/naether/java/jruby.rb', line 68</span>
1085
-
1086
- <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>
1087
- <span class='id identifier rubyid_load_paths'>load_paths</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
1088
- <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>
1089
- <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>
1090
- <span class='kw'>end</span>
1091
-
1092
- <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>
1093
- <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>
1094
- <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>
1095
- <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_expanded_path'>expanded_path</span> <span class='rparen'>)</span>
1096
-
1097
- <span class='id identifier rubyid_load_paths'>load_paths</span> <span class='op'>&lt;&lt;</span> <span class='id identifier rubyid_expanded_path'>expanded_path</span>
1098
- <span class='kw'>end</span>
1099
- <span class='kw'>end</span>
1100
-
1101
- <span class='id identifier rubyid_load_paths'>load_paths</span>
1102
- <span class='kw'>end</span></pre>
1103
- </td>
1104
- </tr>
1105
- </table>
1106
- </div>
1107
-
1108
- <div class="method_details ">
1109
- <h3 class="signature " id="load_paths-instance_method">
1110
-
1111
- - (<tt>Object</tt>) <strong>load_paths</strong>(paths)
1112
-
1113
-
1114
-
1115
-
1116
-
1117
- </h3><div class="docstring">
1118
- <div class="discussion">
1119
-
1120
- <p>Load a path onto the parent ClassLoader</p>
1121
-
1122
-
1123
- </div>
1124
- </div>
1125
- <div class="tags">
1126
- <p class="tag_title">Parameters:</p>
1127
- <ul class="param">
1128
-
1129
- <li>
1130
-
1131
- <span class='name'>paths</span>
1132
-
1133
-
1134
- <span class='type'>(<tt>Array</tt>)</span>
1135
-
1136
-
1137
-
1138
- &mdash;
1139
- <div class='inline'>
1140
- <p>as an Array of String paths or a String path</p>
1141
- </div>
1142
-
1143
- </li>
1144
-
1145
- </ul>
1146
-
1147
-
1148
- </div><table class="source_code">
1149
- <tr>
1150
- <td>
1151
- <pre class="lines">
1152
-
1153
-
1154
- 91
1155
- 92
1156
- 93
1157
- 94
1158
- 95
1159
- 96
1160
- 97
1161
- 98
1162
- 99
1163
- 100
1164
- 101
1165
- 102
1166
- 103
1167
- 104
1168
- 105
1169
- 106
1170
- 107</pre>
1171
- </td>
1172
- <td>
1173
- <pre class="code"><span class="info file"># File 'lib/naether/java/jruby.rb', line 91</span>
1174
-
1175
- <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>
1176
- <span class='id identifier rubyid_load_paths'>load_paths</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
1177
- <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>
1178
- <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>
1179
- <span class='kw'>end</span>
1180
-
1181
- <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>
1182
- <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>
1183
- <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>
1184
- <span class='gvar'>$CLASSPATH</span> <span class='op'>&lt;&lt;</span> <span class='id identifier rubyid_expanded_path'>expanded_path</span>
1185
- <span class='id identifier rubyid_load_paths'>load_paths</span> <span class='op'>&lt;&lt;</span> <span class='id identifier rubyid_expanded_path'>expanded_path</span>
1186
- <span class='ivar'>@loaded_paths</span> <span class='op'>&lt;&lt;</span> <span class='id identifier rubyid_expanded_path'>expanded_path</span>
1187
- <span class='kw'>end</span>
1188
- <span class='kw'>end</span>
1189
-
1190
- <span class='id identifier rubyid_load_paths'>load_paths</span>
1191
- <span class='kw'>end</span></pre>
1192
- </td>
1193
- </tr>
1194
- </table>
1195
- </div>
1196
-
1197
- </div>
1198
-
1199
- </div>
1200
-
1201
- <div id="footer">
1202
- Generated on Tue Jan 13 10:20:30 2015 by
1203
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1204
- 0.8.7.2 (ruby-1.9.3).
1205
- </div>
1206
-
1207
- </body>
1208
- </html>