When I use the auto generation for getter/setter in Eclipse for an class field with a name like
String lAttr
it will produce this:
public St
What version of Eclipse are you using? I tried this in Eclipse 3.5.2, and when I moused-over the field and clicked "create getter and setter for 'lAttr'", the dialog box that appeared allowed me to change the generated names, in this case from getlAttr
to getLAttr
and setlAttr
to setLAttr
. Another option would be to just name your field LAttr
from the start and avoid the whole mess.
It is possible to give your own names of getter/setter in eclipse. Make your variable private. Go to error where you are trying to access private variable in another class. Select the quick fix of generating getter/setter. It pops up a dialog where getter/setter names are modifiable.
1) I don't think it's possible, similar discussion:
Change Eclipse Getters Setters syntax
2) another option, as alternative, is to use templates for getters and setters. though there is a small problem there too, similar discussion:
How to deal with Camel Case for Eclipse Templates?