aboutsummaryrefslogtreecommitdiff
path: root/website/features/Value.html
diff options
context:
space:
mode:
authorReinier Zwitserloot <reinier@zwitserloot.com>2014-06-01 11:02:18 +0200
committerReinier Zwitserloot <reinier@zwitserloot.com>2014-06-01 11:02:18 +0200
commitf8b3056dc4f61251aba7adf627c942c85e8618ca (patch)
tree8f58fc4d57d53cb791d027881fb8b8dd9cef11a1 /website/features/Value.html
parent627de194c03af3afa3478149dc777d2af4e9654b (diff)
downloadlombok-f8b3056dc4f61251aba7adf627c942c85e8618ca.tar.gz
lombok-f8b3056dc4f61251aba7adf627c942c85e8618ca.tar.bz2
lombok-f8b3056dc4f61251aba7adf627c942c85e8618ca.zip
Fixed up and extended Tolerate with support for constructors, and added docs.
Diffstat (limited to 'website/features/Value.html')
-rw-r--r--website/features/Value.html4
1 files changed, 2 insertions, 2 deletions
diff --git a/website/features/Value.html b/website/features/Value.html
index 09557c6a..50309689 100644
--- a/website/features/Value.html
+++ b/website/features/Value.html
@@ -27,11 +27,11 @@
<code>@Value</code> is the immutable variant of <a href="Data.html"><code>@Data</code></a>; all fields are made <code>private</code> and <code>final</code> by default, and setters are not generated. The class itself is also made <code>final</code> by default, because immutability is not something that can be forced onto a subclass. Like <code>@Data</code>, useful <code>toString()</code>, <code>equals()</code> and <code>hashCode()</code> methods are also generated, each field gets a getter method, and a constructor that covers every
argument (except <code>final</code> fields that are initialized in the field declaration) is also generated.
</p><p>
- In practice, <code>@Value</code> is shorthand for: <code>final @ToString @EqualsAndHashCode @AllArgsConstructor @FieldDefaults(makeFinal = true, level = AccessLevel.PRIVATE) @Getter</code>, except that explicitly including an implementation of any of the relevant methods simply means that part won't be generated and no warning will be emitted. For example, if you write your own <code>toString</code>, no error occurs, and lombok will not generate a <code>toString</code>. Also, <em>any</em> explicit constructor, no matter the arguments list, implies lombok will not generate a constructor. If you do want lombok to generate the all-args constructor, add <code>@AllArgsConstructor</code> to the class.
+ In practice, <code>@Value</code> is shorthand for: <code>final @ToString @EqualsAndHashCode @AllArgsConstructor @FieldDefaults(makeFinal = true, level = AccessLevel.PRIVATE) @Getter</code>, except that explicitly including an implementation of any of the relevant methods simply means that part won't be generated and no warning will be emitted. For example, if you write your own <code>toString</code>, no error occurs, and lombok will not generate a <code>toString</code>. Also, <em>any</em> explicit constructor, no matter the arguments list, implies lombok will not generate a constructor. If you do want lombok to generate the all-args constructor, add <code>@AllArgsConstructor</code> to the class. You can mark any constructor or method with <code>@lombok.experimental.Tolerate</code> to hide them from lombok.
</p><p>
It is possible to override the final-by-default and private-by-default behaviour using either an explicit access level on a field, or by using the <code>@NonFinal</code> or <code>@PackagePrivate</code> annotations.<br />
It is possible to override any default behaviour for any of the 'parts' that make up <code>@Value</code> by explicitly using that annotation.
- </p>
+ </p>
</div>
<div class="snippets">
<div class="pre">