@@ -81,7 +81,7 @@ class PackageGraph with CommentReferable, Nameable {
8181 @override
8282 String get breadcrumbName => throw UnimplementedError ();
8383
84- /// Adds [resolvedLibrary] to the package graph, adding it to [allLibraries ] ,
84+ /// Adds [resolvedLibrary] to the package graph, adding it to [_allLibraries ] ,
8585 /// and to the [Package] which is created from the [PackageMeta] for the
8686 /// library.
8787 ///
@@ -108,11 +108,11 @@ class PackageGraph with CommentReferable, Nameable {
108108 var package = Package .fromPackageMeta (packageMeta, this );
109109 var lib = Library .fromLibraryResult (resolvedLibrary, this , package);
110110 package.libraries.add (lib);
111- allLibraries [libraryElement.source.fullName] = lib;
111+ _allLibraries [libraryElement.source.fullName] = lib;
112112 }
113113
114114 /// Adds [resolvedLibrary] as a special library to the package graph, which
115- /// adds the library to [allLibraries ] , but does not add it to any [Package] 's
115+ /// adds the library to [_allLibraries ] , but does not add it to any [Package] 's
116116 /// list of libraries.
117117 ///
118118 /// Call during initialization to add a library possibly containing
@@ -122,7 +122,7 @@ class PackageGraph with CommentReferable, Nameable {
122122 allLibrariesAdded = true ;
123123 assert (! _localDocumentationBuilt);
124124 final libraryElement = resolvedLibrary.element.library;
125- allLibraries .putIfAbsent (
125+ _allLibraries .putIfAbsent (
126126 libraryElement.source.fullName,
127127 () => Library .fromLibraryResult (
128128 resolvedLibrary,
@@ -312,18 +312,18 @@ class PackageGraph with CommentReferable, Nameable {
312312 return _extensions;
313313 }
314314
315- /// All library objects related to this package; a superset of [libraries] .
315+ /// All library objects related to this package graph; a superset of
316+ /// [libraries] .
316317 ///
317- /// Keyed by `LibraryElement.Source .fullName` to resolve different URIs, which
318- /// refer to the same location, to the same [Library] . This isn't how Dart
318+ /// Keyed by `LibraryElement.source .fullName` to resolve different URIs
319+ /// referring to the same location, to the same [Library] . This isn't how Dart
319320 /// works internally, but Dartdoc pretends to avoid documenting or duplicating
320321 /// data structures for the same "library" on disk based on how it is
321322 /// referenced. We can't use [Source] as a key due to differences in the
322323 /// [TimestampedData] timestamps.
323324 ///
324325 /// This mapping must be complete before [initializePackageGraph] is called.
325- @visibleForTesting
326- final Map <String , Library > allLibraries = {};
326+ final Map <String , Library > _allLibraries = {};
327327
328328 /// All [ModelElement] s constructed for this package; a superset of
329329 /// the elements gathered in [_gatherModelElements] .
@@ -533,8 +533,8 @@ class PackageGraph with CommentReferable, Nameable {
533533 /// which is created if it is not yet populated.
534534 Map <LibraryElement , Set <Library >> get libraryExports {
535535 // Table must be reset if we're still in the middle of adding libraries.
536- if (allLibraries .keys.length != _lastSizeOfAllLibraries) {
537- _lastSizeOfAllLibraries = allLibraries .keys.length;
536+ if (_allLibraries .keys.length != _lastSizeOfAllLibraries) {
537+ _lastSizeOfAllLibraries = _allLibraries .keys.length;
538538 _libraryExports = {};
539539 for (var library in publicLibraries) {
540540 _tagExportsFor (library, library.element);
@@ -566,7 +566,7 @@ class PackageGraph with CommentReferable, Nameable {
566566 hrefMap.putIfAbsent (href, () => {}).add (modelElement);
567567 }
568568
569- for (final library in allLibraries .values) {
569+ for (final library in _allLibraries .values) {
570570 final href = library.href;
571571 if (href == null ) continue ;
572572 hrefMap.putIfAbsent (href, () => {}).add (library);
@@ -863,7 +863,7 @@ class PackageGraph with CommentReferable, Nameable {
863863 /// set of canonical Libraries).
864864 Library ? findButDoNotCreateLibraryFor (Element e) {
865865 // This is just a cache to avoid creating lots of libraries over and over.
866- return allLibraries [e.library? .source.fullName];
866+ return _allLibraries [e.library? .source.fullName];
867867 }
868868
869869 /// Gathers all of the model elements found in all of the libraries of all
@@ -900,7 +900,9 @@ class PackageGraph with CommentReferable, Nameable {
900900 for (var library in _localLibraries) ...library.allModelElements
901901 ];
902902
903- /// Glob lookups can be expensive. Cache per filename.
903+ /// Cache of 'nodoc' configurations.
904+ ///
905+ /// Glob lookups can be expensive, so cache per filename.
904906 final _configSetsNodocFor = HashMap <String , bool >();
905907
906908 /// Given an element's [fullName] , look up the nodoc configuration data and
0 commit comments