snake case method names on Java classes

130 views
Skip to first unread message

John Woodell

unread,
Dec 1, 2010, 6:13:00 PM12/1/10
to mi...@googlegroups.com
Method aliases should be created at compile time (but only as needed) using the same rules that JRuby follows.

    import com.google.appengine.api.users.UserServiceFactory
    @is_admin = UserServiceFactory.getUserService.isUserAdmin

should also be available as...

    import com.google.appengine.api.users.UserServiceFactory
    @is_admin = UserServiceFactory.get_user_service.is_user_admin

Michal Hantl

unread,
Dec 2, 2010, 3:33:32 AM12/2/10
to mi...@googlegroups.com
    UserServiceFactory.getUserService.isUserAdmin

should also be available as...

    .get<Something> -> .something
    UserServiceFactory.user_service.is_user_admin

or even more ruby-like, 

    is_<something> -> <something>?

    UserServiceFactory.user_service.user_admin?


--
S pozdravem, Regards
Michal Hantl

gtalk/jabber: mic...@hantl.cz
icq: 241813215
Reply all
Reply to author
Forward
0 new messages