I wrote it down yesterday evening, and the method is now gone, but anyway:
http://gwt-code-reviews.appspot.com/1420808/diff/1/user/src/com/google/gwt/uibinder/rebind/TypeOracleUtils.java File user/src/com/google/gwt/uibinder/rebind/TypeOracleUtils.java (right): http://gwt-code-reviews.appspot.com/1420808/diff/1/user/src/com/google/gwt/uibinder/rebind/TypeOracleUtils.java#newcode60 user/src/com/google/gwt/uibinder/rebind/TypeOracleUtils.java:60: JType... argTypes) { On 2011/04/22 01:13:17, rjrjr wrote:
I don't know that I would ever use this unless it was based on JClassType.getOverridableMethods().
getOverridableMethods would miss final and static methods. You'd have to use getInheritableMethods instead. The question is what should be done about protected and "default access" methods? In most cases in GWT generators, unless we're sure about the package of the caller and callee classes (as is the case when the caller is a class that's being generated: UiBinder, EditorDelegate and other EditorContext), we don't bother checking if the method is accessible, we simply filter out non-public methods (see PlaceHistoryMapperWithFactory re. the factory's methods).
But rather than hardcoding that choice, perhaps you should make the
first
argument a JMethod[] to let me choose the set myself?
and/or provide both: hasCompatibleMethod(JClassType,boolean,methodName,JType...) containsCompatibleMethod(JMethod[],boolean,methodName,JType...) the former simply delegating to the latter. http://gwt-code-reviews.appspot.com/1420808/ -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
