Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » interface implemenation methods with reasonable argument names?(Can we have interface implementation methods with more reasonable argument names, please?)
interface implemenation methods with reasonable argument names? [message #936190] Sun, 07 October 2012 15:51 Go to next message
Eclipse UserFriend
One thing I always hate about the automatically generated methods that are created to implement an interface is, that their arguments are always generically called arg0, arg1, arg2, etc.

Couldn't the code that generates these method headers copy the argument names from the actual interface definitions? There the arguments usualy have more meaningful names and that would help a lot to make the headers more self-explanatory.

Esp. if there are several subsequent arguments of the same type one always has to refer back to the definition to figure out, which one is which. If the arguments had proper names, that would often be superfluous.

M.

Re: interface implemenation methods with reasonable argument names? [message #937473 is a reply to message #936190] Mon, 08 October 2012 21:56 Go to previous messageGo to next message
Eclipse UserFriend
One thing I "love" about letting JDT add unimplemented methods is that in most cases their argument names are taken from the super interface.
If this doesn't work it probably means that JDT somehow cannot find these argument names, perhaps because it's reading the interface from a jar which does not contain this information and has neither source code nor javadoc attached.
Re: interface implemenation methods with reasonable argument names? [message #938423 is a reply to message #937473] Tue, 09 October 2012 17:44 Go to previous message
Eclipse UserFriend
OK. I have to admit I never noticed that any reasonable names were taken. So maybe I was always using/implementing interfaces from .jar's so far. But thanks for letting me know!
M.

[Updated on: Tue, 09 October 2012 17:44] by Moderator

Previous Topic:groovy class cannot be resolved to a type
Next Topic:Clean way of getting fully qualified types of imethod parameters?
Goto Forum:
  


Current Time: Fri May 23 01:26:59 EDT 2025

Powered by FUDForum. Page generated in 0.03238 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top