Open GoogleCodeExporter opened 9 years ago
And what about this?
@NonNull @Size(min=3, max=5) @Name("foo_bar")
private Foo bar;
Maybe if you need annotations on the getter and only there, generating the
other way round would be a better option.
@Field(access=PRIVATE) @Setter
@NonNull @Size(min=3, max=5) @Name("foo_bar")
public Foo getBar();
could generate just this. (For syntactical correctness, one could force an
"abstract" modifier on the getter.)
Original comment by k.tinnefeld
on 5 May 2012 at 6:14
There is no other way than the one which Karsten has pointed out. Its technical
not possible for lombok to embbed annotations in lombok-generated methods, at
least not with the current javac and bytecode implementation.
So, if you want custom annotations on a method, then you have to hardcode it.
Original comment by Eric6i...@googlemail.com
on 4 Jun 2012 at 3:18
Original issue reported on code.google.com by
nicolas....@gmail.com
on 3 May 2012 at 1:12