tliebscher
Programmer
We're using the checkstyle plugin for 2 weeks now and had to realize that it requests all methods in non-static classes and all parameters to be final (with the standard SUN checks activated).
Now this is all right until it comes to getters and setters. The problem is that i couldn't find a way to tell eclipse to add the final statements automatically. I have to go over the generated code myself to make it look like this:
public final String getTest() {
return test;
}
public final void setTest(final String test) {
this.test = test;
}
Does anyone know if there's a way to manipulate eclipses way of generating the getters and setters? I really don't wanna switch off this check in checkstyle, since i think it really makes sense.
Now this is all right until it comes to getters and setters. The problem is that i couldn't find a way to tell eclipse to add the final statements automatically. I have to go over the generated code myself to make it look like this:
public final String getTest() {
return test;
}
public final void setTest(final String test) {
this.test = test;
}
Does anyone know if there's a way to manipulate eclipses way of generating the getters and setters? I really don't wanna switch off this check in checkstyle, since i think it really makes sense.