aboutsummaryrefslogtreecommitdiff
path: root/website
diff options
context:
space:
mode:
Diffstat (limited to 'website')
-rw-r--r--website/extra/htaccess54
-rw-r--r--website/templates/_scaffold.html2
-rw-r--r--website/templates/features/Builder.html21
-rw-r--r--website/templates/features/experimental/FieldNameConstants.html22
-rw-r--r--website/templates/setup/gradle.html2
-rw-r--r--website/usageExamples/LogExample_post.jpage2
-rw-r--r--website/usageExamples/LogExample_pre.jpage2
7 files changed, 63 insertions, 42 deletions
diff --git a/website/extra/htaccess b/website/extra/htaccess
index 2d5b6b2a..f2abad2d 100644
--- a/website/extra/htaccess
+++ b/website/extra/htaccess
@@ -4,62 +4,62 @@ RewriteRule ^$ /main.html [L,END]
RewriteRule ^(index|home)(\.html)?$ / [NC,R=301]
RewriteRule ^setup/overview$ /setup/main.html [L,END]
-RewriteRule ^setup/main(\.html)?$ /setup/overview [NC,R=301]
-RewriteRule ^setup/index(\.html)?$ /setup/overview [NC,R=301]
-RewriteRule ^setup(/(overview)?)?$ /setup/overview [NC,R=301]
+RewriteRule ^setup/main(\.html)?/?$ /setup/overview [NC,R=301]
+RewriteRule ^setup/index(\.html)?/?$ /setup/overview [NC,R=301]
+RewriteRule ^setup(/(overview/?)?)?$ /setup/overview [NC,R=301]
RewriteRule ^changelog$ /changelog.html [L,END]
-RewriteRule ^changelog(\.html)?$ /changelog [NC,R=301]
+RewriteRule ^changelog(\.html)?/?$ /changelog [NC,R=301]
RewriteRule ^credits$ /credits.html [L,END]
-RewriteRule ^credits(\.html)?$ /credits [NC,R=301]
+RewriteRule ^credits(\.html)?/?$ /credits [NC,R=301]
RewriteRule ^download$ /download.html [L,END]
-RewriteRule ^download(\.html)?$ /download [NC,R=301]
+RewriteRule ^download(\.html)?/?$ /download [NC,R=301]
RewriteRule ^download-edge$ /download-edge.html [L,END]
-RewriteRule ^download-edge(\.html)?$ /download-edge [NC,R=301]
+RewriteRule ^download-edge(\.html)?/?$ /download-edge [NC,R=301]
RewriteRule ^all-versions$ /all-versions.html [L,END]
-RewriteRule ^all-versions(\.html)?$ /all-versions [NC,R=301]
+RewriteRule ^all-versions(\.html)?/?$ /all-versions [NC,R=301]
RewriteRule ^all-versions$ /all-versions.html [L,END]
-RewriteRule ^all-versions(\.html)?$ /all-versions [NC,R=301]
+RewriteRule ^all-versions(\.html)?/?$ /all-versions [NC,R=301]
RewriteRule ^disable-checked-exceptions$ /disable-checked-exceptions.html [L,END]
-RewriteRule ^disable-checked-exceptions(\.html)?$ /disable-checked-exceptions [NC,R=301]
+RewriteRule ^disable-checked-exceptions(\.html)?/?$ /disable-checked-exceptions [NC,R=301]
RewriteRule ^supporters$ /supporters.html [L,END]
-RewriteRule ^supporters(.html)?$ /supporters [NC,R=301]
+RewriteRule ^supporters(.html)?/?$ /supporters [NC,R=301]
RewriteRule ^order-license-info$ /order-license-info.html [L,END]
-RewriteRule ^order-?license-?info(.html)?$ /order-license-info [NC,R=301]
+RewriteRule ^order-?license-?info(.html)?/?$ /order-license-info [NC,R=301]
RewriteRule ^order-license$ /order-license.html [L,END]
-RewriteRule ^order-?license(.html)?$ /order-license [NC,R=301]
+RewriteRule ^order-?license(.html)?/?$ /order-license [NC,R=301]
RewriteRule ^contributing/index$ /contributing/index.html [L,END]
-RewriteRule ^contributing(\.html)?$ /contributing/index [NC,R=301]
-RewriteRule ^contributing/index(\.html)?$ /contributing/index [NC,R=301]
+RewriteRule ^contributing(\.html)?/?$ /contributing/index [NC,R=301]
+RewriteRule ^contributing/index(\.html)?/?$ /contributing/index [NC,R=301]
RewriteRule ^contributing/contributing$ /contributing/contributing.html [L,END]
-RewriteRule ^contributing/contributing(\.html)?$ /contributing/contributing [NC,R=301]
+RewriteRule ^contributing/contributing(\.html)?/?$ /contributing/contributing [NC,R=301]
RewriteRule ^contributing/lombok-execution-path$ /contributing/lombok-execution-path.html [L,END]
-RewriteRule ^contributing/lombok-execution-path(\.html)?$ /contributing/lombok-execution-path [NC,R=301]
+RewriteRule ^contributing/lombok-execution-path(\.html)?/?$ /contributing/lombok-execution-path [NC,R=301]
<#list setupPages as pg>
RewriteRule ^setup/${pg?no_esc}$ /setup/${pg?no_esc}.html [L,END]
-RewriteRule ^setup/${pg?no_esc}(\.html)?$ /setup/${pg?no_esc} [NC,R=301]
+RewriteRule ^setup/${pg?no_esc}(\.html)?/?$ /setup/${pg?no_esc} [NC,R=301]
</#list>
RewriteRule ^features/all$ /features/index.html [L,END]
-RewriteRule ^features(/all)?$ /features/all [NC,R=301]
-RewriteRule ^features/index(\.html)?$ /features/all [NC,R=301]
+RewriteRule ^features(/all)?/?$ /features/all [NC,R=301]
+RewriteRule ^features/index(\.html)?/?$ /features/all [NC,R=301]
<#list featurePages as pg>
RewriteRule ^features/${pg?no_esc}$ /features/${pg?no_esc}.html [L,END]
-RewriteRule ^features/${pg?no_esc}(\.html)?$ /features/${pg?no_esc} [NC,R=301]
+RewriteRule ^features/${pg?no_esc}(\.html)?/?$ /features/${pg?no_esc} [NC,R=301]
</#list>
-RewriteRule ^features/experimental/Builder(\.html)?$ /features/Builder [NC,R=301]
-RewriteRule ^features/experimental/Value(\.html)?$ /features/Value [NC,R=301]
-RewriteRule ^features/experimental/var(\.html)?$ /features/var [NC,R=301]
+RewriteRule ^features/experimental/Builder(\.html)?/?$ /features/Builder [NC,R=301]
+RewriteRule ^features/experimental/Value(\.html)?/?$ /features/Value [NC,R=301]
+RewriteRule ^features/experimental/var(\.html)?/?$ /features/var [NC,R=301]
RewriteRule ^features/experimental/all$ /features/experimental/index.html [L,END]
-RewriteRule ^features/experimental(/all)?$ /features/experimental/all [NC,R=301]
-RewriteRule ^features/experimental/index(\.html)?$ /features/experimental/all [NC,R=301]
+RewriteRule ^features/experimental(/all)?/?$ /features/experimental/all [NC,R=301]
+RewriteRule ^features/experimental/index(\.html)?/?$ /features/experimental/all [NC,R=301]
<#list experimentalPages as pg>
RewriteRule ^features/experimental/${pg?no_esc}$ /features/experimental/${pg?no_esc}.html [L,END]
-RewriteRule ^features/experimental/${pg?no_esc}(\.html)?$ /features/experimental/${pg?no_esc} [NC,R=301]
+RewriteRule ^features/experimental/${pg?no_esc}(\.html)?/?$ /features/experimental/${pg?no_esc} [NC,R=301]
</#list>
diff --git a/website/templates/_scaffold.html b/website/templates/_scaffold.html
index 7acfb6b6..65b2fb7f 100644
--- a/website/templates/_scaffold.html
+++ b/website/templates/_scaffold.html
@@ -111,7 +111,7 @@ ga('send', 'pageview');
</a>
</li>
<li class="dropdown">
- <a href="/setup/overview" class="smallOnly"><span>Install</span></a>
+ <a href="/setup/overview" class="smallOnly"><span>How to use</span></a>
<a class="dropdown-toggle pointer wideOnly" data-toggle="dropdown">Install<span class="caret"></span></a>
<ul class="dropdown-menu" aria-labelledby="themes">
<#list setupTargets as cat, tgtList>
diff --git a/website/templates/features/Builder.html b/website/templates/features/Builder.html
index 4693d222..bc03749e 100644
--- a/website/templates/features/Builder.html
+++ b/website/templates/features/Builder.html
@@ -129,6 +129,27 @@
</p>
</@f.featureSection>
+ <@f.featureSection>
+ <h3 id="jackson"><a name="jackson">With Jackson</a></h3>
+ <p>
+ You can customize parts of your builder, for example adding another method to the builder class, or annotating a method in the builder class, by making the builder class yourself. Lombok will generate everything that you do not manually add, and put it into this builder class. For example, if you are trying to configure <a href="https://github.com/FasterXML/jackson">jackson</a> to use a specific subtype for a collection, you can write something like:<div class="snippet"><div class="java" align="left"><pre>
+@Value @Builder
+@JsonDeserialize(builder = JacksonExample.JacksonExampleBuilder.class)
+public class JacksonExample {
+ @Singular private List&lt;Foo&gt; foos;
+
+ @JsonPOJOBuilder(withPrefix = "")
+ public static class JacksonExampleBuilder implements JacksonExampleBuilderMeta {
+ }
+
+ private interface JacksonExampleBuilderMeta {
+ @JsonDeserialize(contentAs = FooImpl.class) JacksonExampleBuilder foos(List&lt;? extends Foo&gt; foos)
+ }
+}
+</pre></div></div>
+ </p>
+ </@f.featureSection>
+
<@f.snippets name="Builder" />
<@f.confKeys>
diff --git a/website/templates/features/experimental/FieldNameConstants.html b/website/templates/features/experimental/FieldNameConstants.html
index c5e57195..a6fac99d 100644
--- a/website/templates/features/experimental/FieldNameConstants.html
+++ b/website/templates/features/experimental/FieldNameConstants.html
@@ -4,6 +4,8 @@
<@f.history>
<p>
@FieldNameConstants was introduced as experimental feature in lombok v1.16.22.
+ </p><p>
+ @FieldNameConstants was redesigned in lombok v1.18.4.
</p>
</@f.history>
@@ -18,11 +20,11 @@
<@f.overview>
<p>
- The <code>@FieldNameConstants</code> annotation generates string constants (fields marked <code>public static final</code>, of type <code>java.lang.String</code>) containing the field's name, as a string. This is useful for various marshalling and serialization frameworks. The constant field by default is named <code>FIELD_<em>NAME_OF_FIELD</em></code>, where <em>NAME_OF_FIELD</em> is the same name as the field it represents, except with all uppercase letters, with underscores in front of the uppercase letters in the original field. The prefix (and suffix) is configurable on the <code>@FieldNameConstants</code> annotation.
+ The <code>@FieldNameConstants</code> annotation generates an inner type which contains 1 constant for each field in your class; either string constants (fields marked <code>public static final</code>, of type <code>java.lang.String</code>) or if you prefer, an enum type with 1 value for each field. <code>@FieldNameConstants</code> is useful for various marshalling and serialization frameworks. The constant field (whether enum value or string constant) always has the exact same name as the field, capitalization and all.
</p><p>
- The <code>public</code> access modifier can be changed via the parameter <code>level = AccessLevel.PACKAGE</code> for example. You can force a field to be skipped by supplying <code>level = AccessLevel.NONE</code>.
+ The generated inner type is by default called <code>Fields</code> and is <code>public</code>. You can modify this via <code>@FieldNameConstants(innerTypeName = "FieldNames", access = AccessLevel.PACKAGE)</code> for example. The default inner type name can also be modified via configuration key <code>lombok.fieldNameConstants.innerTypeName</code>. The generated fields are always <code>public</code>.
</p><p>
- Can be applied to classes (in which case every field gets a constant), or to an individual field.
+ Must be applied to classes (or enums, though you'd rarely want to do that). By default includes all non-transient, non-static fields. You can use <code>@FieldNameConstants.Include</code> in fields + <code>@FieldNameConstants(onlyExplicitlyIncluded = true)</code>, or <code>@FieldNameConstants.Exclude</code> for more fine-grained control.
</p>
</@f.overview>
@@ -34,21 +36,19 @@
</dt><dd>
Lombok will flag any usage of <code>@FieldDefaults</code> as a warning or error if configured.
</dd><dt>
- <code>lombok.fieldNameConstants.prefix</code> = <em>a string</em> (default: 'PREFIX_')
- </dt><dd>
- Lombok will generate the name for each fieldconstant by constant-casing the field name and then prefixing this string to the result.
- </dd><dt>
- <code>lombok.fieldNameConstants.suffix</code> = <em>a string</em> (default: '' - the blank string)
+ <code>lombok.fieldNameConstants.innerTypeName</code> = <em>a string</em> (default: 'Fields')
</dt><dd>
- Lombok will generate the name for each fieldconstant by constant-casing the field name and then suffixing this string to the result.
+ The name of the inner type generated by lombok can be controlled with this configuration key.
</dd>
</@f.confKeys>
<@f.smallPrint>
<p>
- Like other lombok handlers that touch fields, any field whose name starts with a dollar (<code>$</code>) symbol is skipped entirely. Such a field will not be modified at all. Static fields are also skipped.
+ From lombok v1.16.22 to lombok v1.18.2, this feature generated constants inside the type directly; the name of these fields would for example turn field <code>exampleFieldName</code> into <code>public static final String FIELD_EXAMPLE_FIELD_NAME = "exampleFieldName";</code>. The prefix and suffix (here, <code>FIELD_</code>, and the empty string) were configurable. Starting with lombok v1.18.4 this feature has been redesigned into generating an inner type as described above.
+ </p><p>
+ Any parameters of lombok annotations that take strings need to be supplied actual string literals; you cannot have references to constants like those generated by <code>@FieldNameConstants</code>. If you'd like to use <code>@FieldNameConstants</code> to for example fill in the <code>of</code> and/or <code>exclude</code> parameters of <code>@ToString</code> and similar lombok annotations, use the <code>@ToString.Include</code> / <code>@ToString.Exclude</code> etc system instead; these are described at the feature pages for those features.
</p><p>
- The annotation can itself be used to set prefix/suffix. If you do so, it overrides the <code>lombok.fieldNameConstants.prefix/suffix</code> config key. Example: <code>@FieldNameConstants(prefix = "")</code>: This would generate for field <code>helloWorld</code> a constant named <code>HELLO_WORLD</code> instead of the default <code>FIELD_HELLO_WORLD</code>.
+ Like other lombok handlers that touch fields, any field whose name starts with a dollar (<code>$</code>) symbol is skipped entirely. Such a field will not be modified at all. Static fields are also skipped.
</p>
</@f.smallPrint>
</@f.scaffold>
diff --git a/website/templates/setup/gradle.html b/website/templates/setup/gradle.html
index 7cb4af0d..41d90dcc 100644
--- a/website/templates/setup/gradle.html
+++ b/website/templates/setup/gradle.html
@@ -15,7 +15,7 @@
</p><p>
Note, to tell the <code>gradle-lombok</code> plugin to use the latest version of lombok, you need to explicitly tell it about the latest version number and the SHA-256. For our current latest version, put this in your <code>build.gradle</code> file:<pre>
lombok {
- version = ${version}
+ version = '${version}'
sha256 = ""
}</pre>
</p>
diff --git a/website/usageExamples/LogExample_post.jpage b/website/usageExamples/LogExample_post.jpage
index eab3b046..78c0fdd9 100644
--- a/website/usageExamples/LogExample_post.jpage
+++ b/website/usageExamples/LogExample_post.jpage
@@ -2,7 +2,7 @@ public class LogExample {
private static final java.util.logging.Logger log = java.util.logging.Logger.getLogger(LogExample.class.getName());
public static void main(String... args) {
- log.error("Something's wrong here");
+ log.severe("Something's wrong here");
}
}
diff --git a/website/usageExamples/LogExample_pre.jpage b/website/usageExamples/LogExample_pre.jpage
index ba27dd27..9fa1e91c 100644
--- a/website/usageExamples/LogExample_pre.jpage
+++ b/website/usageExamples/LogExample_pre.jpage
@@ -5,7 +5,7 @@ import lombok.extern.slf4j.Slf4j;
public class LogExample {
public static void main(String... args) {
- log.error("Something's wrong here");
+ log.severe("Something's wrong here");
}
}