I just committed a change to create additional ruby_case aliases for all camelCase Java methods in included classes. For example, an included java.lang.String (as JString) has methods like:
sub_sequence
compare_to
equals_ignore_case
We may or may not want to provide a flag to turn this off, since it does add quite a few aliases. I think it looks pretty cool though, and I'd like to have it on by default. How nice is:
# assuming JFrame, JButton have been included already
f = JFrame.new("Frame")
b = JButton.new("Button")
f.set_size(200, 200)
f.content_pane.add(b)
f.show
We do not have the reverse case, where defining a method with underscores implements a Java method of the same name, so the following does not work:
class MyListener < ActionListener
def action_performed(event)
...
end
end
But I think it's a good start. At some level, I almost think everything should be ruby_case all the time, but I know that would cause some confusion when searching for specific methods.
Thoughts?
--
Charles Oliver Nutter @ headius.blogspot.com
JRuby Developer @ jruby.sourceforge.net
Application Architect @
www.ventera.com
- [Jruby-devel] ruby_case for Java camelCase methods Charles O Nutter
- Re: [Jruby-devel] ruby_case for Java camelCase metho... Nick Sieger
- Re: [Jruby-devel] ruby_case for Java camelCase metho... David Corbin
- Re: [Jruby-devel] ruby_case for Java camelCase m... Thomas E Enebo
- Re: [Jruby-devel] ruby_case for Java camelCa... Charles O Nutter
- Re: [Jruby-devel] ruby_case for Java cam... Nick Sieger
- Re: [Jruby-devel] ruby_case for Jav... Charles O Nutter
- Re: [Jruby-devel] ruby_case for... David Corbin
- Re: [Jruby-devel] ruby_case... Thomas E Enebo
- Re: [Jruby-devel] ruby_case... David Corbin