@@ -26,7 +26,6 @@ import 'package:dartdoc/src/model/model.dart';
26
26
import 'package:dartdoc/src/model_utils.dart' as utils;
27
27
import 'package:dartdoc/src/package_meta.dart'
28
28
show PackageMeta, PackageMetaProvider;
29
- import 'package:dartdoc/src/special_elements.dart' ;
30
29
import 'package:dartdoc/src/tool_definition.dart' ;
31
30
import 'package:dartdoc/src/tool_runner.dart' ;
32
31
import 'package:dartdoc/src/warnings.dart' ;
@@ -118,29 +117,6 @@ class PackageGraph with CommentReferable, Nameable {
118
117
bool _shouldIncludeLibrary (LibraryElement libraryElement) =>
119
118
config.include.isEmpty || config.include.contains (libraryElement.name);
120
119
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
-
144
120
/// Call after all libraries are added.
145
121
Future <void > initializePackageGraph () async {
146
122
assert (! _localDocumentationBuilt);
@@ -170,9 +146,6 @@ class PackageGraph with CommentReferable, Nameable {
170
146
}
171
147
allImplementersAdded = true ;
172
148
allExtensionsAdded = true ;
173
-
174
- // We should have found all special classes by now.
175
- specialClasses.assertSpecials ();
176
149
}
177
150
178
151
/// Generate a list of futures for any docs that actually require precaching.
@@ -230,8 +203,8 @@ class PackageGraph with CommentReferable, Nameable {
230
203
// more than once for them.
231
204
final Map <Element , ModelNode > _modelNodes = {};
232
205
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 ;
235
208
236
209
/// Populate's [_modelNodes] with elements in [resolvedLibrary] .
237
210
///
@@ -706,14 +679,9 @@ class PackageGraph with CommentReferable, Nameable {
706
679
? .linkedName ??
707
680
'Object' ;
708
681
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
-
715
682
bool isAnnotationVisible (Class class_) =>
716
- ! _invisibleAnnotations.contains (class_);
683
+ class_.element.name == 'pragma' &&
684
+ class_.element.library.name == 'dart.core' ;
717
685
718
686
@override
719
687
String toString () {
0 commit comments