Home Lombok

Lombok

Delomboking – delombok maven configuration Example

Using Project Lombok annotations in your POJOs will generates boilerplate code automatically at compile time. Delombok with maven plugin configuration provides a way...

Lombok + Spring Boot Example

Project Lombok is a mature library that reduces boilerplate code. In this tutorial we will walk through a simple Lombok Spring Boot example...

Lombok @Slf4j Examples

In this tutorial we will investigate how Lombok works with @Slf4j for logging with several examples and also we will see how...

Lombok @NonNull annotation Examples

Lombok @NonNull will generate a null-check for the start of a method or constructor body. Lombok NonNull annotation can be declared on...

Lombok @Value annotation Examples

Lombok Value annotation (@Value) is used when creating Immutable classes. All Lombok generated fields are made  private and  final  by default, and...

Lombok Builder default values Examples

In this article we will see couple of examples how we can set default values to fields when we are using Builder...

Lombok @Singular Examples with Builders

In this article we will look into several examples using Lombok @Singular annotation and how it works with collection valued fields...

Lombok @Accessors Examples

In this article we will look into Lombok @Accessors annotation and how it works with fluent, chain, and prefix options to generate...

Lombok @ToString examples

1. Lombok @ToString basic exampleThe Lombok @ToString annotation generates an implementation for the toString method and by default, it'll print your class...

Lombok @Builder Examples

Lombok @Builder annotation produces the code automatically using Builder pattern. We can apply this annotation at class level, constructor level and method...

Lombok @EqualsAndHashCode examples

1. Lombok @EqualsAndHashCodeWhen we declare a class with @EqualsAndHashCode, Lombok generates implementations for the equals and hashCode methods. Following example demonstrates how...

Lombok @RequiredArgsConstructor examples

1. Lombok @RequiredArgsConstructorGenerates a constructor with required arguments. Required arguments are uninitialized final fields and fields with constraints...

Lombok @AllArgsConstructor examples

1. Generating All-args constructor using LombokLombok @AllArgsConstructor generates a constructor with one parameter for each field in your...

Lombok @NoArgsConstructor examples

1. Generating no-args/default constructor using LombokLombok @NoArgsConstructor will generate a no arguments/default constructor, by default generated constructor will be...

Lombok @Getter @Setter and lazy getters examples

Complete guide to explain the usage of Lombok @Getter, @Setter annotations and generating lazy getters with several examples.

Stay in Touch