From e7ff097fec867714b8a064b559dfc9e5162a489c Mon Sep 17 00:00:00 2001
From: Reinier Zwitserloot
To put annotations on the generated method, you can use onMethod=@_({@AnnotationsHere})
; to put annotations on the only parameter of a generated wither method, you can use onParam=@_({@AnnotationsHere})
. Be careful though! This is an experimental feature. For more details see the documentation on the onX feature.
+
+ NEW in lombok v1.12.0: javadoc on the field will now be copied to generated withers. Normally, all text is copied, and @param
is moved to the wither, whilst @return
lines are stripped from the wither's javadoc. Moved means: Deleted from the field's javadoc. It is also possible to define unique text for the wither's javadoc. To do that, you create a 'section' named WITHER
. A section is a line in your javadoc containing 2 or more dashes, then the text 'WITHER', followed by 2 or more dashes, and nothing else on the line. If you use sections, @return
and @param
stripping / copying for that section is no longer done (move the @param
line into the section).