Object javadocs and Josh Bloch tell us a great deal about how hashCode/equals should be implemented, and good IDEs will handle fields of various types correctly. Some discussio
A potential answer seems to be offered in this question.
I haven't looked into Project Lombok much, but I immediately thought, hmm annotations would work with a code generator.