diff options
author | Reinier Zwitserloot <reinier@zwitserloot.com> | 2018-10-08 15:52:43 +0200 |
---|---|---|
committer | Reinier Zwitserloot <reinier@zwitserloot.com> | 2018-10-08 15:52:43 +0200 |
commit | 06455de367932e93da707b9d91e1a347d0c072a6 (patch) | |
tree | 46dad85a25c6b8b7959dc2aeecf3f30060b703e1 /website | |
parent | 3bb6f69a5b03ac3181f5bd6a04050ba339c7642e (diff) | |
parent | bd494bb5ff01eea2413cfe5a4820bfff34c07261 (diff) | |
download | lombok-06455de367932e93da707b9d91e1a347d0c072a6.tar.gz lombok-06455de367932e93da707b9d91e1a347d0c072a6.tar.bz2 lombok-06455de367932e93da707b9d91e1a347d0c072a6.zip |
Merge branch 'superToBuilder' of git://github.com/janrieke/lombok into janrieke-superToBuilder
Diffstat (limited to 'website')
-rw-r--r-- | website/templates/features/experimental/SuperBuilder.html | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/website/templates/features/experimental/SuperBuilder.html b/website/templates/features/experimental/SuperBuilder.html index 8189a254..c0d24606 100644 --- a/website/templates/features/experimental/SuperBuilder.html +++ b/website/templates/features/experimental/SuperBuilder.html @@ -23,6 +23,8 @@ </p><p> <code>@SuperBuilder</code> is not compatible with <code>@Builder</code>. </p><p> + You can use <code>@SuperBuilder(toBuilder = true)</code> to also generate an instance method in your class called <code>toBuilder()</code>; it creates a new builder that starts out with all the values of this instance. You can put the <code>@Builder.ObtainVia</code> annotation on the fields to indicate alternative means by which the value for that field/parameter is obtained from this instance. For example, you can specify a method to be invoked: <code>@Builder.ObtainVia(method = "calculateFoo")</code>. + </p><p> To ensure type-safety, <code>@SuperBuilder</code> generates two inner builder classes for each annotated class, one abstract and one concrete class named <code><em>Foobar</em>Builder</code> and <code><em>Foobar</em>BuilderImpl</code> (where <em>Foobar</em> is the name of the annotated class). </p><p> The configurable aspects of builder are: @@ -31,10 +33,12 @@ The <em>build()</em> method's name (default: <code>"build"</code>) </li><li> The <em>builder()</em> method's name (default: <code>"builder"</code>) + </li><li> + If you want <code>toBuilder()</code> (default: no) </li> </ul> Example usage where all options are changed from their defaults:<br /> - <code>@SuperBuilder(buildMethodName = "execute", builderMethodName = "helloWorld")</code><br /> + <code>@SuperBuilder(buildMethodName = "execute", builderMethodName = "helloWorld", toBuilder = true)</code><br /> </p> </@f.overview> |