Java: Automatic equals() and hashCode()
问题 Implementing equals() and hashCode() for simple data POJOs is cluttering my code and maintaining is tedious. What are the libraries handling this automatically? I prefer bytecode instrumentation over AOP approach due to performance reasons. Update: Topic of necessity of implementing equals() and hashCode() has been discussed, here's my point: Isn't it better to have it done right upfront with minimal effort rather than digging in the code, adding hC/eq when it comes to it? 回答1: Project Lombok