Am 02.10.2009 06:23, Joe Darcy schrieb:
I wouldn't oppose a toDebugString(Object) method going into the
platform somewhere, but I don't think it necessarily belongs in Objects.
I suggest new class java.util.Debug to contain this and many other
thinkable helper methods useful for developers.
Further below is the code for an annotation processor which finds
candidate equals methods to be replaced with Objects.equals. It found
over half a dozen good candidates in the jdk repository. To run the
annotation processor, first compile the class and then run it with
javac similar to this:
javac -proc:only -processor EqualsFinder -processorpath <path to
processor> sources
That's very cool.
-Ulf