@@ -81,7 +81,7 @@ class PackageGraph with CommentReferable, Nameable {
81
81
@override
82
82
String get breadcrumbName => throw UnimplementedError ();
83
83
84
- /// Adds [resolvedLibrary] to the package graph, adding it to [allLibraries ] ,
84
+ /// Adds [resolvedLibrary] to the package graph, adding it to [_allLibraries ] ,
85
85
/// and to the [Package] which is created from the [PackageMeta] for the
86
86
/// library.
87
87
///
@@ -108,11 +108,11 @@ class PackageGraph with CommentReferable, Nameable {
108
108
var package = Package .fromPackageMeta (packageMeta, this );
109
109
var lib = Library .fromLibraryResult (resolvedLibrary, this , package);
110
110
package.libraries.add (lib);
111
- allLibraries [libraryElement.source.fullName] = lib;
111
+ _allLibraries [libraryElement.source.fullName] = lib;
112
112
}
113
113
114
114
/// 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
116
116
/// list of libraries.
117
117
///
118
118
/// Call during initialization to add a library possibly containing
@@ -122,7 +122,7 @@ class PackageGraph with CommentReferable, Nameable {
122
122
allLibrariesAdded = true ;
123
123
assert (! _localDocumentationBuilt);
124
124
final libraryElement = resolvedLibrary.element.library;
125
- allLibraries .putIfAbsent (
125
+ _allLibraries .putIfAbsent (
126
126
libraryElement.source.fullName,
127
127
() => Library .fromLibraryResult (
128
128
resolvedLibrary,
@@ -312,18 +312,18 @@ class PackageGraph with CommentReferable, Nameable {
312
312
return _extensions;
313
313
}
314
314
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] .
316
317
///
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
319
320
/// works internally, but Dartdoc pretends to avoid documenting or duplicating
320
321
/// data structures for the same "library" on disk based on how it is
321
322
/// referenced. We can't use [Source] as a key due to differences in the
322
323
/// [TimestampedData] timestamps.
323
324
///
324
325
/// This mapping must be complete before [initializePackageGraph] is called.
325
- @visibleForTesting
326
- final Map <String , Library > allLibraries = {};
326
+ final Map <String , Library > _allLibraries = {};
327
327
328
328
/// All [ModelElement] s constructed for this package; a superset of
329
329
/// the elements gathered in [_gatherModelElements] .
@@ -533,8 +533,8 @@ class PackageGraph with CommentReferable, Nameable {
533
533
/// which is created if it is not yet populated.
534
534
Map <LibraryElement , Set <Library >> get libraryExports {
535
535
// 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;
538
538
_libraryExports = {};
539
539
for (var library in publicLibraries) {
540
540
_tagExportsFor (library, library.element);
@@ -566,7 +566,7 @@ class PackageGraph with CommentReferable, Nameable {
566
566
hrefMap.putIfAbsent (href, () => {}).add (modelElement);
567
567
}
568
568
569
- for (final library in allLibraries .values) {
569
+ for (final library in _allLibraries .values) {
570
570
final href = library.href;
571
571
if (href == null ) continue ;
572
572
hrefMap.putIfAbsent (href, () => {}).add (library);
@@ -863,7 +863,7 @@ class PackageGraph with CommentReferable, Nameable {
863
863
/// set of canonical Libraries).
864
864
Library ? findButDoNotCreateLibraryFor (Element e) {
865
865
// 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];
867
867
}
868
868
869
869
/// Gathers all of the model elements found in all of the libraries of all
@@ -900,7 +900,9 @@ class PackageGraph with CommentReferable, Nameable {
900
900
for (var library in _localLibraries) ...library.allModelElements
901
901
];
902
902
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.
904
906
final _configSetsNodocFor = HashMap <String , bool >();
905
907
906
908
/// Given an element's [fullName] , look up the nodoc configuration data and
0 commit comments