Lombok: Difference between revisions

From Chorke Wiki
Jump to navigation Jump to search
 
(6 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;
     }
     }
}
}
</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==
<source lang="xml">
<dependency>
    <groupId>org.projectlombok</groupId>
    <artifactId>lombok</artifactId>
    <version>1.18.10</version>
    <scope>provided</scope>
</dependency>
</source>
</source>


Line 17: Line 63:
{|
{|
| valign="top" |
| valign="top" |
* [https://stackoverflow.com/questions/18139678/ Lombok customise getter for Boolean object field]
* [https://stackoverflow.com/questions/18139678/ Lombok » customise getter for Boolean object field]
* [https://objectcomputing.com/resources/publications/sett/january-2010-reducing-boilerplate-code-with-project-lombok Reducing Boilerplate Code with Project Lombok]
* [https://objectcomputing.com/resources/publications/sett/january-2010-reducing-boilerplate-code-with-project-lombok Reducing Boilerplate Code with Project Lombok]
* [https://stackoverflow.com/questions/54220991/ Lombok assign custom logger variable name]
* [https://stackoverflow.com/questions/54220991/ Lombok » assign custom logger variable name]
* [https://projectlombok.org/features/GetterLazy Lombok features <code>@Getter(lazy=true)</code>]
* [https://projectlombok.org/features/GetterLazy Lombok » features <code>@Getter(lazy=true)</code>]
* [https://projectlombok.org/features/experimental/all Lombok experimental features]
* [https://projectlombok.org/features/experimental/all Lombok » experimental features]
* [https://projectlombok.org/features/Builder Lombok features <code>@Builder</code>]
* [https://projectlombok.org/features/Builder Lombok » features <code>@Builder</code>]
* [https://projectlombok.org/features/With Lombok features <code>@With</code>]
* [https://projectlombok.org/features/With Lombok » features <code>@With</code>]
* [https://projectlombok.org/features/log Lombok features <code>@Log</code>]
* [https://projectlombok.org/features/log Lombok » features <code>@Log</code>]
* [https://projectlombok.org/features/all Lombok stable features]
* [https://projectlombok.org/features/all Lombok » stable features]
* [https://projectlombok.org/api/lombok/extern/slf4j/Slf4j.html <code>@Slf4j</code> Examples]
* [https://projectlombok.org/api/lombok/extern/slf4j/Slf4j.html <code>@Slf4j</code> Examples]


| 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://projectlombok.org/api/index-all.html Lombok » API Documentation]
* [https://stackoverflow.com/questions/61979940/ Lombok » Private Constructor]
* [https://projectlombok.org/setup/eclipse Lombok » Plugins for IDE]
* [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]
* [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/ Project Lombok]
* [[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