diff options
Diffstat (limited to 'website/templates')
-rw-r--r-- | website/templates/credits.html | 2 | ||||
-rw-r--r-- | website/templates/features/Builder.html | 9 | ||||
-rw-r--r-- | website/templates/features/Value.html | 2 | ||||
-rw-r--r-- | website/templates/features/configuration.html | 4 | ||||
-rw-r--r-- | website/templates/features/experimental/FieldNameConstants.html | 8 | ||||
-rw-r--r-- | website/templates/main.html | 2 | ||||
-rw-r--r-- | website/templates/presentations/7lessons.html | 25 |
7 files changed, 46 insertions, 6 deletions
diff --git a/website/templates/credits.html b/website/templates/credits.html index 3390d762..b5c033ad 100644 --- a/website/templates/credits.html +++ b/website/templates/credits.html @@ -29,6 +29,8 @@ </li><li> <strong>Tor Norbye</strong>, <strong>Jan Lahoda</strong>, and <strong>Petr Jiricka</strong> for helping out with Netbeans internals and/or javac. </li><li> + <strong>nqzero</strong> for the <a href="https://github.com/nqzero/permit-reflect">permit-reflect</a> library, whose ideas are also used in lombok. + </li><li> All contributors who submitted patches or helped answering questions!</li> </ul> diff --git a/website/templates/features/Builder.html b/website/templates/features/Builder.html index 0818f9d2..4fe416ee 100644 --- a/website/templates/features/Builder.html +++ b/website/templates/features/Builder.html @@ -12,6 +12,8 @@ <code>@Builder.Default</code> functionality was added in lombok v1.16.16. </p><p> <code>@Builder(builderMethodName = "")</code> is legal (and will suppress generation of the builder method) starting with lombok v1.18.8. + </p><p> + <code>@Builder(access = AccessLevel.PACKAGE)</code> is legal (and will generate the builder class, the builder method, etc with the indicated access level) starting with lombok v1.18.8. </p> </@f.history> @@ -64,10 +66,12 @@ The <em>builder()</em> method's name (default: <code>"builder"</code>) </li><li> If you want <code>toBuilder()</code> (default: no) + </li><li> + The access level of all generated elements (default: <code>public</code>). </li> </ul> Example usage where all options are changed from their defaults:<br /> - <code>@Builder(builderClassName = "HelloWorldBuilder", buildMethodName = "execute", builderMethodName = "helloWorld", toBuilder = true)</code><br /> + <code>@Builder(builderClassName = "HelloWorldBuilder", buildMethodName = "execute", builderMethodName = "helloWorld", toBuilder = true, access = AccessLevel.PRIVATE)</code><br /> </p> </@f.overview> @@ -194,6 +198,9 @@ public class JacksonExample { <code>builder</code> method if you just want this functionality, by using: <code>@Builder(toBuilder = true, builderMethodName = "")</code>. </p><p> Due to a peculiar way javac processes static imports, trying to do a non-star static import of the static <code>builder()</code> method won't work. Either use a star static import: `import static TypeThatHasABuilder.*;` or don't statically import the <code>builder</code> method. + </p><p> + If setting the access level to <code>PROTECTED</code>, all methods generated inside the builder class are actually generated as <code>public</code>; the meaning of the + <code>protected</code> keyword is different inside the inner class, and the precise behaviour that <code>PROTECTED</code> would indicate (access by any source in the same package is allowed, as well as any subclasses <em>from the outer class, marked with <code>@Builder</code></em> is not possible, and marking the inner members <code>public</code> is as close as we can get. </p> </@f.smallPrint> </@f.scaffold> diff --git a/website/templates/features/Value.html b/website/templates/features/Value.html index 5fe188b3..5d97a7b8 100644 --- a/website/templates/features/Value.html +++ b/website/templates/features/Value.html @@ -17,7 +17,7 @@ </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. 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 behavior 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 the final-by-default and private-by-default behavior using either an explicit access level on a field, or by using the <code>@NonFinal</code> or <code>@PackagePrivate</code> annotations. <code>@NonFinal</code> can also be used on a class to remove the final keyword. <br /> It is possible to override any default behavior for any of the 'parts' that make up <code>@Value</code> by explicitly using that annotation. </p> </@f.overview> diff --git a/website/templates/features/configuration.html b/website/templates/features/configuration.html index 7a15f252..bf224108 100644 --- a/website/templates/features/configuration.html +++ b/website/templates/features/configuration.html @@ -30,9 +30,9 @@ </dt><dd> If set to <code>true</code>, generated setters and getters will simply be named the same as the field name, without a <code>get</code> or <code>set</code> prefix. </dd><dt> - <code>llombok.anyConstructor.addConstructorProperties</code> + <code>lombok.anyConstructor.addConstructorProperties</code> </dt><dd> - If <code>true</code>, lombok will generate a <code>@java.beans.ConstructorProperties</code> annotation when generating constructors. This is particularly useful for GWT and Android development. Note that you'll need to depend on module 'java.desktop' if you're using jigsaw. + If <code>true</code>, lombok will generate a <code>@java.beans.ConstructorProperties</code> annotation when generating constructors. Note that you'll need to depend on module 'java.desktop' if you're using jigsaw. </dd><dt> <code>lombok.log.fieldName</code> </dt><dd> diff --git a/website/templates/features/experimental/FieldNameConstants.html b/website/templates/features/experimental/FieldNameConstants.html index 1cbef32a..e88b7670 100644 --- a/website/templates/features/experimental/FieldNameConstants.html +++ b/website/templates/features/experimental/FieldNameConstants.html @@ -6,6 +6,8 @@ @FieldNameConstants was introduced as experimental feature in lombok v1.16.22. </p><p> @FieldNameConstants was redesigned in lombok v1.18.4. + </p><p> + The <em>lombok.config</em> option <code>lombok.fieldNameConstants.uppercase = true</code> was added in lombok v1.18.8. </p> </@f.history> @@ -20,7 +22,7 @@ <@f.overview> <p> - 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 - write <code>@FieldNameConstants(asEnum = true)</code> for the enum variant. <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. + 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 - write <code>@FieldNameConstants(asEnum = true)</code> for the enum variant. <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, unless you set the <code>lombok.fieldNameConstants.uppercase = true</code> option in your <code>lombok.config</code> file; in that case lombok will try to <code>UPPER_CASE</code> the name. </p><p> 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> @@ -39,6 +41,10 @@ <code>lombok.fieldNameConstants.innerTypeName</code> = <em>a string</em> (default: 'Fields') </dt><dd> The name of the inner type generated by lombok can be controlled with this configuration key. + </dd><dt> + <code>lombok.fieldNameConstants.uppercase</code> = [<code>true</code> | <code>false</code>] (default: false) + </dt><dd> + If <code>true</code>, attempt to uppercase the generated fields. </dd> </@f.confKeys> diff --git a/website/templates/main.html b/website/templates/main.html index fc925d61..03073436 100644 --- a/website/templates/main.html +++ b/website/templates/main.html @@ -25,7 +25,7 @@ </video> <div class="row"> <div class="text-center"> - <a href="http://jnb.ociweb.com/jnb/jnbJan2010.html">Show me a text and images based explanation and tutorial instead!</a> + <a href="https://objectcomputing.com/resources/publications/sett/january-2010-reducing-boilerplate-code-with-project-lombok">Show me a text and images based explanation and tutorial instead!</a> </div> </div> </div> diff --git a/website/templates/presentations/7lessons.html b/website/templates/presentations/7lessons.html new file mode 100644 index 00000000..3027fbad --- /dev/null +++ b/website/templates/presentations/7lessons.html @@ -0,0 +1,25 @@ +<#import "../_scaffold.html" as main> +<@main.scaffold> + <div class="page-header top5"> + <div class="row text-center"> + <@main.h1 title="The 7 biggest mistakes we made in Project Lombok" /> + <p> + A presentation by Lombok's 2 core authors: Roel Spilker and Reinier Zwitserloot.<br /> + We talk about the 7 biggest mistakes we made managing an open source project for the past 10 years.<br /> + First given at <a href="https://programm.javaland.eu/2019/#/scheduledEvent/579921">Javaland (in Brühl, Germany) on March 19th, 2019</a>. Total length: 40 minutes. + </p> + </div> + <div class="video text-center"> + <video id="presentationVideo" width="640" height="360" poster="/presentations/7lessons-poster.jpg" controls="controls" preload="none"> + <source src="https://projectlombok.org/presentations/7lessons-vp9.webm" type="video/webm" /> + <source src="https://projectlombok.org/presentations/7lessons.webm" type="video/webm" /> + <source src="https://projectlombok.org/presentations/7lessons.mp4" type="video/mp4" /> + <@main.h1 title="Can't watch the video?" /> + <p> + You can download it and watch it with, for example, <a href="https://www.videolan.org/vlc/index.html">The open source VLC media player</a>:<br /> + <a href="/videos/7lessons.mp4">Download: 7 biggest mistakes we made in Project Lombok</a> + </p> + </video> + </div> + </div> +</@main.scaffold> |