}
@Override
public MethodElement lookUpMethodInSuperclass(String methodName, LibraryElement library) {
for (InterfaceType mixin : getMixins()) {
MethodElement element = mixin.getMethod(methodName);
if (element != null && element.isAccessibleIn(library)) {
return element;
}
}
HashSet<ClassElement> visitedClasses = new HashSet<ClassElement>();
InterfaceType supertype = getSuperclass();
ClassElement supertypeElement = supertype == null ? null : supertype.getElement();
while (supertype != null && !visitedClasses.contains(supertypeElement)) {
visitedClasses.add(supertypeElement);
MethodElement element = supertype.getMethod(methodName);
if (element != null && element.isAccessibleIn(library)) {
return element;
}
for (InterfaceType mixin : supertype.getMixins()) {
element = mixin.getMethod(methodName);
if (element != null && element.isAccessibleIn(library)) {
return element;
}
}
supertype = supertype.getSuperclass();
supertypeElement = supertype == null ? null : supertype.getElement();