We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a3343ed commit c04eec0Copy full SHA for c04eec0
lombok-modules/lombok/src/main/java/com/baeldung/lombok/intro/Person.java
@@ -0,0 +1,23 @@
1
+import lombok.Getter;
2
+import lombok.experimental.FieldNameConstants;
3
+
4
+@Getter
5
+@FieldNameConstants
6
+public class Person {
7
8
+ private final String firstName;
9
+ private final String lastName;
10
+ private final int age;
11
12
+ public Person(String firstName, String lastName, int age) {
13
+ this.firstName = firstName;
14
+ this.lastName = lastName;
15
+ this.age = age;
16
+ }
17
18
+ public static void main(String[] args) {
19
+ System.out.println(Person.Fields.firstName);
20
+ System.out.println(Person.Fields.lastName);
21
+ System.out.println(Person.Fields.age);
22
23
+}
0 commit comments