On Fri, Apr 22, 2011 at 3:45 AM, <t.bro...@gmail.com> wrote:

> 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).


Right, we discussed these things in chat and decided since we didn't have an
immediate need it was better to leave it out and then when we do have the
need for it, we will have a better idea about what API is useful.

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.


Right, that is what i had but there was a question about whether it should
filter only public methods or include protected, and whether the API should
expose that choice, etc.

-- 
John A. Tamplin
Software Engineer (GWT), Google

-- 
http://groups.google.com/group/Google-Web-Toolkit-Contributors

Reply via email to