Lombok @FieldNameConstants

import lombok.experimental.FieldNameConstants;
import lombok.AccessLevel;
 
@FieldNameConstants
public class FieldNameConstantsExample {
  private final String iAmAField;
  @FieldNameConstants(level = AccessLevel.PACKAGE)
  private final int andSoAmI;
}

delomboked

 public class FieldNameConstantsExample {
  public static final String FIELD_I_AM_A_FIELD = "iAmAField";
  static final String FIELD_AND_SO_AM_I = "andSoAmI";
 
  private final String iAmAField;
  private final int andSoAmI;
}