We'd like to have trivial Java property accessors using a single line syntax, so they take up much much less space, and are more readable (in terms of 'seeing' the set of accessors quickly). But we do want to enforce multi-line method syntax for everything else in our checkstyle configuration. But I'm not sure how to make this exception for accessors in Checkstyle config and suspect it may not be possible.
So we'd like our accessors to look something like this:
public String getFoo() { return foo; }
public void setFoo(String foo) { this.foo = foo; }
[In fact we'd rather not have trivial accessors at all and instead just annotate the private member variables with @Property
or something and have the accessors generated for us, since writing endless get and set code delivers no real benefit, but that's a general Java frustration and an aside as far as this question goes.]