libraryExports property

Map<LibraryElement, Set<Library>> get libraryExports

A mapping from a LibraryElement to all of the Librarys that export it, which is created if it is not yet populated.

Implementation

Map<LibraryElement, Set<Library>> get libraryExports {
  // The map must be reset if we're still in the middle of adding libraries
  // (though this shouldn't happen).
  if (_allLibraries.keys.length != _previousSizeOfAllLibraries) {
    assert(
      _previousSizeOfAllLibraries == 0,
      'Re-entered `libraryExports` while building all libraries',
    );
    _previousSizeOfAllLibraries = _allLibraries.keys.length;
    _libraryExports = {};
    for (var library in publicLibraries) {
      _tagExportsFor(library, library.element);
    }
  }
  return _libraryExports;
}