aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lombok/Data.java12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/lombok/Data.java b/src/lombok/Data.java
index e985a28a..f9b02b52 100644
--- a/src/lombok/Data.java
+++ b/src/lombok/Data.java
@@ -8,6 +8,16 @@ import java.lang.annotation.Target;
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.SOURCE)
public @interface Data {
+ /**
+ * If you specify a static constructor name, then the generated constructor will be private, and
+ * instead a static factory method is created that other classes can use to create instances.
+ * We suggest the name: "of", like so:
+ *
+ * <pre>
+ * public @Data(staticConstructor = "of") class Point { final int x, y; }
+ * </pre>
+ *
+ * Default: No static constructor, instead the normal constructor is public.
+ */
String staticConstructor() default "";
- int hashCodePrime() default 31;
}