PackageGraph class

Mixed in types

Constructors

PackageGraph.uninitialized(DartdocOptionContext config, DartSdk sdk, bool hasEmbedderSdk, RendererFactory rendererFactory, PackageMetaProvider packageMetaProvider)

Properties

allCanonicalModelElements Iterable<ModelElement>
no setter
allConstructedModelElements HashMap<Tuple3<Element, Library, Container?>, ModelElement?>
All ModelElements constructed for this package; a superset of _allModelElements.
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. Not cached because ModelElements can be created at any time and we're basing this on more than just allLocalModelElements to make the error messages comprehensive.
no setter
allImplementorsAdded bool
It is safe to cache values derived from the _implementors table if this is true.
getter/setter pair
allInheritableElements HashMap<Tuple2<Element, Library>, Set<ModelElement>>
Anything that might be inheritable, place here for later lookup.
final
allLibraries Map<String, Library>
All library objects related to this package; a superset of libraries.
final
allLibrariesAdded bool
getter/setter pair
allLocalModelElements Iterable<ModelElement>
latefinal
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
definingCommentReferable → CommentReferable
For testing / comparison only, get the comment referable from where this ElementType was defined. Override where an Element is available.
no setterinherited
documentedExtensions Iterable<Extension>
latefinal
documentedPackages Iterable<Package>
Documented packages are documented somewhere (local or remote).
no setter
extensions Iterable<Extension>
no setter
fullyQualifiedName String
no setterinherited
hasEmbedderSdk bool
final
hasFooterVersion bool
no setter
hashCode int
The hash code for this object.
no setterinherited
href String?
no setterinherited
implementors Map<InheritingContainer, List<InheritingContainer>>
no setter
inheritThrough Set<Class>
Return the set of Classes objects should inherit through if they show up in the inheritance chain. Do not call before interceptorElement is found. Add classes here if they are similar to Interceptor in that they are to be ignored even when they are the implementors of Inheritables, and the class these inherit from should instead claim implementation.
latefinal
invisibleAnnotations Set<Class>
The set of Class objects that are similar to pragma in that we should never count them as documentable annotations.
latefinal
libraries Iterable<Library>
latefinal
library Library?
no setterinherited
libraryCount int
The number of libraries.
latefinal
libraryElementReexportedBy Map<LibraryElement, Set<Library>>
no setter
localPackages List<Package>
Local packages are to be documented locally vs. remote or not at all.
no setter
localPublicLibraries Set<Library>
latefinal
modelBuilder → ModelObjectBuilder
Override implementations in unit tests to avoid requiring literal ModelElements.
latefinalinherited
name String
no setteroverride
namePart String
Utility getter/cache for _MarkdownCommentReference._getResultsForClass.
latefinalinherited
namePieces Set<String>
latefinalinherited
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 List<Package>
no setter
packageWarningCounter → PackageWarningCounter
Keep track of warnings.
latefinal
publicLibraries Set<Library>
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
rendererFactory → RendererFactory
Factory for renderers
final
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
sdk → DartSdk
final
sdkLibrarySources Map<Source?, SdkLibrary>
latefinal
specialClasses ↔ SpecialClasses
getter/setter pair

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
addSpecialLibraryToGraph(DartDocResolvedLibrary resolvedLibrary) → void
Adds resolvedLibrary as a special library to the package graph, which adds the library to allLibraries, but does not add it to any Package's list of libraries.
childLookups(List<String> reference) Iterable<ReferenceChildrenLookup>
A list of lookups that should be attempted on children based on reference. This allows us to deal with libraries that may have separators in them. referenceBy stops at the first one found.
inherited
configSetsNodocFor(String fullName) bool
Given an element's location, look up the nodoc configuration data and determine whether to unconditionally treat the element as "nodoc".
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).
findCanonicalLibraryFor(Element? e) Library?
Tries to find a top level library that references this element.
findCanonicalModelElementFor(Element? e, {Container? preferredClass}) ModelElement?
Tries to find a canonical ModelElement for this e. If we know this element is related to a particular class, pass a preferredClass to disambiguate.
findOrCreateLibraryFor(DartDocResolvedLibrary resolvedLibrary) Library
This is used when we might need a Library that isn't actually a documentation entry point (for elements that have no Library within the set of canonical libraries).
getHtmlFragment(String? name) String?
getMacro(String? name) String?
getModelNodeFor(Element? element) ModelNode?
initializeCategories() → void
Initializes the category mappings in all packages.
initializePackageGraph() Future<void>
Call after all libraries are added.
isAnnotationVisible(Class clazz) bool
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
populateModelNodeFor(Element element, DartDocResolvedLibrary resolvedLibrary) → void
referenceBy(List<String> reference, {required bool filter(CommentReferable?), required bool allowTree(CommentReferable?), bool tryParents = true, Iterable<CommentReferable>? parentOverrides}) → CommentReferable?
Look 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<Locatable>? referredFrom, Iterable<String>? extendedDebug}) → void

Operators

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