To exclude a property from being included in the Lombok builder generated for a class, you can use the @Builder.Exclude annotation. This annotation tells Lombok to exclude the annotated field or method from the generated builder. Here's how you can use it:
pom.xml like this:<dependency> <groupId>org.projectlombok</groupId> <artifactId>lombok</artifactId> <version>1.18.22</version> <!-- Replace with the latest version --> <scope>provided</scope> </dependency>
@Builder.Exclude. For example:import lombok.Builder; import lombok.Getter; @Getter @Builder public class MyClass { private String includedField; @Builder.Exclude private String excludedField; } In this example, the excludedField is annotated with @Builder.Exclude, which means it won't be included in the generated builder for MyClass.
MyClass myObject = MyClass.builder() .includedField("includedValue") .build(); // excludedField is not part of the builder By using @Builder.Exclude, you can control which fields or methods are included in the Lombok-generated builder for your class and which ones are not.
file-read aar fork genealogy fragmentmanager ag-grid-ng2 capacity evaluate libsvm modulo