infraruby-java 3.7.1 → 4.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/MIT-LICENSE +1 -1
- data/README.md +0 -5
- data/ext/primitive/PrimitiveService.java +4981 -1162
- data/ext/primitive/primitive.c +2524 -1724
- data/infraruby-java.gemspec +3 -3
- data/lib/infraruby-java.rb +121 -0
- data/lib/primitive/primitive.jar +0 -0
- data/ruby/Exception.rb +45 -0
- data/ruby/Float.rb +1 -1
- data/ruby/Integer.rb +1 -1
- data/ruby/JAVA.rb +115 -0
- data/ruby/Kernel.rb +6 -0
- data/ruby/Module.rb +6 -0
- data/ruby/Object.rb +9 -2
- data/ruby/String.rb +4 -14
- metadata +11 -9
- data/ruby/Java.rb +0 -106
- data/ruby/Java/java.lang.String.rb +0 -7
- data/ruby/NilClass.rb +0 -5
data/ruby/Java.rb
DELETED
@@ -1,106 +0,0 @@
|
|
1
|
-
InfraRuby.if(RUBY_ENGINE == "jruby") {
|
2
|
-
|
3
|
-
module Java
|
4
|
-
class << self
|
5
|
-
def int16
|
6
|
-
return ::Java::short
|
7
|
-
end
|
8
|
-
|
9
|
-
def int32
|
10
|
-
return ::Java::int
|
11
|
-
end
|
12
|
-
|
13
|
-
def int64
|
14
|
-
return ::Java::long
|
15
|
-
end
|
16
|
-
|
17
|
-
def float32
|
18
|
-
return ::Java::float
|
19
|
-
end
|
20
|
-
|
21
|
-
def float64
|
22
|
-
return ::Java::double
|
23
|
-
end
|
24
|
-
end
|
25
|
-
|
26
|
-
class << self
|
27
|
-
def ARRAYCOPY(m0, i0, m1, i1, n)
|
28
|
-
Java::java.lang.System.arraycopy(m0, i0, m1, i1, n)
|
29
|
-
return
|
30
|
-
end
|
31
|
-
end
|
32
|
-
end
|
33
|
-
|
34
|
-
}
|
35
|
-
|
36
|
-
Java::boolean.define_singleton_method(:array) do |*args|
|
37
|
-
n = args.size
|
38
|
-
m = Java::boolean[n].new
|
39
|
-
n.times do |i|
|
40
|
-
m[i] = args[i]
|
41
|
-
end
|
42
|
-
return m
|
43
|
-
end
|
44
|
-
|
45
|
-
Java::byte.define_singleton_method(:array) do |*args|
|
46
|
-
n = args.size
|
47
|
-
m = Java::byte[n].new
|
48
|
-
n.times do |i|
|
49
|
-
m[i] = args[i]
|
50
|
-
end
|
51
|
-
return m
|
52
|
-
end
|
53
|
-
|
54
|
-
Java::char.define_singleton_method(:array) do |*args|
|
55
|
-
n = args.size
|
56
|
-
m = Java::char[n].new
|
57
|
-
n.times do |i|
|
58
|
-
m[i] = args[i]
|
59
|
-
end
|
60
|
-
return m
|
61
|
-
end
|
62
|
-
|
63
|
-
Java::int16.define_singleton_method(:array) do |*args|
|
64
|
-
n = args.size
|
65
|
-
m = Java::int16[n].new
|
66
|
-
n.times do |i|
|
67
|
-
m[i] = args[i]
|
68
|
-
end
|
69
|
-
return m
|
70
|
-
end
|
71
|
-
|
72
|
-
Java::int32.define_singleton_method(:array) do |*args|
|
73
|
-
n = args.size
|
74
|
-
m = Java::int32[n].new
|
75
|
-
n.times do |i|
|
76
|
-
m[i] = args[i]
|
77
|
-
end
|
78
|
-
return m
|
79
|
-
end
|
80
|
-
|
81
|
-
Java::int64.define_singleton_method(:array) do |*args|
|
82
|
-
n = args.size
|
83
|
-
m = Java::int64[n].new
|
84
|
-
n.times do |i|
|
85
|
-
m[i] = args[i]
|
86
|
-
end
|
87
|
-
return m
|
88
|
-
end
|
89
|
-
|
90
|
-
Java::float32.define_singleton_method(:array) do |*args|
|
91
|
-
n = args.size
|
92
|
-
m = Java::float32[n].new
|
93
|
-
n.times do |i|
|
94
|
-
m[i] = args[i]
|
95
|
-
end
|
96
|
-
return m
|
97
|
-
end
|
98
|
-
|
99
|
-
Java::float64.define_singleton_method(:array) do |*args|
|
100
|
-
n = args.size
|
101
|
-
m = Java::float64[n].new
|
102
|
-
n.times do |i|
|
103
|
-
m[i] = args[i]
|
104
|
-
end
|
105
|
-
return m
|
106
|
-
end
|