What methods should go into a java.util.Objects class in JDK 7? (original) (raw)
Ulf Zibis Ulf.Zibis at gmx.de
Fri Oct 2 11:31:10 UTC 2009
- Previous message: What methods should go into a java.util.Objects class in JDK 7?
- Next message: What methods should go into a java.util.Objects class in JDK 7?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
sources
That's very cool.
-Ulf
- Previous message: What methods should go into a java.util.Objects class in JDK 7?
- Next message: What methods should go into a java.util.Objects class in JDK 7?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]