* @return the element representing the setter that was found
*/
private PropertyAccessorElement lookUpSetter(Expression target, Type type, String setterName) {
type = resolveTypeParameter(type);
if (type instanceof InterfaceType) {
InterfaceType interfaceType = (InterfaceType) type;
PropertyAccessorElement accessor;
if (target instanceof SuperExpression) {
accessor = interfaceType.lookUpSetterInSuperclass(setterName, definingLibrary);
} else {
accessor = interfaceType.lookUpSetter(setterName, definingLibrary);
}
if (accessor != null) {
return accessor;
}
return lookUpSetterInInterfaces(interfaceType, false, setterName, new HashSet<ClassElement>());