aboutsummaryrefslogtreecommitdiff
path: root/website2/templates/features/data.html
diff options
context:
space:
mode:
authorReinier Zwitserloot <reinier@zwitserloot.com>2017-01-06 01:21:28 +0100
committerReinier Zwitserloot <reinier@zwitserloot.com>2017-05-29 21:01:53 +0200
commita24bf3194477a841c905827ef625e19b0fd53b2a (patch)
treee0cf9ef16bd9f8cac8b7953e193980beff9d733e /website2/templates/features/data.html
parentbb85d799b3ba549c8a29afab0b246cb13b10507a (diff)
downloadlombok-a24bf3194477a841c905827ef625e19b0fd53b2a.tar.gz
lombok-a24bf3194477a841c905827ef625e19b0fd53b2a.tar.bz2
lombok-a24bf3194477a841c905827ef625e19b0fd53b2a.zip
feature pages updated and made more consistent.
Diffstat (limited to 'website2/templates/features/data.html')
-rw-r--r--website2/templates/features/data.html2
1 files changed, 1 insertions, 1 deletions
diff --git a/website2/templates/features/data.html b/website2/templates/features/data.html
index d018ae72..59370cc8 100644
--- a/website2/templates/features/data.html
+++ b/website2/templates/features/data.html
@@ -7,7 +7,7 @@
<p>
<code>@Data</code> is a convenient shortcut annotation that bundles the features of <a href="/features/ToString"><code>@ToString</code></a>, <a href="/features/EqualsAndHashCode"><code>@EqualsAndHashCode</code></a>, <a href="/features/GetterSetter"><code>@Getter</code> / <code>@Setter</code></a> and <a href="/features/constructor"><code>@RequiredArgsConstructor</code></a> 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, and a constructor that initializes all final fields, as well as all non-final fields with no initializer that have been marked with <code>@NonNull</code>, in order to ensure the field is never null.
</p><p>
- <code>@Data</code> is like having implicit <code>@Getter</code>, <code>@Setter</code>, <code>@ToString</code>, <code>@EqualsAndHashCode</code> and <code>@RequiredArgsConstructor</code> annotations on the class. However, the parameters of these annotations (such as <code>callSuper</code>, <code>includeFieldNames</code> and <code>exclude</code>) cannot be set with <code>@Data</code>. If you need to set non-default values for any of these parameters, just add those annotations explicitly; <code>@Data</code> is smart enough to defer to those annotations.
+ <code>@Data</code> is like having implicit <code>@Getter</code>, <code>@Setter</code>, <code>@ToString</code>, <code>@EqualsAndHashCode</code> and <code>@RequiredArgsConstructor</code> annotations on the class (except that no constructor will be generated if any explicitly written constructors already exist). However, the parameters of these annotations (such as <code>callSuper</code>, <code>includeFieldNames</code> and <code>exclude</code>) cannot be set with <code>@Data</code>. If you need to set non-default values for any of these parameters, just add those annotations explicitly; <code>@Data</code> is smart enough to defer to those annotations.
</p><p>
All generated getters and setters will be <code>public</code>. To override the access level, annotate the field or class with an explicit <code>@Setter</code> and/or <code>@Getter</code> annotation. You can also use this annotation (by combining it with <code>AccessLevel.NONE</code>) to suppress generating a getter and/or setter altogether.
</p><p>