aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorReinier Zwitserloot <reinier@tipit.to>2009-06-23 05:56:00 +0200
committerReinier Zwitserloot <reinier@tipit.to>2009-06-23 05:56:00 +0200
commit794801c3c9dc4f62906ac5d493b5e60473a91c47 (patch)
tree3f56840eb831c874c78a115a59aa46dd964ae2e2
parentfdde039d2354d01481f22ebadf83f552d6cf9f50 (diff)
downloadlombok-794801c3c9dc4f62906ac5d493b5e60473a91c47.tar.gz
lombok-794801c3c9dc4f62906ac5d493b5e60473a91c47.tar.bz2
lombok-794801c3c9dc4f62906ac5d493b5e60473a91c47.zip
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.
-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;
}