PackageGraph class

Constructors

PackageGraph.uninitialized(DartdocOptionContext config, DartSdk sdk, bool hasEmbedderSdk, PackageMetaProvider packageMetaProvider, AnalysisContext _analysisContext)

Properties

allConstructedModelElements Map<ConstructedModelElementsKey, ModelElement>
All ModelElements constructed for this package; a superset of the elements gathered in _gatherModelElements.
final
allExtensionsAdded bool
It is safe to cache values derived from the _extensions table if this is true.
getter/setter pair
allHrefs Map<String, Set<ModelElement>>
A lookup index for hrefs to allow warnings to indicate where a broken link or orphaned file may have come from.
no setter
allImplementersAdded bool
It is safe to cache values derived from the _implementers table if this is true.
getter/setter pair
allInheritableElements Map<InheritableElementsKey, Set<ModelElement>>
Anything that might be inheritable, place here for later lookup.
final
allLibrariesAdded bool
getter/setter pair
The name to use in breadcrumbs in the rendered documentation.
no setter
config DartdocOptionContext
Dartdoc's configuration flags.
final
dartCoreObject String
The String name representing the Object type.
latefinal
defaultPackage → Package
latefinal
defaultPackageName String
Name of the default package.
no setter
displayName String
The name to use as text in the rendered documentation.
no setter
extensions Iterable<Extension>
no setter
fullyQualifiedName String
A "fully" qualified name, used for things like for warnings printed in the terminal; not for display use in rendered HTML.
no setterinherited
hasEmbedderSdk bool
final
hasFooterVersion bool
no setter
hashCode int
The hash code for this object.
no setterinherited
href String?
no setterinherited
implementers Map<InheritingContainer, List<InheritingContainer>>
no setter
libraries List<Library>
The set of all libraries (public and implementation) found across all packages.
latefinal
library → Library?
no setterinherited
libraryCount int
no setter
libraryExports Map<LibraryElement, Set<Library>>
A mapping from a LibraryElement to all of the Librarys that export it, which is created if it is not yet populated.
no setter
localPackages List<Package>
Local packages are to be documented locally vs. remote or not at all.
no setter
localPublicLibraries Set<Library>
latefinal
name String
no setter
objectClass ↔ InheritingContainer
The Object class declared in the Dart SDK's 'dart:core' library.
getter/setter pair
packageGraph PackageGraph
no setter
packageMap Map<String, Package>
Map of package name to Package.
final
packageMeta PackageMeta
PackageMeta for the default package.
final
packageMetaProvider PackageMetaProvider
PackageMeta provider for building PackageMetas.
final
packages Iterable<Package>
no setter
packageWarningCounter → PackageWarningCounter
Keep track of warnings.
latefinal
publicLibraries Set<Library>
The set of public libraries found across all packages.
latefinal
publicPackages List<Package>
latefinal
referenceChildren Map<String, CommentReferable>
Map of referenceName to the elements that are a member of this, but not this model element itself. Can be cached.
latefinal
referenceGrandparentOverrides Iterable<CommentReferable>?
Replace the parents of parents. referenceBy ignores whatever might otherwise be implied by the referenceParents of referenceParents, replacing them with this.
no setterinherited
referenceName String
no setterinherited
referenceParents Iterable<CommentReferable>
Iterable of immediate "parents" to try resolving component parts. referenceBy stops at the first parent where a part is found. Can be cached.
no setter
resourceProvider → ResourceProvider
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scope → Scope?
For any CommentReferable where an analyzer Scope exists (or can be constructed), implement this. This will take priority over lookups via referenceChildren. Can be cached.
no setterinherited
sdkLibrarySources Map<Source?, SdkLibrary>
final
workspacePackageNames Set<String>
Names of packages that are workspace members, populated by the builder when workspaceDocs is enabled.
final

Methods

addHtmlFragment(String name, String content) → void
addLibraryToGraph(DartDocResolvedLibrary resolvedLibrary) → void
Adds resolvedLibrary to the package graph, adding it to _allLibraries, and to the Package which is created from the PackageMeta for the library.
addMacro(String name, String content) → void
dispose() → void
findButDoNotCreateLibraryFor(Element e) → Library?
This is used when we might need a Library object that isn't actually a documentation entry point (for elements that have no Library within the set of canonical Libraries).
findCanonicalModelElementFor(ModelElement? modelElement, {Container? preferredClass}) → ModelElement?
Tries to find a canonical ModelElement for modelElement.
gatherModelNodes(DartDocResolvedLibrary resolvedLibrary) → void
Populate's _modelNodes with elements in resolvedLibrary.
getHtmlFragment(String? name) String?
getMacro(String name) String?
Returns a macro by name, or null if no macro is found.
getModelFor(Element element, Library? library, {Container? enclosingContainer}) → ModelElement
Returns the ModelElement for element, instantiating it if needed.
inherited
getModelForElement(Element element) → ModelElement
Returns the ModelElement for element, instantiating it if needed.
inherited
getModelForPropertyInducingElement(PropertyInducingElement element, Library library, {required Accessor? getter, required Accessor? setter, Container? enclosingContainer}) → ModelElement
Returns the ModelElement for element, instantiating it if needed.
inherited
getModelNodeFor(Element element2) → ModelNode?
getTypeFor(DartType type, Library? library) → ElementType
Returns the ElementType for type, instantiating it if needed.
inherited
initializeCategories() → void
Initializes the category mappings in all packages.
initializePackageGraph() Future<void>
Call after all libraries are added.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
referenceBy(List<String> reference, {required bool filter(CommentReferable?), bool tryParents = true, Iterable<CommentReferable>? parentOverrides}) → CommentReferable?
Looks up a comment reference by its component parts.
inherited
toString() String
A string representation of this object.
override
warnOnElement(Warnable? warnable, PackageWarning kind, {String? message, Iterable<Warnable> referredFrom = const [], Iterable<String> extendedDebug = const []}) → void

Operators

operator ==(Object other) bool
The equality operator.
inherited