aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaleb Brinkman <cbrinkman@sonatype.com>2019-07-10 15:03:09 -0500
committerCaleb Brinkman <cbrinkman@sonatype.com>2019-07-10 15:03:09 -0500
commit5f198d71c684c6a2f1eec9ae6026cca5f4fd7c30 (patch)
tree9c0dad990fc3431a4424894468de6a4b3c1ea686
parent64fc7b373b02388258599d9241a7aee4857c124e (diff)
downloadlombok-5f198d71c684c6a2f1eec9ae6026cca5f4fd7c30.tar.gz
lombok-5f198d71c684c6a2f1eec9ae6026cca5f4fd7c30.tar.bz2
lombok-5f198d71c684c6a2f1eec9ae6026cca5f4fd7c30.zip
Add setterPrefix to Builder annotation
-rw-r--r--src/core/lombok/Builder.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/core/lombok/Builder.java b/src/core/lombok/Builder.java
index dfa5ecb5..d7fe42a1 100644
--- a/src/core/lombok/Builder.java
+++ b/src/core/lombok/Builder.java
@@ -153,6 +153,16 @@ public @interface Builder {
* @return The builder class will be generated with this access modifier.
*/
AccessLevel access() default lombok.AccessLevel.PUBLIC;
+
+ /**
+ * Prefix to prepend to set methods in the generated builder class. By default, generated methods to not include a
+ * prefix. If this value populated, the first letter of the generated method name will be capitalized.
+ *
+ * For example, a method normally generated as {@code someField(String someField)} would instead be generated as {@code withSomeField(String someField)}
+ *
+ * @return The prefix to prepend to generated method names.
+ */
+ String setterPrefix() default "";
/**
* Put on a field (in case of {@code @Builder} on a type) or a parameter (for {@code @Builder} on a constructor or static method) to