hasMethod method
Returns true
if this element has a method with the given name.
Implementation
@override
bool hasMethod(String name) {
if (_didResolveMethods) {
return _methods.any((MethodElement e) => e.name == name);
}
for (final MethodDeclaration method in compilationUnit.childEntities.whereType<MethodDeclaration>()) {
if (method.name.lexeme == name) {
return true;
}
}
return false;
}