Checks if the library has an element with the given name.
bool hasElement(String name) { return resolvedElements.any((Element e) => e.name == name); }