Lombok: Difference between revisions
Jump to navigation
Jump to search
(4 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 27: | 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 | * [https://www.baeldung.com/lombok-custom-annotation Lombok » Implementing a Custom Annotation] | ||
* [https://stackoverflow.com/questions/53866929/ Unable to use | * [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] | ||
* [[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>