I would like to use lombok's @Delegate annotations in the my code.
Please check code snippet below and it throws an error saying :getAge() is already defined :
public interface I {
String getName();
int getAge();
}
@Data
public class Vo {
private String name;
private long age;
}
@AllArgsConstructor
public class Adapter implements I {
@Delegate(types = I.class)
private Vo vo;
//I want to use my own code here,Because vo.getAge() returns a long,But I.getAge() expects a int
public int getAge(){
return (int) vo.getAge();
}
}