From 794801c3c9dc4f62906ac5d493b5e60473a91c47 Mon Sep 17 00:00:00 2001 From: Reinier Zwitserloot Date: Tue, 23 Jun 2009 05:56:00 +0200 Subject: Removed the equalsPrime thing, because that's just needlessly putting implementation details in there. If switching primes is so important, hash the type name and turn that into a prime, or something. Also added some javadoc. --- src/lombok/Data.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'src') 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: + * + *
+	 *     public @Data(staticConstructor = "of") class Point { final int x, y; }
+	 * 
+ * + * Default: No static constructor, instead the normal constructor is public. + */ String staticConstructor() default ""; - int hashCodePrime() default 31; } -- cgit