Defaults for Objects' methods
Brenden Towey
brendentowey at gmail.com
Thu Jul 19 08:26:34 PDT 2012
On 7/19/2012 7:14 AM, Deepak S Patwardhan wrote:
> 1. Make the output pretty. Add special handling for Objects' methods at
> runtime. (to put it in very brief words)
I don't understand why this is a big deal. Can you be less brief about
what is going on here?
It seems that if you don't find a method signature in a class hierarchy,
you look in the interfaces implemented by the class hierarchy. Then at
the end of that search, you look at Object. I've done this myself when
inspecting objects reflectively. In some situations, it's useful to
ignore Object's methods, say when you consider a class a Java Bean but
you don't want to include "getClass()" as a getter. So you check
methods up to Object, but you don't include Object.
Why is it harder for the runtime to do this?
More information about the lambda-dev
mailing list