Lombok: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 23: | Line 23: | ||
@SuperBuilder(toBuilder = true) | @SuperBuilder(toBuilder = true) | ||
public class Parent implements Serializable { | public class Parent implements Serializable { | ||
//parent properties | |||
Line 40: | Line 40: | ||
@EqualsAndHashCode(callSuper = true) | @EqualsAndHashCode(callSuper = true) | ||
public class Child extends Parent implements Serializable { | public class Child extends Parent implements Serializable { | ||
//child properties | |||
Revision as of 20:06, 18 December 2023
@Data
@NoArgsConstructor
@AllArgsConstructor
public class MyPojo {
@Getter(AccessLevel.NONE)
private Boolean xxx;
public Boolean isXxx() {
return xxx;
}
}
|
@Data
@NoArgsConstructor
@AllArgsConstructor
@SuperBuilder(toBuilder = true)
public class Parent implements Serializable {
//parent properties
}
|
@Data
@NoArgsConstructor
@AllArgsConstructor
@SuperBuilder(toBuilder = true)
@EqualsAndHashCode(callSuper = true)
public class Child extends Parent implements Serializable {
//child properties
}
|
Maven Dependency
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.10</version>
<scope>provided</scope>
</dependency>