aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorReinier Zwitserloot <reinier@tipit.to>2009-09-01 00:19:28 +0200
committerReinier Zwitserloot <reinier@tipit.to>2009-09-01 00:19:28 +0200
commitcb091204f4bfc7f9971fc296903f7bc2a163f085 (patch)
tree270381198a678b4380be43f7bf142af6dd966e8f
parent72cc800fd0c3e122a71a42536d5ced5297d6fa4e (diff)
downloadlombok-cb091204f4bfc7f9971fc296903f7bc2a163f085.tar.gz
lombok-cb091204f4bfc7f9971fc296903f7bc2a163f085.tar.bz2
lombok-cb091204f4bfc7f9971fc296903f7bc2a163f085.zip
Fixed documentation, specifically: added eclipse help system fix to the changelog, and added some documentation on the special handling of @NonNull/@NotNull/@Nullable for Data and Getter/Setter on the website docs.
-rw-r--r--doc/changelog.markdown3
-rw-r--r--website/features/Data.html9
-rw-r--r--website/features/GetterSetter.html4
3 files changed, 14 insertions, 2 deletions
diff --git a/doc/changelog.markdown b/doc/changelog.markdown
index 58d6957a..6ffc14cc 100644
--- a/doc/changelog.markdown
+++ b/doc/changelog.markdown
@@ -3,8 +3,9 @@ Lombok Changelog
### v0.8.4
+* Fixed the problem where eclipse's help system did not start up on lombokized eclipses. [Issue #26](http://code.google.com/p/projectlombok/issues/detail?id=26)
* All generated methods now make their parameters (if they have any) final. This should help avoid problems with the 'make all parameters final' save action in eclipse. [Issue #40](http://code.google.com/p/projectlombok/issues/detail?id=40)
-* Okay, this time _really_ added support for @NonNull and @NotNull annotations. It was reported for v0.8.3 but it wasn't actually in that release. @Nullable annotations are now also copied over to the getter's return type and the setter and constructor's parameters (but, obviously, no check is added).
+* Okay, this time _really_ added support for @NonNull and @NotNull annotations. It was reported for v0.8.3 but it wasn't actually in that release. @Nullable annotations are now also copied over to the getter's return type and the setter and constructor's parameters (but, obviously, no check is added). Any @NonNull annotated non-final fields that are not initialized are now also added to the generated constructor by @Data in order to ensure via an explicit null check that they contain a legal value.
* @ToString (and hence, @Data) now default to includeFieldNames=true. [Issue #35](http://code.google.com/p/projectlombok/issues/detail?id=35)
### v0.8.3
diff --git a/website/features/Data.html b/website/features/Data.html
index 19eacdd8..9216d46e 100644
--- a/website/features/Data.html
+++ b/website/features/Data.html
@@ -22,7 +22,8 @@
together: In other words, <code>@Data</code> generates <em>all</em> the boilerplate that is normally associated with simple POJOs
(Plain Old Java Objects) and beans: getters for all fields, setters for all non-final fields, and appropriate <code>toString</code>, <code>equals</code>
and <code>hashCode</code> implementations that involve the fields of the class. In addition, <code>@Data</code> generates a constructor that
- initialized all final fields.
+ initializes all final fields, as well as all non-final fields with no initializer that have been marked with <code>@NonNull</code> or <code>@NotNull</code>,
+ in order to ensure the field is never null.
</p><p>
<code>@Data</code> is like having implicit <code>@ToString</code> and <code>@EqualsAndHashCode</code> annotations on the class.
However, the parameters of <code>@ToString</code> and <code>@EqualsAndHashCode</code> (such as <code>callSuper</code>, <code>includeFieldNames</code> and
@@ -62,6 +63,12 @@
<h3>Small print</h3><div class="smallprint">
<p>See the small print of <a href="ToString.html"><code>@ToString</code></a>, <a href="EqualsAndHashCode.html"><code>@EqualsAndHashCode</code></a> and
<a href="GetterSetter.html"><code>@Getter / @Setter</code></a>.
+ </p><p>
+ Any annotations named <code>@NonNull</code> or <code>@NotNull</code> (case insensitive) on a field are interpreted as: This field must not ever hold
+ <em>null</em>. Therefore, these annotations result in an explicit null check in the generated constructor for the provided field. Also, these
+ annotations (as well as any annotation named <code>@Nullable</code>) are copied to the constructor parameter, in both the true constructor and
+ any static constructor. The same principle applies to generated getters and setters (see the documentation for <a href="GetterSetter.html">@Getter / @Setter</a>)
+ </p>
</div>
</div>
<div class="footer">
diff --git a/website/features/GetterSetter.html b/website/features/GetterSetter.html
index 2ad0f1ec..618a6b0a 100644
--- a/website/features/GetterSetter.html
+++ b/website/features/GetterSetter.html
@@ -51,6 +51,10 @@
</p><p>
Any variation on <code>boolean</code> will <em>not</em> result in using the <code>is</code> prefix instead of the <code>get</code> prefix; for example,
returning <code>java.lang.Boolean</code> results in a <code>get</code> prefix, not an <code>is</code> prefix.
+ </p><p>
+ Any annotations named <code>@NonNull</code> or <code>@NotNull</code> (case insensitive) on the field are interpreted as: This field must not ever hold
+ <em>null</em>. Therefore, these annotations result in an explicit null check in the generated setter. Also, these
+ annotations (as well as any annotation named <code>@Nullable</code>) are copied to setter parameter and getter method
</p>
</div>
</div>