http://gwt-code-reviews.appspot.com/1076801/diff/1/2 File dev/core/src/com/google/gwt/core/ext/typeinfo/TypeOracle.java (right):
http://gwt-code-reviews.appspot.com/1076801/diff/1/2#newcode676 dev/core/src/com/google/gwt/core/ext/typeinfo/TypeOracle.java:676: // TODO(jgw): Not sure if getInheritableMethods() includes super-interfaces. On 2010/11/03 23:55:54, tbroyer wrote:
Yes it does. FYI, getOverridableMethods() returns the same as
getInheritableMethods(), just
without the methods marked 'final' (which are inherited, i.e. callable
from a
subclass, but not overridable).
Ah, thanks for catching that. http://gwt-code-reviews.appspot.com/1076801/diff/1/2#newcode687 dev/core/src/com/google/gwt/core/ext/typeinfo/TypeOracle.java:687: JMethod found = cls.findMethod(meth.getName(), methodParamTypes(meth)); On 2010/11/03 23:55:54, tbroyer wrote:
Given that (IIRC) getOverridableMethods and getInheritableMethods
would return
the implemented methods as "attached" to the implementing class and unimplemented methods attached to the interface defining them; it
might be
simpler to just loop over all inheritable methods of the class and
check that
the method's declaring class is not an interface (or maybe, is not
"intf" or an
interface that extends "intf", if you want to limit the scope to a
particular
interface).
My knowledge of the compiler is pretty limited though, so don't take
my word at
it and ask confirmation to an authoritative person ;-)
That's a good point -- I'm not all that familiar with the TypeOracle hierarchy anymore either, so I may just leave it alone for now, given that it's working. @scottb: If you have any preference for one approach or the other, I'm glad to change it. http://gwt-code-reviews.appspot.com/1076801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors