bitescript 0.1.2 → 0.1.3
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.
- checksums.yaml +7 -0
- data/History.txt +4 -0
- data/bitescript.gemspec +1 -1
- data/lib/bitescript/builder.rb +5 -0
- data/lib/bitescript/mirror.rb +22 -1
- metadata +81 -88
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: ad63e1d004fe3792137024fbc18d196a48c45f8e
|
4
|
+
data.tar.gz: af79bb169bfbe125c33727c362072393bdedf2bc
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 07462b79ea3a862d4e26dbd62c9641278eb79dfa402564070b16ec26ad12924d182468ece5ee07a0f3b433b3230692fdcf62ed28810e137ad787a4cd38fd6952
|
7
|
+
data.tar.gz: 008fb13d91299931c3d334088509ce32670db84e3716a3386572356406e3de9145a482e0a040d90ab1bfffb745a8847fd09d52f811f6895792e72253e16069ed
|
data/History.txt
CHANGED
data/bitescript.gemspec
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{bitescript}
|
5
|
-
s.version = "0.1.
|
5
|
+
s.version = "0.1.3"
|
6
6
|
s.authors = ["Charles Oliver Nutter", "Ryan Brown"]
|
7
7
|
s.date = Time.now.strftime('%Y-%m-%d')
|
8
8
|
s.description = %q{BiteScript is a Ruby DSL for generating Java bytecode and classes.}
|
data/lib/bitescript/builder.rb
CHANGED
@@ -3,6 +3,11 @@ require 'bitescript/signature'
|
|
3
3
|
require 'fileutils'
|
4
4
|
|
5
5
|
module BiteScript
|
6
|
+
java_import org.jruby.org.objectweb.asm.FieldWriter
|
7
|
+
java_import org.jruby.org.objectweb.asm.AnnotationWriter
|
8
|
+
FieldWriter.__persistent__ = true
|
9
|
+
AnnotationWriter.__persistent__ = true
|
10
|
+
|
6
11
|
module Util
|
7
12
|
def type_from_dotted(dotted_name)
|
8
13
|
JavaUtilities.get_proxy_class(dotted_name).java_class
|
data/lib/bitescript/mirror.rb
CHANGED
@@ -253,7 +253,28 @@ module BiteScript::ASM
|
|
253
253
|
end
|
254
254
|
|
255
255
|
def getField(name)
|
256
|
-
@fields[name]
|
256
|
+
field = @fields[name]
|
257
|
+
field ||= begin
|
258
|
+
ifaces = interfaces.map do |i|
|
259
|
+
wrap_it i
|
260
|
+
end
|
261
|
+
ifaces.map{|i| i.getField(name) }.compact.first
|
262
|
+
end
|
263
|
+
field ||= begin
|
264
|
+
s = wrap_it superclass
|
265
|
+
f, s = [s.getField(name), wrap_it(s.superclass)] until f || s.nil?
|
266
|
+
f
|
267
|
+
end
|
268
|
+
field
|
269
|
+
end
|
270
|
+
|
271
|
+
def wrap_it i
|
272
|
+
return unless i
|
273
|
+
if i.respond_to?(:getField)
|
274
|
+
i
|
275
|
+
else
|
276
|
+
ClassMirror.for_name i.class_name
|
277
|
+
end
|
257
278
|
end
|
258
279
|
|
259
280
|
def getDeclaredFields
|
metadata
CHANGED
@@ -1,103 +1,96 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: bitescript
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
version: 0.1.2
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.3
|
6
5
|
platform: ruby
|
7
|
-
authors:
|
8
|
-
|
9
|
-
|
6
|
+
authors:
|
7
|
+
- Charles Oliver Nutter
|
8
|
+
- Ryan Brown
|
10
9
|
autorequire:
|
11
10
|
bindir: bin
|
12
11
|
cert_chain: []
|
13
|
-
|
14
|
-
date: 2013-02-25 00:00:00 Z
|
12
|
+
date: 2013-08-05 00:00:00.000000000 Z
|
15
13
|
dependencies: []
|
16
|
-
|
17
14
|
description: BiteScript is a Ruby DSL for generating Java bytecode and classes.
|
18
|
-
email:
|
19
|
-
|
20
|
-
|
21
|
-
executables:
|
22
|
-
|
23
|
-
|
15
|
+
email:
|
16
|
+
- headius@headius.com
|
17
|
+
- ribrdb@gmail.com
|
18
|
+
executables:
|
19
|
+
- bite
|
20
|
+
- bitec
|
24
21
|
extensions: []
|
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
|
-
- Rakefile
|
22
|
+
extra_rdoc_files:
|
23
|
+
- History.txt
|
24
|
+
- LICENSE.txt
|
25
|
+
- README.txt
|
26
|
+
files:
|
27
|
+
- bin/bite
|
28
|
+
- bin/bitec
|
29
|
+
- bin/bitep
|
30
|
+
- examples/fib.bs
|
31
|
+
- examples/hello_world.bs
|
32
|
+
- examples/hello_world_macro.bs
|
33
|
+
- examples/indy.bs
|
34
|
+
- examples/instanceof.bs
|
35
|
+
- examples/invokedynamic.bs
|
36
|
+
- examples/mixed_bag.rb
|
37
|
+
- examples/simple_loop.rb
|
38
|
+
- examples/using_ruby.bs
|
39
|
+
- lib/bitescript/asm.rb
|
40
|
+
- lib/bitescript/asm3/asm.rb
|
41
|
+
- lib/bitescript/asm3/builder.rb
|
42
|
+
- lib/bitescript/asm3/bytecode.rb
|
43
|
+
- lib/bitescript/asm3/mirror.rb
|
44
|
+
- lib/bitescript/asm3/signature.rb
|
45
|
+
- lib/bitescript/builder.rb
|
46
|
+
- lib/bitescript/bytecode.rb
|
47
|
+
- lib/bitescript/mirror.rb
|
48
|
+
- lib/bitescript/signature.rb
|
49
|
+
- lib/bitescript.rb
|
50
|
+
- nbproject/project.properties
|
51
|
+
- nbproject/project.xml
|
52
|
+
- test/test_bitescript.rb
|
53
|
+
- test/test_builder.rb
|
54
|
+
- test/test_bytecode.rb
|
55
|
+
- test/test_generics.rb
|
56
|
+
- test/test_java_class.rb
|
57
|
+
- test/test_mirror.rb
|
58
|
+
- test/test_signature.rb
|
59
|
+
- History.txt
|
60
|
+
- LICENSE.txt
|
61
|
+
- README.txt
|
62
|
+
- bitescript.gemspec
|
63
|
+
- Rakefile
|
68
64
|
homepage: http://github.com/headius/bitescript
|
69
65
|
licenses: []
|
70
|
-
|
66
|
+
metadata: {}
|
71
67
|
post_install_message:
|
72
|
-
rdoc_options:
|
73
|
-
|
74
|
-
|
75
|
-
require_paths:
|
76
|
-
|
77
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
78
|
-
|
79
|
-
|
80
|
-
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
- !ruby/object:Gem::Version
|
88
|
-
version: "0"
|
68
|
+
rdoc_options:
|
69
|
+
- --main
|
70
|
+
- README.txt
|
71
|
+
require_paths:
|
72
|
+
- lib
|
73
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
74
|
+
requirements:
|
75
|
+
- - '>='
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: '0'
|
78
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - '>='
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
89
83
|
requirements: []
|
90
|
-
|
91
84
|
rubyforge_project: jruby-extras
|
92
|
-
rubygems_version:
|
85
|
+
rubygems_version: 2.0.3
|
93
86
|
signing_key:
|
94
|
-
specification_version:
|
87
|
+
specification_version: 4
|
95
88
|
summary: BiteScript is a Ruby DSL for generating Java bytecode.
|
96
|
-
test_files:
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
89
|
+
test_files:
|
90
|
+
- test/test_bitescript.rb
|
91
|
+
- test/test_builder.rb
|
92
|
+
- test/test_bytecode.rb
|
93
|
+
- test/test_generics.rb
|
94
|
+
- test/test_java_class.rb
|
95
|
+
- test/test_mirror.rb
|
96
|
+
- test/test_signature.rb
|