Hi Gunnar,

You’re right.. It is better to return iso set the boolean in the outer class. Also, SimpleTypVisitor6 is better to use as base class.

I also wondered whether the name MethodMatcher is  a good one. You already defined some Filters.. Perhaps it is more a Filter as well.. I was a bit inspired by the regexp mechanism when I wrote this code (marcher, matches)..  

Do you want met to pick up your suggestions or do you want to play with this yourself?

Best regards,
Sjaak

Ps. I could take up another task at a certain point. Although progress will be a bit more slow, since my holidays are over :-( 


On 4 jan. 2014, at 12:29, Gunnar Morling <notifications@github.com> wrote:

> In processor/src/main/java/org/mapstruct/ap/util/MethodMatcher.java:
> 
> > +                        if ( !( typeUtils.isSubtype( superBoundAsDeclared, p ) ||
> > +                                typeUtils.isSameType( p, superBoundAsDeclared ) ) ) {
> > +                            // to check super type, we can simply reverse the argument, but that would initially yield
> > +                            // a result: <type, superType] (so type not included) so we need to check sameType also.
> > +                            typesMatch = false;
> > +                        }
> > +                        break;
> > +                    default:
> > +                        // does this situation occur?
> > +                        typesMatch = false;
> > +                }
> > +            }
> > +            return null;
> > +        }
> > +
> > +        @Override
> You could extend SimpleTypeVisitor6 instead of AbstractTypeVisitor6, so you'd only have to implement the "interesting" methods.
> 
> I'm also wondering whether we should return Boolean from the methods instead of using the shared variable in the outer class? If sticking to the current approach, we could parameterize the visitor type with Void for R instead of TypeMirror in order to make apparent that the return value is never used.
> 
> —
> Reply to this email directly or view it on GitHub.
>