aboutsummaryrefslogtreecommitdiff
path: root/website/templates/features/With.html
diff options
context:
space:
mode:
authorJ. Y. Terence Kim <jyterencekim@gmail.com>2019-09-23 18:16:08 +0900
committerGitHub <noreply@github.com>2019-09-23 18:16:08 +0900
commit3369e0ffc73a8150f58d74c0e44ef59a9e160976 (patch)
tree361b598d2cd81e266dabb448efc40ab0a73c2aea /website/templates/features/With.html
parent3c54d733537813f93988a4ab420eaf3a3c0c1d2a (diff)
downloadlombok-3369e0ffc73a8150f58d74c0e44ef59a9e160976.tar.gz
lombok-3369e0ffc73a8150f58d74c0e44ef59a9e160976.tar.bz2
lombok-3369e0ffc73a8150f58d74c0e44ef59a9e160976.zip
Update With.html
## Summary The current sentence fragment `Lombok's own <a href="/features/constructor"><code>@AllArgsConstructor</code></a>` does not fully clarify the author's intention, which I presume is to recommend using `@AllArgsConstructor`.
Diffstat (limited to 'website/templates/features/With.html')
-rw-r--r--website/templates/features/With.html2
1 files changed, 1 insertions, 1 deletions
diff --git a/website/templates/features/With.html b/website/templates/features/With.html
index f1719e19..425a1640 100644
--- a/website/templates/features/With.html
+++ b/website/templates/features/With.html
@@ -14,7 +14,7 @@
</p><p>
For example, if you create <code>public class Point { private final int x, y; }</code>, setters make no sense because the fields are final. <code>@With</code> can generate a <code>withX(int newXValue)</code> method for you which will return a new point with the supplied value for <code>x</code> and the same value for <code>y</code>.
</p><p>
- The <code>@With</code> relies on a constructor for all fields in order to do its work. If this constructor does not exist, your <code>@With</code> annotation will result in a compile time error message. Lombok's own <a href="/features/constructor"><code>@AllArgsConstructor</code></a>. As <a href="/features/Value"><code>Value</code></a> will automatically produce an all args constructor as well, you can use that too. It's of course also acceptable if you manually write this constructor. It must contain all non-static fields, in the same lexical order.
+ The <code>@With</code> relies on a constructor for all fields in order to do its work. If this constructor does not exist, your <code>@With</code> annotation will result in a compile time error message. You can use Lombok's own <a href="/features/constructor"><code>@AllArgsConstructor</code></a>, or as <a href="/features/Value"><code>Value</code></a> will automatically produce an all args constructor as well, you can use that too. It's of course also acceptable if you manually write this constructor. It must contain all non-static fields, in the same lexical order.
</p><p>
Like <a href="/features/GetterSetter"><code>@Setter</code></a>, you can specify an access level in case you want the generated with method to be something other than <code>public</code>:<br /> <code>@With(level = AccessLevel.PROTECTED)</code>. Also like <a href="/features/GetterSetter"><code>@Setter</code></a>, you can also put a <code>@With</code> annotation on a type, which means a <code>with</code> method is generated for each field (even non-final fields).
</p><p>