}
@Override
public PropertyAccessorElement lookUpGetterInSuperclass(String getterName, LibraryElement library) {
for (InterfaceType mixin : getMixins()) {
PropertyAccessorElement element = mixin.getGetter(getterName);
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);
PropertyAccessorElement element = supertype.getGetter(getterName);
if (element != null && element.isAccessibleIn(library)) {
return element;
}
for (InterfaceType mixin : supertype.getMixins()) {
element = mixin.getGetter(getterName);
if (element != null && element.isAccessibleIn(library)) {
return element;
}
}
supertype = supertype.getSuperclass();
supertypeElement = supertype == null ? null : supertype.getElement();