In a code sample containing many getters and setters, the following CHECKSTYLE notations exist:
/* CHECKSTYLE:OFF */
public void setDisplayName(final String displayName) {
this.displayName = displayName;
}
/* CHECKSTYLE:ON */
/* CHECKSTYLE:OFF */
public String getDisplayName() {
return displayName;
}
/* CHECKSTYLE:ON */
I find that this muddies the code, making it more difficult to read.
Is there a simpler way to add these notations so that they are not at the beginning and end of every method definition as in this example?