Lombok: Difference between revisions

From Chorke Wiki
Jump to navigation Jump to search
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
{|
| valign="top" |
<source lang="java">
<source lang="java">
@Data
@Data
@NoArgsConstructor
@NoArgsConstructor
@AllArgsConstructor
@AllArgsConstructor
@Builder(toBuilder = true)
public class MyPojo {
public class MyPojo {
     @Getter(AccessLevel.NONE)
     @Getter(AccessLevel.NONE)
     private Boolean xxx;
     private Boolean xxx;
     public Boolean isXxx() {
     public Boolean isXxx() {
         return xxx;
         return xxx;
Line 13: Line 15:
}
}
</source>
</source>
| valign="top" |
<source lang="java">
@Data
@NoArgsConstructor
@AllArgsConstructor
@SuperBuilder(toBuilder = true)
public class Parent {
    //parent properties
}
</source>
| valign="top" |
<source lang="java">
@Data
@NoArgsConstructor
@AllArgsConstructor
@SuperBuilder(toBuilder = true)
@EqualsAndHashCode(callSuper = true)
public class Child extends Parent {
    //child properties
}
</source>
|}


==Maven Dependency==
==Maven Dependency==
Line 40: Line 76:
| valign="top" |
| valign="top" |
* [https://stackoverflow.com/questions/44948858/ Lombok » <code>@builder</code> on a class that extends another class]
* [https://stackoverflow.com/questions/44948858/ Lombok » <code>@builder</code> on a class that extends another class]
* [https://www.baeldung.com/lombok-custom-annotation Implementing a Custom Lombok Annotation]
* [https://www.baeldung.com/lombok-custom-annotation Lombok » Implementing a Custom Annotation]
* [https://stackoverflow.com/questions/53866929/ Unable to use Lombok with '''Java 11''']
* [https://stackoverflow.com/questions/53866929/ Lombok » Unable to use with '''Java 11''']
* [https://www.baeldung.com/lombok-builder-inheritance Lombok » @Builder with Inheritance]
* [https://www.baeldung.com/lombok-builder-inheritance Lombok » @Builder with Inheritance]
* [https://blog.ippon.tech/comparing-java-lts-releases/ Comparing Java LTS Releases]
* [https://projectlombok.org/api/index-all.html Lombok » API Documentation]
* [https://projectlombok.org/api/index-all.html Lombok » API Documentation]
* [https://stackoverflow.com/questions/61979940/ Lombok » Private Constructor]
* [https://stackoverflow.com/questions/61979940/ Lombok » Private Constructor]
* [https://projectlombok.org/setup/eclipse Lombok » Plugins for IDE]
* [https://projectlombok.org/setup/eclipse Lombok » Plugins for IDE]
* [https://projectlombok.org/ Project Lombok]
* [https://www.baeldung.com/kotlin/lombok Lombok » With Kotlin]
* [https://projectlombok.org/ Lombok » Project]
 
| valign="top" |
 
|-
| colspan="3" |
----
|-
| valign="top" |
* [[Spring Exception Handling]]
* [[JSON Schema Validation]]
* [[Spring Security]]
* [[Apache Camel]]
* [[Netflix Eureka]]
* [[Java Lambda]]
* [[Camunda]]
* [[Spring]]
* [[Jasypt]]
* [[Java]]
 
| valign="top" |
* [https://blog.ippon.tech/comparing-java-lts-releases/ Comparing Java LTS Releases]
* [[MapStruct]]
* [[MapStruct]]
* [[Logback]]
* [[Log4j2]]
* [[Kotlin]]
| valign="top" |


|}
|}

Latest revision as of 21:08, 13 February 2024

@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder(toBuilder = true)

public class MyPojo {
    @Getter(AccessLevel.NONE)
    private Boolean xxx;
    public Boolean isXxx() {
        return xxx;
    }
}
@Data
@NoArgsConstructor
@AllArgsConstructor
@SuperBuilder(toBuilder = true)

public class Parent {
    //parent properties




}
@Data
@NoArgsConstructor
@AllArgsConstructor
@SuperBuilder(toBuilder = true)
@EqualsAndHashCode(callSuper = true)
public class Child extends Parent {
    //child properties




}

Maven Dependency

<dependency>
    <groupId>org.projectlombok</groupId>
    <artifactId>lombok</artifactId>
    <version>1.18.10</version>
    <scope>provided</scope>
</dependency>

References