StaticWarningCode.UNDEFINED_SETTER,
identifier,
identifier.getName(),
prefixElement.getName());
} else if (node.getParent() instanceof Annotation) {
Annotation annotation = (Annotation) node.getParent();
resolver.reportErrorForNode(CompileTimeErrorCode.INVALID_ANNOTATION, annotation);
return null;
} else {
resolver.reportErrorForNode(
StaticWarningCode.UNDEFINED_GETTER,
identifier,
identifier.getName(),
prefixElement.getName());
}
return null;
}
if (element instanceof PropertyAccessorElement && identifier.inSetterContext()) {
PropertyInducingElement variable = ((PropertyAccessorElement) element).getVariable();
if (variable != null) {
PropertyAccessorElement setter = variable.getSetter();
if (setter != null) {
element = setter;
}
}
}
// TODO(brianwilkerson) The prefix needs to be resolved to the element for the import that
// defines the prefix, not the prefix's element.
identifier.setStaticElement(element);
// Validate annotation element.
if (node.getParent() instanceof Annotation) {
Annotation annotation = (Annotation) node.getParent();
resolveAnnotationElement(annotation);
return null;
}
return null;
}
// May be annotation, resolve invocation of "const" constructor.
if (node.getParent() instanceof Annotation) {
Annotation annotation = (Annotation) node.getParent();
resolveAnnotationElement(annotation);
}
//
// Otherwise, the prefix is really an expression that happens to be a simple identifier and this