diff options
Diffstat (limited to 'website/features/ToString.html')
-rw-r--r-- | website/features/ToString.html | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/website/features/ToString.html b/website/features/ToString.html index 0ed142a1..2b1d7b33 100644 --- a/website/features/ToString.html +++ b/website/features/ToString.html @@ -21,8 +21,8 @@ By setting the <code>includeFieldNames</code> parameter to <em>true</em> you can add some clarity (but also quite some length) to the output of the <code>toString()</code> method. </p><p> - All non-static fields will be printed. If you want to skip some fields, you can name them in the <code>exclude</code> parameter; each named - field will not be printed at all. + By default, all non-static fields will be printed. If you want to skip some fields, you can name them in the <code>exclude</code> parameter; each named + field will not be printed at all. Alternatively, you can specify exactly which fields you wish to be used by naming them in the <code>of</code> parameter. </p><p> By setting <code>callSuper</code> to <em>true</em>, you can include the output of the superclass implementation of <code>toString</code> to the output. Be aware that the default implementation of <code>toString()</code> in <code>java.lang.Object</code> is pretty much meaningless, so you @@ -53,8 +53,12 @@ Attempting to exclude fields that don't exist or would have been excluded anyway (because they are static) results in warnings on the named fields. You therefore don't have to worry about typos. </p><p> + Having both <code>exclude</code> and <code>of</code> generates a warning; the <code>exclude</code> parameter will be ignored in that case. + </p><p> We don't promise to keep the output of the generated <code>toString()</code> methods the same between lombok versions. You should never design your API so that other code is forced to parse your <code>toString()</code> output anyway! + </p><p> + By default, any variables that start with a $ symbol are excluded automatically. You can only include them by using the 'of' parameter. </p> </div> </div> |