@@ -26,7 +26,6 @@ import 'package:dartdoc/src/model/model.dart';
2626import 'package:dartdoc/src/model_utils.dart' as utils;
2727import 'package:dartdoc/src/package_meta.dart'
2828 show PackageMeta, PackageMetaProvider;
29- import 'package:dartdoc/src/special_elements.dart' ;
3029import 'package:dartdoc/src/tool_definition.dart' ;
3130import 'package:dartdoc/src/tool_runner.dart' ;
3231import 'package:dartdoc/src/warnings.dart' ;
@@ -118,29 +117,6 @@ class PackageGraph with CommentReferable, Nameable {
118117 bool _shouldIncludeLibrary (LibraryElement libraryElement) =>
119118 config.include.isEmpty || config.include.contains (libraryElement.name);
120119
121- /// Adds [resolvedLibrary] as a special library to the package graph, which
122- /// adds the library to [_allLibraries] , but does not add it to any [Package] 's
123- /// list of libraries.
124- ///
125- /// Call during initialization to add a library possibly containing
126- /// special/non-documented elements to this [PackageGraph] . Must be called
127- /// after any normal libraries.
128- void addSpecialLibraryToGraph (DartDocResolvedLibrary resolvedLibrary) {
129- allLibrariesAdded = true ;
130- assert (! _localDocumentationBuilt);
131- final libraryElement = resolvedLibrary.element.library;
132- _allLibraries.putIfAbsent (
133- libraryElement.source.fullName,
134- () => Library .fromLibraryResult (
135- resolvedLibrary,
136- this ,
137- Package .fromPackageMeta (
138- packageMetaProvider.fromElement (libraryElement, config.sdkDir)! ,
139- packageGraph),
140- ),
141- );
142- }
143-
144120 /// Call after all libraries are added.
145121 Future <void > initializePackageGraph () async {
146122 assert (! _localDocumentationBuilt);
@@ -170,9 +146,6 @@ class PackageGraph with CommentReferable, Nameable {
170146 }
171147 allImplementersAdded = true ;
172148 allExtensionsAdded = true ;
173-
174- // We should have found all special classes by now.
175- specialClasses.assertSpecials ();
176149 }
177150
178151 /// Generate a list of futures for any docs that actually require precaching.
@@ -230,8 +203,8 @@ class PackageGraph with CommentReferable, Nameable {
230203 // more than once for them.
231204 final Map <Element , ModelNode > _modelNodes = {};
232205
233- /// The collection of "special" classes for which we need some special access .
234- final specialClasses = SpecialClasses () ;
206+ /// The Object class declared in the Dart SDK's 'dart:core' library .
207+ late InheritingContainer objectClass ;
235208
236209 /// Populate's [_modelNodes] with elements in [resolvedLibrary] .
237210 ///
@@ -706,14 +679,9 @@ class PackageGraph with CommentReferable, Nameable {
706679 ? .linkedName ??
707680 'Object' ;
708681
709- /// The set of [Class] objects that are similar to 'pragma' in that we should
710- /// never count them as documentable annotations.
711- late final Set <Class > _invisibleAnnotations = {
712- if (specialClasses[SpecialClass .pragma] case var pragma? ) pragma,
713- };
714-
715682 bool isAnnotationVisible (Class class_) =>
716- ! _invisibleAnnotations.contains (class_);
683+ class_.element.name == 'pragma' &&
684+ class_.element.library.name == 'dart.core' ;
717685
718686 @override
719687 String toString () {
0 commit comments