lombok 介紹及基本使用方法
阿新 • • 發佈:2019-02-04
{
3
4 private String id;
5 private String name;
6 private String identity;
7 private Logger log = Logger.getLogger(Person.class);
8
9 public Person() {
10
11 }12
13 public Person(String id, String name, String identity) {
14 this.id = id;
15 this.name = name;
16 this.identity = identity;
17 }18
19 public String getId() {
20 return id;
21 }22
23 public String getName() {
24 return name;
25 }26
27 public String getIdentity() {
28 return identity;
29 }30
31 publicvoid setId(String id) {
32 this.id = id;
33 }34
35 publicvoid setName(String name) {
36 this.name = name;
37 }38
39 publicvoid setIdentity(String identity) {
40 this.identity = identity;
41 }42}
3
4 private String id;
5 private String name;
6 private String identity;
7 private Logger log = Logger.getLogger(Person.class);
8
9 public Person() {
10
11 }12
13 public Person(String id, String name, String identity) {
14 this.id = id;
15
16 this.identity = identity;
17 }18
19 public String getId() {
20 return id;
21 }22
23 public String getName() {
24 return name;
25 }26
27 public String getIdentity() {
28 return identity;
29 }30
31 publicvoid setId(String id)
32 this.id = id;
33 }34
35 publicvoid setName(String name) {
36 this.name = name;
37 }38
39 publicvoid setIdentity(String identity) {
40 this.identity = identity;
41 }42}