package pkg; import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.Setter; import lombok.ToString; @EqualsAndHashCode @Getter @Setter @ToString public class A { private String string; public String test() { return getString(); } }