Many of us are confused by package builtin and value. In fact, package
builtin is just used for interface RubyMethod because method is not
first class in Java. I got an idea from JRuby. That is, to generate
method wrapper for method in code, not hand-code. Now the code is
available.
Here is an example:
MethodFactory factory = MethodFactory.createMethodFactory(RubyArray.class);
c.defineMethod("clear", factory.getMethod("clear", 0));
Thank JRuby team!
I provide more details in my blog if you can read Chinese. :)
http://dreamhead.blogbus.com/logs/6520681.html
Ye Zheng
--
Everything is simple!