When I use the auto generation for getter/setter in Eclipse for an class field with a name likeString lAttr
it will produce this:
public String getlAttr() {
return lAttr;
}
public void setlAttr(String lAttr) {
this.lAttr = lAttr;
}
The first letter of the field will not be capitalized! But some frameworks which I use, work with reflection and invoke the getter/setter by using the "get" + capitalized field name.
Can I change the code generation for getter/setter in eclipse to produce an output like getLAttr()
and setLAttr()
?
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?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With