[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.tools.jdt] Re: Changing Java source in a builder; which mechanism?

Brad Jarvinen skrev den 20-09-2007 22:06:
Walter, what you say makes sense. The method I was trying to add is required by our current API implementation and is similar to a copy method, in which the body of the method called each of the setters in the class and filled them with values. In that scenario, I wanted the method to be dynamically recontructed each time a new getter/setter were added to the class.

If you can programatically determine the values to put in given the getter/setter name, you should investigate to do this with reflection in a helper class instead. This will allow you to have a single, generic method common to them all.


--
  Thorbjørn