Generate method wrapper

0 views
Skip to first unread message

dreamhead

unread,
Jul 8, 2007, 10:33:42 PM7/8/07
to xruby...@googlegroups.com
Hi!

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!

Reply all
Reply to author
Forward
0 new messages