This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Ruby and the fly likes Dynamic method calls Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Languages » Ruby
Bookmark "Dynamic method calls" Watch "Dynamic method calls" New topic

Dynamic method calls

Bill Reiflin

Joined: Dec 08, 2009
Posts: 2
I have a small program that dynamically calls methods such as column_name= from a hash. Pretty straight forward, except for the = part. I could store the = in the hash, but is ugly and might not always be in the method name.

This is what I have done, but it feels wrong:

Marc Peabody
pie sneak

Joined: Feb 05, 2003
Posts: 4727

That's pretty much it. I think I'd put that in Table's initializer though.

A good workman is known by his tools.
I agree. Here's the link:
subject: Dynamic method calls
Similar Threads
Arrays: Calling input from other methods and classes
Equals Doubt
hashmap and equals doubts
query regarding null key in hashmap
question concering hashCode(), equals() and operator ==