Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Eclipse Getter/Setter-creation

Status
Not open for further replies.

tliebscher

Programmer
Aug 19, 2003
2
DE
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.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top