|
|
|
|
|
by marvy
1977 days ago
|
|
Consider the following two cases: 1. MyClass has 10 private fields, each with a trivial getter and setter. 2. YourClass has 10 private fields, of which 9 have a trivial getter and setter. The last one has a trivial getter but the setter is non-trivial. If you use your IDE to write your getters and setters, than the two classes above will look the same at glance. If you use Lombok, the "special" field will stick out at once. Personally, I prefer to avoid Lombok and just use public fields. That way, the field with a nontrivial setter will also stick out, and no need for bytecode magic. |
|