diff options
Diffstat (limited to 'website')
-rw-r--r-- | website/templates/features/configuration.html | 4 | ||||
-rw-r--r-- | website/templates/features/experimental/SuperBuilder.html | 15 | ||||
-rw-r--r-- | website/templates/setup/gradle.html | 32 | ||||
-rw-r--r-- | website/templates/setup/intellij.html | 3 |
4 files changed, 15 insertions, 39 deletions
diff --git a/website/templates/features/configuration.html b/website/templates/features/configuration.html index 4f861287..09cd46c2 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>lombok.anyConstructor.suppressConstructorProperties</code> + <code>llombok.anyConstructor.addConstructorProperties</code> </dt><dd> - If <code>true</code>, lombok will not generate a <code>@java.beans.ConstructorProperties</code> annotation when generating constructors. This is particularly useful for GWT and Android development. + 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. </dd><dt> <code>lombok.log.fieldName</code> </dt><dd> diff --git a/website/templates/features/experimental/SuperBuilder.html b/website/templates/features/experimental/SuperBuilder.html index 26f0a949..c68e28ca 100644 --- a/website/templates/features/experimental/SuperBuilder.html +++ b/website/templates/features/experimental/SuperBuilder.html @@ -25,7 +25,10 @@ </p><p> <code>@SuperBuilder</code> is not compatible with <code>@Builder</code>. </p><p> - You can use <code>@SuperBuilder(toBuilder = true)</code> to also generate an instance method in your class called <code>toBuilder()</code>; it creates a new builder that starts out with all the values of this instance. You can put the <code>@Builder.ObtainVia</code> annotation on the fields to indicate alternative means by which the value for that field/parameter is obtained from this instance. For example, you can specify a method to be invoked: <code>@Builder.ObtainVia(method = "calculateFoo")</code>. + You can use <code>@SuperBuilder(toBuilder = true)</code> to also generate an instance method in your class called <code>toBuilder()</code>; it creates a new builder that starts out with all the values of this instance. + Using <code>toBuilder</code> requires that all superclasses also have <code>toBuilder = true</code>. + You can put the <code>@Builder.ObtainVia</code> annotation on the fields to indicate alternative means by which the value for that field/parameter is obtained from this instance. + For example, you can specify a method to be invoked: <code>@Builder.ObtainVia(method = "calculateFoo")</code>. </p><p> To ensure type-safety, <code>@SuperBuilder</code> generates two inner builder classes for each annotated class, one abstract and one concrete class named <code><em>Foobar</em>Builder</code> and <code><em>Foobar</em>BuilderImpl</code> (where <em>Foobar</em> is the name of the annotated class). </p><p> @@ -65,15 +68,11 @@ <@f.smallPrint> <p> - @Singular support for <code>java.util.NavigableMap/Set</code> only works if you are compiling with JDK1.8 or higher. - </p><p> - The sorted collections (java.util: <code>SortedSet</code>, <code>NavigableSet</code>, <code>SortedMap</code>, <code>NavigableMap</code> and guava: <code>ImmutableSortedSet</code>, <code>ImmutableSortedMap</code>) require that the type argument of the collection has natural order (implements <code>java.util.Comparable</code>). There is no way to pass an explicit <code>Comparator</code> to use in the builder. - </p><p> - An <code>ArrayList</code> is used to store added elements as call methods of a <code>@Singular</code> marked field, if the target collection is from the <code>java.util</code> package, <em>even if the collection is a set or map</em>. Because lombok ensures that generated collections are compacted, a new backing instance of a set or map must be constructed anyway, and storing the data as an <code>ArrayList</code> during the build process is more efficient that storing it as a map or set. This behaviour is not externally visible, an implementation detail of the current implementation of the <code>java.util</code> recipes for <code>@Singular</code>. - </p><p> The generated builder code heavily relies on generics to avoid class casting when using the builder. </p><p> - Various well known annotations about nullity cause null checks to be inserted and will be copied to parameter of the builder's 'setter' method. See <a href="/features/GetterSetter">Getter/Setter</a> documentation's small print for more information. + For remarks on <code>@Singular</code>, see <a href="/features/Builder#small-print">the <code>@Builder</code> documentation's</a> small print. + </p><p> + Various well known annotations about nullity cause null checks to be inserted and will be copied to parameter of the builder's 'setter' method. See <a href="/features/GetterSetter#small-print">Getter/Setter documentation's small print</a> for more information. </p> </@f.smallPrint> </@f.scaffold> diff --git a/website/templates/setup/gradle.html b/website/templates/setup/gradle.html index b3c7de3a..53f45a71 100644 --- a/website/templates/setup/gradle.html +++ b/website/templates/setup/gradle.html @@ -11,51 +11,25 @@ <@s.section title="The Lombok Gradle Plugin"> <p> - There is a plugin for gradle that we recommend you use; it makes deployment a breeze, works around shortcomings of gradle prior to v2.12, and makes it easy to do additional tasks, such as running the lombok eclipse installer or delomboking. The plugin is open source. Read more <a href="https://github.com/franzbecker/gradle-lombok">about the gradle-lombok plugin</a>. - </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}' - sha256 = "" -}</pre> + There is a plugin for gradle that we recommend you use; it makes deployment a breeze, works around shortcomings of gradle prior to v2.12, and makes it easy to do additional tasks, such as running the lombok eclipse installer or delomboking. The plugin is open source. Read more <a href="https://plugins.gradle.org/plugin/io.freefair.lombok">about the gradle-lombok plugin</a>. </p> </@s.section> - <@s.section title="Gradle v2.12 and up"> + <@s.section title="Gradle without a plugin"> <p> If you don't want to use the plugin, gradle has the built-in <code>compileOnly</code> scope, which can be used to tell gradle to add lombok only during compilation. Your <code>build.gradle</code> will look like:<pre> repositories { mavenCentral() } -plugins { - id 'net.ltgt.apt' version '0.10' -} - dependencies { compileOnly 'org.projectlombok:lombok:${version}' - - apt 'org.projectlombok:lombok:${version}' + annotationProcessor 'org.projectlombok:lombok:${version}' }</pre> </p><p> Remember that you still have to download <code>lombok.jar</code> (or find it in gradle's caches) and run it as a jarfile, if you wish to program in eclipse. The plugin makes that part easier. </p> </@s.section> - <@s.section title="Gradle prior to v2.12"> - <p> - If you don't want to use the plugin and you're on gradle prior to v2.12, there's a bit of problem: Gradle didn't introduce the 'provided' concept until v2.12. The concept is added by a few well known plugins: The gradle <code>war</code> plugin has the <code>providedCompile</code> scope, and the <a href="https://github.com/nebula-plugins/gradle-extra-configurations-plugin">Gradle Extra Configurations Plugin</a> supports the <code>provided</code> scope. With these plugins, your <code>build.gradle</code> file will look something like this:<pre> -apply plugin: 'java' -apply plugin: 'nebula.provided-base' - -repositories { - mavenCentral() -} - -dependencies { - provided 'org.projectlombok:lombok:${version}' -}</pre> - </p> - </@s.section> <@s.section title="Android development"> <p> diff --git a/website/templates/setup/intellij.html b/website/templates/setup/intellij.html index 331a7bcd..9e99adbf 100644 --- a/website/templates/setup/intellij.html +++ b/website/templates/setup/intellij.html @@ -18,5 +18,8 @@ Restart IntelliJ IDEA </li></ul> </p> + <p> + You can also check out <a href="https://www.baeldung.com/lombok-ide">Setting up Lombok with Eclipse and IntelliJ</a>, a blog article on baeldung. + </p> </@s.introduction> </@s.scaffold> |