aboutsummaryrefslogtreecommitdiff
path: root/website
diff options
context:
space:
mode:
Diffstat (limited to 'website')
-rw-r--r--website/features/Constructor.html2
-rw-r--r--website/features/Data.html2
-rw-r--r--website/features/Log.html9
-rw-r--r--website/features/Value.html2
-rw-r--r--website/index.html2
-rw-r--r--website/novideo.html2
6 files changed, 9 insertions, 10 deletions
diff --git a/website/features/Constructor.html b/website/features/Constructor.html
index cdd5b4e2..272df06e 100644
--- a/website/features/Constructor.html
+++ b/website/features/Constructor.html
@@ -22,7 +22,7 @@
fulfilled until those fields are properly initialized later. Certain java constructs, such as hibernate and the Service Provider Interface require a no-args constructor.
This annotation is useful primarily in combination with either <code>@Data</code> or one of the other constructor generating annotations.
</p><p>
- <code>@RequiredArgsConstructor</code> generates a constructor with 1 parameter for each field that requires special handling. All <code>final</code> fields get a parameter,
+ <code>@RequiredArgsConstructor</code> generates a constructor with 1 parameter for each field that requires special handling. All non-initialized <code>final</code> fields get a parameter,
as well as any fields that are marked as <code>@NonNull</code> that aren't initialized where they are declared. For those fields marked with <code>@NonNull</code>, an explicit
null check is also generated. The constructor will throw a <code>NullPointerException</code> if any of the parameters intended for the fields marked with <code>@NonNull</code>
contain <code>null</code>. The order of the parameters match the order in which the fields appear in your class.
diff --git a/website/features/Data.html b/website/features/Data.html
index ad3aa892..4d6e5609 100644
--- a/website/features/Data.html
+++ b/website/features/Data.html
@@ -38,7 +38,7 @@
</p><p>
If the class already contains a method with the same name as any method that would normally be generated, that method is not generated, and no warning or
error is emitted. For example, if you already have a method with signature <code>void hashCode(int a, int b, int c)</code>, no <code>int hashCode()</code>
- method will be generated, even though technically <code>int hashCode()</code> is an entirely different method. The same rule applies to the constructor,
+ method will be generated, even though technically <code>int hashCode()</code> is an entirely different method. The same rule applies to the constructor (any explicit constructor will prevent <code>@Data</code> from generating one),
<code>toString</code>, <code>equals</code>, and all getters and setters.
</p><p>
<code>@Data</code> can handle generics parameters for fields just fine. In order to reduce the boilerplate when constructing objects for classes with
diff --git a/website/features/Log.html b/website/features/Log.html
index 2d4fa375..bc9e017e 100644
--- a/website/features/Log.html
+++ b/website/features/Log.html
@@ -31,8 +31,10 @@
<dt><code>@Slf4j</code></dt>
<dd>Creates <code><span class="keyword">private&nbsp;static&nbsp;final&nbsp;</span><a href="http://www.slf4j.org/api/org/slf4j/Logger.html">org.slf4j.Logger</a>&nbsp;<span class="staticfield">log</span>&nbsp;=&nbsp;<a href="http://www.slf4j.org/apidocs/org/slf4j/LoggerFactory.html#getLogger(java.lang.Class)">org.slf4j.LoggerFactory.getLogger</a>(LogExample.<span class="keyword">class</span>);</code></dd>
<dt><code>@XSlf4j</code></dt>
- <dd>Creates <code><span class="keyword">private&nbsp;static&nbsp;final&nbsp;</span><a href="http://www.slf4j.org/api/org/slf4j/ext/XLogger.html">org.slf4j.ext.XLogger</a>&nbsp;<span class="staticfield">log</span>&nbsp;=&nbsp;<a href="http://www.slf4j.org/apidocs/org/slf4j/ext/XLoggerFactory.html#getXLogger(java.lang.Class)">org.slf4j.XLoggerFactory.getXLogger</a>(LogExample.<span class="keyword">class</span>);</code></dd>
+ <dd>Creates <code><span class="keyword">private&nbsp;static&nbsp;final&nbsp;</span><a href="http://www.slf4j.org/api/org/slf4j/ext/XLogger.html">org.slf4j.ext.XLogger</a>&nbsp;<span class="staticfield">log</span>&nbsp;=&nbsp;<a href="http://www.slf4j.org/apidocs/org/slf4j/ext/XLoggerFactory.html#getXLogger(java.lang.Class)">org.slf4j.ext.XLoggerFactory.getXLogger</a>(LogExample.<span class="keyword">class</span>);</code></dd>
</dl>
+ </p><p>
+ By default, the topic (or name) of the logger will be the class name of the class annotated with the <code>@Log</code> annotation. This can be customised by specifying the <code>topic</code> parameter. For example: <code>@XSlf4j(topic="reporting")</code>.
</p>
</div>
<div class="snippets">
@@ -52,10 +54,7 @@
<p>
If a field called <code>log</code> already exists, a warning will be emitted and no code will be generated.
</p><p>
- A future feature of lombok's diverse log annotations is to find calls to the logger field and, if the chosen logging framework supports
- it and the log level can be compile-time determined from the log call, guard it with an <code>if</code> statement. This way if
- the log statement ends up being ignored, the potentially expensive calculation of the log string is avoided entirely. This does mean
- that you should <em>NOT</em> put any side-effects in the expression that you log.
+ A future feature of lombok's diverse log annotations is to find calls to the logger field and, if the chosen logging framework supports it and the log level can be compile-time determined from the log call, guard it with an <code>if</code> statement. This way if the log statement ends up being ignored, the potentially expensive calculation of the log string is avoided entirely. This does mean that you should <em>NOT</em> put any side-effects in the expression that you log.
</p>
</div>
</div>
diff --git a/website/features/Value.html b/website/features/Value.html
index 6bbd6f2a..e5dc7d9e 100644
--- a/website/features/Value.html
+++ b/website/features/Value.html
@@ -27,7 +27,7 @@
<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>.
+ 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.
</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.
diff --git a/website/index.html b/website/index.html
index 97b51114..17b6ffc6 100644
--- a/website/index.html
+++ b/website/index.html
@@ -72,7 +72,7 @@
<p>
<strong>No video playback capabilities detected.</strong>
Why not download it instead?<br />
- <a href="videos/lombok.mov">MPEG4 / H.264 (Windows / Mac)</a> |
+ <a href="videos/lombok.mp4">MPEG4 / H.264 (Windows / Mac)</a> |
<a href="videos/lombok.ogv">Ogg Theora &amp; Vorbis ".ogv" (Linux)</a>
</p><p>
To play the video in the webpage, please do one of the following:
diff --git a/website/novideo.html b/website/novideo.html
index 5968fc91..8dc3feb1 100644
--- a/website/novideo.html
+++ b/website/novideo.html
@@ -27,7 +27,7 @@
<h1>Can't see the video?</h1>
<p>
Why not download it instead?<br />
- <a href="videos/lombok.mov">MPEG4 / H.264 (Windows / Mac)</a> |
+ <a href="videos/lombok.mp4">MPEG4 / H.264 (Windows / Mac)</a> |
<a href="videos/lombok.ogv">Ogg Theora &amp; Vorbis ".ogv" (Linux)</a>
</p><p>
If the video won't play on the webpage and you want it to, please do one of the following: