aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Rieke <it@janrieke.de>2020-02-10 12:54:04 +0100
committerJan Rieke <it@janrieke.de>2020-02-10 13:31:44 +0100
commitad4c612303201665e2362909fa9bd686847f78ba (patch)
tree665bbf0813b47c4cd688a9f73f410d631e72ce80
parentd1c81abc13577edf95ee13a6f0c48e58bf5947bc (diff)
downloadlombok-ad4c612303201665e2362909fa9bd686847f78ba.tar.gz
lombok-ad4c612303201665e2362909fa9bd686847f78ba.tar.bz2
lombok-ad4c612303201665e2362909fa9bd686847f78ba.zip
SuperBuilder setterPrefix documentation
-rw-r--r--website/templates/features/experimental/SuperBuilder.html6
1 files changed, 4 insertions, 2 deletions
diff --git a/website/templates/features/experimental/SuperBuilder.html b/website/templates/features/experimental/SuperBuilder.html
index 5676b60c..0fa81073 100644
--- a/website/templates/features/experimental/SuperBuilder.html
+++ b/website/templates/features/experimental/SuperBuilder.html
@@ -32,7 +32,7 @@
</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>
- Customizing the code generated by <code>@SuperBuilder</code> is limited to adding new methods or annotations to the builder classes, and providing custom implementations of <code>builder()</code> and <code>build()</code>.
+ Customizing the code generated by <code>@SuperBuilder</code> is limited to adding new methods or annotations to the builder classes, and providing custom implementations of the 'set', <code>builder()</code>, and <code>build()</code> methods.
You have to make sure that the builder class declaration headers match those that would have been generated by lombok. Due to the heavy generics usage, we strongly advice to copy the builder class definition header from the uncustomized delomboked code.
</p><p>
The configurable aspects of builder are:
@@ -43,10 +43,12 @@
The <em>builder()</em> method's name (default: <code>"builder"</code>)
</li><li>
If you want <code>toBuilder()</code> (default: no)
+ </li><li>
+ (discouraged) If you want your builder's 'set' methods to have a prefix, i.e. <code>Person.builder().setName("Jane").build()</code> instead of <code>Person.builder().name("Jane").build()</code> and what it should be.
</li>
</ul>
Example usage where all options are changed from their defaults:<br />
- <code>@SuperBuilder(buildMethodName = "execute", builderMethodName = "helloWorld", toBuilder = true)</code><br />
+ <code>@SuperBuilder(buildMethodName = "execute", builderMethodName = "helloWorld", toBuilder = true, setterPrefix = "set")</code><br />
</p>
</@f.overview>