Probably dumb question on getter/setter camel case conventions [message #692118] |
Sun, 03 July 2011 12:23  |
Eclipse User |
|
|
|
When I use Source -> Generate Getters and Setters..., if the field is 'final' then it generates getSomepropertyname() {...} but without 'final' it generates getSomePropertyName() {...}
I checked and both Helios and Indigo do this, so I'm assuming this is some old Java convention/EJB requirement but I can't find any explanation on google.
Is there some historical reason that final getter/setter names aren't camel-cased?
|
|
|
|
Re: Probably dumb question on getter/setter camel case conventions [message #692190 is a reply to message #692173] |
Sun, 03 July 2011 17:15  |
Eclipse User |
|
|
|
I haven't found anything in any of the templates or on the web or help files that seem related to camel casing identifiers. The template only allows (as far as I know) the format of the code inside the getter body, not the getter declaration itself.
Also I don't know how the templates would behave differently only when 'final' is in the declaration. That's why I assumed that it is some option or behavior coded into Eclipse.
You're right though, it must be some preference setting somewhere because I just tried it with a stock Indigo distribution and it doesn't show the same behavior.
I've been carrying the same .epf around with me probably since 3.2 or 3.3 so it's either something in there or else one of the plugins I'm using is doing it.
I exported my preferences and grepped for 'setter', 'getter', 'case' and 'final' but I don't see anything that looks like it's related.
I've got a fair number of plugins: PMD, findbugs, mylyn, data tools, subclipse, wireframe sketcher, pydev, emma, atlassian connector for jira, filesync, openjpa, PDT, WTP, dali JPA, RAP, checkstyle and probably a couple of others. I wonder if one of them is doing it?
Thanks!
Dan
|
|
|
Powered by
FUDForum. Page generated in 0.08643 seconds