aboutsummaryrefslogtreecommitdiff
path: root/src/lombok/Data.java
diff options
context:
space:
mode:
authorReinier Zwitserloot <reinier@tipit.to>2009-07-11 11:39:45 +0200
committerReinier Zwitserloot <reinier@tipit.to>2009-07-11 11:39:45 +0200
commit12d44e59c57e4654a7c61f83baf606a39fbb8448 (patch)
tree03b8666b54830420020fa1697c9a52b22038b0d0 /src/lombok/Data.java
parent98382c6640798846efcc11113116cb46fb820595 (diff)
downloadlombok-12d44e59c57e4654a7c61f83baf606a39fbb8448.tar.gz
lombok-12d44e59c57e4654a7c61f83baf606a39fbb8448.tar.bz2
lombok-12d44e59c57e4654a7c61f83baf606a39fbb8448.zip
'fixed' data up a bit by including only the final fields for the constructor.
Also fixed a bug in javac's toString() generation for the @Data constructor. It did not include the transient fields.
Diffstat (limited to 'src/lombok/Data.java')
-rw-r--r--src/lombok/Data.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lombok/Data.java b/src/lombok/Data.java
index 7d010e81..fa424c24 100644
--- a/src/lombok/Data.java
+++ b/src/lombok/Data.java
@@ -33,6 +33,10 @@ import java.lang.annotation.Target;
* If any method to be generated already exists (in name - the return type or parameters are not relevant), then
* that method will not be generated by the Data annotation.
* <p>
+ * The generated constructor will have 1 parameter for each final field. The generated toString will print all fields,
+ * while the generated hashCode and equals take into account all non-transient fields.<br>
+ * Static fields are skipped (no getter or setter, and they are not included in toString, equals, hashCode, or the constructor).
+ * <p>
* <code>toString</code>, <code>equals</code>, and <code>hashCode</code> use the deepX variants in the
* <code>java.util.Arrays</code> utility class. Therefore, if your class has arrays that contain themselves,
* these methods will just loop endlessly until the inevitable <code>StackOverflowError</code>. This behaviour